[Stingray] expose isVisible and focus API for crash_report

RESOLVED FIXED

Status

Firefox OS
Gaia::TV::System
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: sungchiu, Assigned: sungchiu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 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

3 years ago
No longer blocks: 1136589
(Assignee)

Updated

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

Comment 2

3 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

3 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

3 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+
merged to master:
https://github.com/mozilla-b2g/gaia/commit/579200c674a8614a48fb10a6c874ba9a5dbd8a85

gaia try is all green:
https://treeherder.mozilla.org/#/jobs?repo=gaia-try&revision=6096a3a64ddf
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.