Closed Bug 942837 Opened 12 years ago Closed 10 years ago

[User Story] Show Alarm Time on Lock Screen

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arogers, Assigned: prateekjadhwani)

References

Details

(Keywords: feature, foxfood, Whiteboard: [ucid:Productivity83, 1.5:P2, ft:productivity] [p=13])

Attachments

(4 files, 1 obsolete file)

User Story: As a user I want to view the time of my next alarm while my phone is locked - this enables me to verify that it is set without needing to unlock my phone and navigate to the clock app. Acceptance Criteria: 1. When my phone is locked (but not in sleep mode) I can see that my alarm is set, and the time and date of my next alarm. 2. Only my next alarm is shown, for example if I have an alarm set for 8am every day I can only see tomorrows alarm. 3. If my alarm is removed, It is no longer shown on the lock screen.
Keywords: feature
Whiteboard: [ucid:Productivity83, 1.4:P2, ft:productivity] → [ucid:Productivity83, 1.5:P2, ft:productivity]
Whiteboard: [ucid:Productivity83, 1.5:P2, ft:productivity] → [ucid:Productivity83, 1.5:P2, ft:productivity] [p=13]
I have started working on this user story. Can admin assign the bug to me please. Thanks
Flags: needinfo?(nobody)
(In reply to Prateek Jadhwani from comment #2) > I have started working on this user story. Can admin assign the bug to me > please. Great! I have assigned you :)
Assignee: nobody → prateekjadhwani
(In reply to Prateek Jadhwani from comment #2) > I have started working on this user story. Can admin assign the bug to me > please. Great! I have assigned you :)
Oops, double post.
Flags: needinfo?(nobody)
(In reply to Joshua Smith [:joshua-s] from comment #4) > Great! I have assigned you :) Thanks Joshua
Hi, I'm QA contact. When feature has developed complete please let me know, I will start to test the feature. Thanks, Edward
QA Contact: edchen
Spec attached.
Location of alarm icon.
Attached file alarm_icons.zip
Alarm icon file for all device resolutions.
Keywords: foxfood
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
One Question regarding the UX, how would the alarm information show if the alarm is set for 3 days from now? Or is it supposed to show only for the next 24 hours?
Flags: needinfo?(emorley)
I didn't file the bug, so not sure why you're asking me. That said, this is one of the features that I'd love to see in FirefoxOS - so my answer would be "copy Android, because their UX for pretty much everything is better". Their behaviour is to only show it if the alarm is within 24 hours or the next calendar day or something like that.
Flags: needinfo?(emorley)
Sorry, Ed. I wasn't able to get a hold of the Reporter or the Business Owner. So I thought may be someone from Mozilla might be able top convey the message. Secondly, thanks for the answer. I am almost done setting up the DataStore to get alarm info from the clock along with a POC. It should be done by next week.
Flags: a11y-review?
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master I was wondering if someone from the Gaia:Clock and Gaia:System could review the code. -Thanks
Attachment #8672186 - Flags: review?(m)
Morphing a11y review flag into a Yura NI.
Flags: a11y-review? → needinfo?(yzenevich)
:preeti, is this feature still desired? and if so, am I correct in assuming that we'll want to wait to land until after 2.5 branches?
Flags: needinfo?(psanketh)
(In reply to David Bolter [:davidb] from comment #16) > Morphing a11y review flag into a Yura NI. Yes it seems like there are some a11y related tweaks that need to happen: * Vertical bar separator needs to be hidden from the screen reader (using aria-hidden="true" on that element). Otherwise it is pronounced. * The alarm icon is not accessible to the screen reader which is fine IFF the time of the alarm has an additional label describing that it is the next alarm time. The best way to achieve that is to add an aria-label reading 'Next alarm' to the container that has the time text content via the l10n API. Please feel free to flag me for final a11y check.
Flags: needinfo?(yzenevich)
Thank you for the review. I will make the changes, and add the flag again. :)
(In reply to Yura Zenevich [:yzen] from comment #18) > (In reply to David Bolter [:davidb] from comment #16) > > Morphing a11y review flag into a Yura NI. > > Yes it seems like there are some a11y related tweaks that need to happen: > > * Vertical bar separator needs to be hidden from the screen reader (using > aria-hidden="true" on that element). Otherwise it is pronounced. > * The alarm icon is not accessible to the screen reader which is fine IFF > the time of the alarm has an additional label describing that it is the next > alarm time. The best way to achieve that is to add an aria-label reading > 'Next alarm' to the container that has the time text content via the l10n > API. > > Please feel free to flag me for final a11y check. Yura, I added the aria-label for the required sections. I was wondering if you could take a look at it again and let me know if this is expected. Thanks
Flags: needinfo?(yzenevich)
Ah this works really well, thanks for helping out on the a11y front.
Flags: needinfo?(yzenevich)
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master Thanks for tackling this feature. As mentioned on GitHub, I think we can get rid of most of the date/time logic by using `alarm.getNextAlarmFireTime()` to determine which alarm needs to be included. That logic can probably be simplified to only a few lines. I haven't gone over the lockscreen parts; that's probably more in the purview of a Gaia::Lockscreen peer.
Flags: needinfo?(psanketh)
Attachment #8672186 - Flags: review?(m)
(In reply to Marcus Cavanaugh [:mcav] (Mozilla SF) from comment #22) > Comment on attachment 8672186 [details] [review] > [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master > > Thanks for tackling this feature. As mentioned on GitHub, I think we can get > rid of most of the date/time logic by using `alarm.getNextAlarmFireTime()` > to determine which alarm needs to be included. That logic can probably be > simplified to only a few lines. > > I haven't gone over the lockscreen parts; that's probably more in the > purview of a Gaia::Lockscreen peer. Thanks for the reviews Marcus. I will updated the code by tomorrow. :)
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master Hi Marcus, I made the changes as per the comments. Please let me know if I need to make any more changes, Thanks
Attachment #8672186 - Flags: review?(m)
Greg, I was wondering of you could take a look at the lockscreen part of the pull request. Thanks
Flags: needinfo?(gweng)
Please set the review (when you done your work) or feedback (when you're still working on that) since it's part of the workflow. Thanks for patching, but I'm afraid there are some nested code need to be cleared up which I've commented on the PR page. After you address them I think we can take a look again.
Flags: needinfo?(gweng)
Hi Greg, I made the changes as per the comments. I am still new to the concept of Promises, so if I am doing something wrong. please let me know. Thanks
Flags: needinfo?(gweng)
Commented. You're almost there. But please, set feedback or review for the patch instead of just NI.
Flags: needinfo?(gweng)
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master Greg, I made the changes as per the comments. I was wondering if you could take a look at it. I wasnt able to move one block into its own then() block, I did not have access to the object that was required due to scoping. But, please let me know if this not a good solution. Thanks
Attachment #8672186 - Flags: feedback?(gweng)
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master Hi, I've addressed the issue. Maybe you can take a look and to see if it's reasonable for you. If so, you may fix other parts and rebase the patch. Thanks.
Attachment #8672186 - Flags: feedback?(gweng)
Comment on attachment 8672186 [details] [review] [gaia] prateekjadhwani:Bug-942837 > mozilla-b2g:master Created a new PR for this
Attachment #8672186 - Attachment is obsolete: true
Attachment #8672186 - Flags: review?(m)
Attachment #8682236 - Flags: review?(gweng)
Greg, I cleaned out the PR. And updated the Promise where it was required. Please let me know if I need to update anything else. Thanks
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master I think there are some issues I've addressed in the first PR. And although I don't know the policy of Clock app, in System app you need to attach an unit test for your patch before setting the review (for feedback it's not necessary). So please fix the PR, write an unit test and send the review again.
Attachment #8682236 - Flags: review?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Greg, I made the changes as per the comments. I am not sure if I am adding the assert conditions for the tests correctly. Since the fetchAlarm() returns a Promise, i had to wrap it around the then() method. Also, I wasnt able to use (fetchedData = null) as per the comments, because the dataStore returns an empty object instead of null. If I am doing something wrong, please let me know. Fabrice, I was wondering if you could code review the alarm part for this story. Thanks
Attachment #8682236 - Flags: review?(fabrice)
Attachment #8682236 - Flags: feedback?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master I'll go ahead and grab this review; I know bugzilla lists him as a suggested reviewer but he has a lot on his plate and I'm the clock component owner.
Attachment #8682236 - Flags: review?(fabrice) → review?(m)
(In reply to Marcus Cavanaugh [:mcav] (PTO 11/2-11/3) from comment #36) > Comment on attachment 8682236 [details] [review] > [gaia] prateekjadhwani:942837 > mozilla-b2g:master > > I'll go ahead and grab this review; I know bugzilla lists him as a suggested > reviewer but he has a lot on his plate and I'm the clock component owner. Thanks Marcus. Let me know if i need to change any thing.
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master It's fine for me to measure a empty object instead of null. And there are only two issues in the patch now. Good work.
Attachment #8682236 - Flags: feedback?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Hi Greg, I updated the PR as per the comments. Took me a while to understand that .then(done).catch(done) thing. Please let me know if I need to make any more changes. Thanks
Attachment #8682236 - Flags: feedback?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master There is only one issue. Unfortunately, it relates to error handling so I can't just f+ it. Please address it or discuss with me on the PR page if you have other concerns, thanks.
Attachment #8682236 - Flags: feedback?(gweng)
Hi Greg, do i need to catch the error on line 80 as well and again throw it again after I add the throw code on line 101? Sorry, i misunderstood the statement. Thanks
Flags: needinfo?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Greg, I added the throw code in the catch block. Please let me know if it needs more changes. Thanks
Flags: needinfo?(gweng)
Attachment #8682236 - Flags: feedback?(gweng)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Okay, I think it's good now. Let's see if it's good in testing now. Thanks for patching.
Attachment #8682236 - Flags: feedback?(gweng) → feedback+
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master This looks mostly good to me now, thanks for the revisions. Treeherder is still complaining about a failing test ("TypeError: this.component.updateAlarm is undefined"). You'll need to fix that before it can be landed. Please flag me for review once more when that is fixed, and I'll be quick on the r+. (I was on PTO some of last week, causing the slow response.)
Attachment #8682236 - Flags: review?(m)
(In reply to Marcus Cavanaugh [:mcav] from comment #44) > Comment on attachment 8682236 [details] [review] > [gaia] prateekjadhwani:942837 > mozilla-b2g:master > > This looks mostly good to me now, thanks for the revisions. Treeherder is > still complaining about a failing test ("TypeError: > this.component.updateAlarm is undefined"). You'll need to fix that before it > can be landed. Please flag me for review once more when that is fixed, and > I'll be quick on the r+. (I was on PTO some of last week, causing the slow > response.) Hi Marcus. Thanks for the quick response. I ran the tests using bin/gaia-test command. And all the unit tests related to alarm are passing. Could you point me in the correct direction as in what tests are you running besides the unit tests. Thanks
Flags: needinfo?(m)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Hi Marcus, I found the problem. And fixed the unit test. I forgot to add the methods in one of the test. Sorry :( Let me know if I need to add anything else. Thanks
Flags: needinfo?(m)
Attachment #8682236 - Flags: review?(m)
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Treeherder run looks green, thanks. Greg, did you want to take a formal review pass on this?
Attachment #8682236 - Flags: review?(m)
Attachment #8682236 - Flags: review?(gweng)
Attachment #8682236 - Flags: review+
Comment on attachment 8682236 [details] [review] [gaia] prateekjadhwani:942837 > mozilla-b2g:master Well it looks fine as the last time I reviewed, but with one weird indention here: https://github.com/mozilla-b2g/gaia/pull/32955/files#diff-460a1c0f44fb12b2fbf9dd1d3be82a20R56 Although it's only a nit.
Attachment #8682236 - Flags: review?(gweng) → review+
Sorry Greg, i dont know how it got past the jslist. My bad. Thanks for noticing though, I fixed the indentation.
Flags: needinfo?(gweng)
Marcus, the review had been done :)
Flags: needinfo?(m)
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(m)
Flags: needinfo?(gweng)
Resolution: --- → FIXED
Many thanks for fixing this :-)
Depends on: 1228223
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: