Closed Bug 1043892 Opened 11 years ago Closed 11 years ago

[LockScreen] Solve the visual regression caused by Bug 1043821, with panel switching refactoring

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S2 (15aug)

People

(Reporter: gweng, Assigned: gweng)

References

Details

(Whiteboard: [p=3])

Attachments

(3 files)

In the progress of resolving Bug 1043821, I've found the switchPanel and it's use case is too complicated, which blocks me to resolve the visual regression caused by the patch. So after discussed with Tim, I decide to solve the regression in this follow-up bug, and maybe with some refactoring work. The visual regression is if user unlock the screen with passcode entered, and then lock it again, the passcode pad would play the slide out animation again. I've found this is relevant with the switchPanel, but in the current code it scatters about the whole lockscreen.js, which make it's hard to debug.
Blocks: 1043821
Whiteboard: [p=3]
Assignee: nobody → gweng
Target Milestone: --- → 2.1 S2 (15aug)
I almost resolved this bug. One discover is if we don't hide the slide while unlocking with passcode, it looks more smooth. The video is attached: https://www.youtube.com/watch?v=htqkY1V6SHc NI UX to see if this minor change is OK.
Flags: needinfo?(firefoxos-ux-bugzilla)
Flagging Peter to check the UX change.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(pla)
Hi Greg, Can you provide a video of the actual regression from bug 1043821? It's a bit hard to visualize. Thanks, Peter
Flags: needinfo?(pla)
Hi Greg, Nevermind, I think I see the regression now on my device. As for your minor change - I think I like your new version better because there is less of a delay (the first option shown in your video). Peter.
Attached file Patch
Major changes: 1. Pull out panel switching code to individual state components 2. Manage these states with specific rules in LockScreenStateManager 3. Modify the existing components as less as possible to reduce risks TBPL only failed at building stage, which failed at others' sessions as well. So I set the review before I re-run it.
Attachment #8468164 - Flags: review?(timdream)
Comment on attachment 8468164 [details] [review] Patch LFTM as discussed offline. This patch implements a state machine to manage lock screen panel states. The state machine is also the centralize place do decide the next state should go to. I am not very opinionated on what state machine should look like and I think the amount of creativity and diversity is good. There is also a queue module that handles the events with setInterval. I never saw a queue being implemented as such but I failed to think of any down side of it. So let's get this checked-in and see how this goes. Nice work!
Attachment #8468164 - Flags: review?(timdream) → review+
The test only failed at two intermittent error: https://tbpl.mozilla.org/?rev=3b20fe7c78c53d5fb6e7ea33b73384ffb090815f&tree=Gaia-Try So I would land this patch. Thanks Tim for the reviewing and feedbacks.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attached file Patch rev2
Removed the event queue to make sure there is no potential risk to land this patch. While I think it's very strange to fail only one test in Gonk on emulator with one Gaia patch, which looks should be innocent except it's in the System app.
Depends on: 1053688
The new patch failed with two test cases only on Gaia Try: they passed on my local console perfectly. So I submit a bug to require a machine to debug with: Bug 1053688
Brief update: test with |NOFTU=0 make| would make it fail on both Mac and Ubuntu locally. |NOFTU=1 make| would make them pass, while on remote server with only |make| always failed.
Yes. On the remote server, |NOFTU=1 make| would lead to fail, too.
Oh no... now |NOFTU=0 make| on Mac would lead to the success result again.
Okay, it failed only with intermittent errors: https://tbpl.mozilla.org/?rev=3c10b2a9da487d2ef7f202918bc912396eabf80e&tree=Gaia-Try So I would land it again.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Reverted for the test failures that were also present in the gaia-try run: https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=c0dc6b070008&jobname=gaia-ui-test https://github.com/mozilla-b2g/gaia/commit/0074e17d02e488049502a28789135afed3d4e3d1 (In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #15) > Okay, it failed only with intermittent errors: Those were not intermittent failures - they didn't match the bug suggestions.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file Patch rev3
...start to feel frustrated to fix tests neither written nor maintain by me.
Maybe I should disable the test and NI the author who wrote and maintain the test to update it next time.
While I'm fixing the rest integration test failure, I've found the previous Gonk RIL test failed even without my patch, which caused the first back out. Although the patch indeed should be fixed with other errors in Gaia UI tests. NI for notifying Ed the errors: Gaia change with the RIL failure #1 https://hg.mozilla.org/integration/b2g-inbound/rev/c6bedead82d8 which was with the RIL error: https://tbpl.mozilla.org/php/getParsedLog.php?id=46354439&tree=B2g-Inbound Gaia change with the RIL failure #2 https://hg.mozilla.org/integration/b2g-inbound/rev/15b30f6faca9 which was with the RIL error: https://tbpl.mozilla.org/php/getParsedLog.php?id=46352648&tree=B2g-Inbound These samples show that the RIL error on ICS emulator is irrelevant with my patch. Because these failures were all occurs before my patch got landed.
Flags: needinfo?(emorley)
(In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #18) > ...start to feel frustrated to fix tests neither written nor maintain by me. (In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #19) > Maybe I should disable the test and NI the author who wrote and maintain the > test to update it next time. That's unfortunately not how development works at Mozilla - if a landing breaks expectations of tests, then it needs to adjust the tests at the same time. (In reply to Greg Weng [:snowmantw][:gweng][:λ] from comment #20) > While I'm fixing the rest integration test failure, I've found the previous > Gonk RIL test failed even without my patch, which caused the first back out. > Although the patch indeed should be fixed with other errors in Gaia UI tests. > > NI for notifying Ed the errors: > > Gaia change with the RIL failure #1 > https://hg.mozilla.org/integration/b2g-inbound/rev/c6bedead82d8 > > which was with the RIL error: > https://tbpl.mozilla.org/php/getParsedLog.php?id=46354439&tree=B2g-Inbound > > Gaia change with the RIL failure #2 > https://hg.mozilla.org/integration/b2g-inbound/rev/15b30f6faca9 > > which was with the RIL error: > https://tbpl.mozilla.org/php/getParsedLog.php?id=46352648&tree=B2g-Inbound > > These samples show that the RIL error on ICS emulator is irrelevant with my > patch. Because these failures were all occurs before my patch got landed. I don't quite understand what you are saying? The xpcshell failures listed in comment 20 were due to bug 1052503.
Flags: needinfo?(emorley)
Okay, the patch now pass all tests on Gaia-Try: https://tbpl.mozilla.org/?rev=ac025d7709ef815cab792c12c1f932a641c6125a&tree=Gaia-Try Hope everything goes fine on Inbound as well.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Not closing this as verified fixed since this issue is still occurring when locking the device in the settings app. bug 1064630
Depends on: 1067934
No longer depends on: 1067934
Depends on: 1196602
No longer depends on: 1196602
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: