Closed Bug 1136612 Opened 7 years ago Closed 7 years ago

[Stingray] expose isVisible and focus API for crash_report

Categories

(Firefox OS Graveyard :: Gaia::TV::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: suchiu, Assigned: suchiu)

References

Details

Attachments

(1 file)

1. isVisible API: Determine whether this UI is visible or not, and return z-index.
2. focus API: Focus the default elementin this UI.
No longer blocks: stingray-focus-fallback
Assignee: nobody → suchiu
Comment on attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master

Please help me to review this patch.
There are two kinds of UI, crash-dialog(under dialog overlay) and system-banner(under screen), under crash report. Since we only interest in UIs that contain focusable elements, I made the following logic for isVisible, getOrder, focus API:
1. isVisible: If crash-dialog is visible, return true. If banner is shown and the button in the banner is also visible, return true.
2. getOrder: If crash-dialog is visible, return the z-index of it's parent (we only care about the z-index value under screen). If system-banners are visible, report the z-index value of lattest system-banner.
3. Focus: Focus 'send' report button for crash-dialog or button in system-banner.
Attachment #8571880 - Flags: review?(lchang)
Attachment #8571880 - Flags: review?(im)
Comment on attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master

As John and I discussed earlier, we have to remove 'dialog-overlay' and move all it's children dialogs to 'screen'
Attachment #8571880 - Flags: review?(lchang)
Attachment #8571880 - Flags: review?(im)
Comment on attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master

Crash report is using two kinds of UI, crash-dialog and system banner, under different containers, so our APIs have to be put in both crash report and system banner separately.
Attachment #8571880 - Flags: review?(lchang)
Attachment #8571880 - Flags: review?(im)
Comment on attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master

Looks good to me. I had left some nits at PR. Thanks.
Attachment #8571880 - Flags: review?(im) → review+
Comment on attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master

I saw my comments has been addressed. The patch looks great now. Thanks.
Attachment #8571880 - Flags: review?(lchang) → review+
You need to log in before you can comment on or make changes to this bug.