Closed Bug 1175461 Opened 9 years ago Closed 9 years ago

Truncated permission dialog when locked

Categories

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

defect
Not set
normal

Tracking

(blocking-b2g:2.5+, b2g-master verified)

VERIFIED FIXED
FxOS-S3 (24Jul)
blocking-b2g 2.5+
Tracking Status
b2g-master --- verified

People

(Reporter: apastor, Assigned: rakhavan)

References

Details

(Keywords: foxfood, Whiteboard: [bzlite] [systemsfe])

Attachments

(14 files, 1 obsolete file)

1.64 KB, application/octet-stream
Details
15.42 KB, application/octet-stream
Details
123 bytes, application/octet-stream
Details
551 bytes, application/octet-stream
Details
15 bytes, application/octet-stream
Details
1.01 KB, application/octet-stream
Details
81.91 KB, application/octet-stream
Details
501 bytes, application/octet-stream
Details
7.74 KB, application/octet-stream
Details
17.81 KB, application/octet-stream
Details
9.86 KB, application/octet-stream
Details
267.21 KB, application/octet-stream
Details
64.79 KB, image/png
Details
46 bytes, text/x-github-pull-request
Details | Review
User-Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

DTR

- Leave the phone in the lockscreen with Adb and Devtools access

- Try to connect via WebIde

Expected

The connect permission dialog is not truncated by the SHB

Actual

See screenshot
Attached file proc-vmstat.log
Attached file proc-vmallocinfo.log
Attached file proc-version.log
Attached file proc-uptime.log
Attached file proc-meminfo.log
Attached file proc-kmsg.log
Attached file proc-cmdline.log
Attached file dev-log-system.log
Attached file dev-log-radio.log
Attached file properties.log
Attached file dev-log-main.log
Attached image screenshot.png
[Blocking Requested - why for this release]: Given that the STR is (may be) part of the Spark documentation to set up the device, this will be part of the first impression of the device.
blocking-b2g: --- → spark?
Whiteboard: [bzlite] → [bzlite] [systemsfe]
blocking-b2g: spark? → 2.5?
blocking-b2g: 2.5? → 2.5+
Component: Gaia::Feedback → Gaia::System
Assignee: nobody → mhenretty
See Also: → 1176909
Assignee: mhenretty → rakhavan
I think I found a simple solution to this. I'm hoping my results can be validated before asking for a formal review. Locally tests are showing green lights.
Flags: needinfo?(mhenretty)
Overall, I like the idea of this change, ie. should leverage the platform whenever possible to do re-sizing. However, did you check the different places the modal_dialog was being used to make sure it still worked when doing things like bringing up and dismissing the keyboard? We *should* have tests for these scenarios, but being the pessimist that I am, I am skeptical they cover our bases here. So making a change like this, while it seems like the right thing to do™, in practice will require a bunch of research.
Flags: needinfo?(mhenretty)
> However, did you check the different places the modal_dialog was being used
> to make sure it still worked when doing things like bringing up and dismissing
> the keyboard?

I did try the prompt dialog (which has a text field) using the existing code and with my patch. In both cases the keyboard is brought up and dismissed the same way. The dialog doesn't resize itself in relation to the keyboard. And I wouldn't expect it to since the height is simply `LayoutManager.height - Statusbar.height`.

> ...while it seems like the right thing to do™, in practice will require a bunch of research.

I'm open to recommendations and guidance. With what I know now, combing through code looking for places where this is used and trying it out sounds like what's required. But doesn't sound very productive of us.
Flags: needinfo?(mhenretty)
(In reply to Reza Akhavan [:jedireza] from comment #18)
> I'm open to recommendations and guidance. With what I know now, combing
> through code looking for places where this is used and trying it out sounds
> like what's required. But doesn't sound very productive of us.

Yeah, the problem with this type of change is the potential amount of time spent researching why things are the way the are, and then what the impact is for changing it. What I generally do is grep for all the places where the modules is used, and if it's small enough to test each use case then move forward with this approach. It sounds like this is already changing the behavior of window.prompt, which could break if there was a lot of text in it? I'm not sure, but overall this change sounds risky. 

Another approach I would look into is listening for the `system-resize` event (which is published by the layout manager for various reasons including unlocking the phone), and then updating the height of the dialog in the handler if the dialog is shown. It doesn't improve the situation the way your patch does, but it feels less risky.
Flags: needinfo?(mhenretty)
Attachment #8633732 - Attachment is obsolete: true
New PR using a less risky approach. It is visually noticeable when the dialog is resized.
Flags: needinfo?(mhenretty)
WFM
Flags: needinfo?(mhenretty)
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/gaia/commit/881c6ef2e8ea4fea6a0681e9f8fa7b70d41e35a9
Status: NEW → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S3 (24Jul)
This issue is verified fixed on Aries. The dialog is no longer obscured by the SHB bar. There is a missing step on original STR: the phone needs to be unlocked in order to see that dialog. I was confused when I flashed to a build around reported date trying to repro the bug first.

Device: Aries (dogfood debug build)
BuildID: 20150721153949
Gaia: 805cf546729ba742bf23febda52970fcb35c0e8f
Gecko: 512c7e8f0030
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 42.0a1 (2.5 Master) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: