[Stingray] expose isVisible and focus API for crash_report

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: suchiu, Assigned: suchiu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
1. isVisible API: Determine whether this UI is visible or not, and return z-index.
2. focus API: Focus the default elementin this UI.
(Assignee)

Updated

4 years ago
No longer blocks: 1136589
(Assignee)

Updated

4 years ago
Assignee: nobody → suchiu
Created attachment 8571880 [details] [review]
[gaia] sean2449:Bug_1136612 > mozilla-b2g:master
(Assignee)

Comment 2

4 years ago
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)
(Assignee)

Comment 3

4 years ago
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)
(Assignee)

Comment 4

4 years ago
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.