Closed
Bug 941909
Opened 9 years ago
Closed 9 years ago
[Clock] Alarm toggle operation blocks future toggling
Categories
(Firefox OS Graveyard :: Gaia::Clock, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jugglinmike, Assigned: jugglinmike)
Details
Attachments
(1 file)
6.56 KB,
patch
|
gnarf
:
review+
|
Details | Diff | Splinter Review |
The list item representation of an alarm updates immediately in response to tapping on the "enabled" toggle switch. This means the visual state of the application can go out-of-sync with the underlying model. I'm suggesting that we prevent the toggle switch from updating until the database operation has either succeeded or failed.
Assignee | ||
Comment 1•9 years ago
|
||
After talking this over with Rick, Eric, and Corey, I'm convinced that an "optimistic" UI is acceptable. The real problem is that the code ignores new "toggle" operations if a "toggle" operation is already pending. This behavior (coupled with an optimistic UI) means that the UI may communicate changes that the system does not recognize. This bug is difficult to reproduce without modifying the code because it concerns a race condition in a database operation that is very rapid under ideal circumstances: 1. Open the Clock application 2. Create an alarm 3. Rapidly tap the "enabled" checkbox twice Expected result: the checkbox becomes disabled and then re-enabled. Actual result: the checkbox becomes disabled, enabled, and then becomes disabled.
Summary: [Clock] Alarm active toggle updates optimistically → [Clock] Alarm toggle operation blocks future toggling
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8336463 -
Flags: review?(gnarf37)
Assignee | ||
Comment 3•9 years ago
|
||
I also submitted the above as a pull request on GitHub to help verify that all the tests pass: https://github.com/mozilla-b2g/gaia/pull/13931
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → mike
Comment 4•9 years ago
|
||
Comment on attachment 8336463 [details] [diff] [review] 941909-concurrent-checkbox.patch Review of attachment 8336463 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #8336463 -
Flags: review?(gnarf37) → review+
Assignee | ||
Comment 5•9 years ago
|
||
master: https://github.com/mozilla-b2g/gaia/commit/afc5cc73ecc665a0040f8c118daac8bb862ea698 Thanks for the review, Corey!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•