Closed Bug 892528 Opened 11 years ago Closed 11 years ago

[User Story] Closing a Notification

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+)

VERIFIED FIXED
blocking-b2g koi+

People

(Reporter: pdol, Assigned: qdot)

References

Details

(Keywords: feature, Whiteboard: [ucid:System5, FT:systems-fe, KOI:P1][systemsfe])

Attachments

(1 file)

User Story:

As a developer I want the ability to close notifications even when the originating app is not open so that I can ensure that notifications, which are no longer relevant are removed.


Acceptance Criteria:

1. If my app issues a close command for a currently active (shown in utility tray) notification, the notification is dismissed and removed from view.
2. If my app issues a close command for a notification that has already been dismissed (no longer shown in utility tray), nothing happens.

Assumption: W3C spec is adhered to
After further discussion with engineering, the user story has been updated to only cover the scenario where the app is open (it is assumed that the app will open via system timers or an equivalent mechanism):

As a developer I want the ability to close notifications so that I can ensure that notifications, which are no longer relevant are removed.
Whiteboard: [ucid:System5] → [ucid:System5, FT:systems-fe, KOI:P1]
Note that there is one Gaia patch in bug 782211 that has not landed yet, I'll do it later today.

So (maybe) this bug will be fixed after this.
Depends on: 899574
Just filed bug 899574 so that we can get the active notifications for an app, which is necessary to survive app restarts.
Blocks: 855165
Added a bunch of bugs I filed as part of my tests in bug 855165. Some of them have simple patches if you feel like reviewing them.
Depends on: 900279, 901214, 900960
Candice Serran changed story state to started in Pivotal Tracker
Depends on: 903547
Assignee: nobody → kyle
Once bug 903547 lands, this should work for any app using the new notification API, since they can just call close() on the notification and the code is already in to check for tags and close accordingly.
Flags: in-moztrap?(jsmith)
Maybe in this bug you can add some code in the UITest test app to be able to close a notification ?

The code is in /test_apps/uitest/js/newnotification.js and /test_apps/uitest/js/newnotification.html (I added these files in bug 901856)
(In reply to Julien Wajsberg [:julienw] from comment #7)
> Maybe in this bug you can add some code in the UITest test app to be able to
> close a notification ?
> 
> The code is in /test_apps/uitest/js/newnotification.js and
> /test_apps/uitest/js/newnotification.html (I added these files in bug 901856)

julienw, I've done it in bug https://bugzilla.mozilla.org/show_bug.cgi?id=907375

It worked well here.
Depends on: 908978
Comment on attachment 794966 [details] [diff] [review]
Patch 1 (v1) - Integration Tests for Closing Notifications

See github (some minor changes requested)
Attachment #794966 - Flags: review?(jlal) → review-
Comment on attachment 794966 [details] [diff] [review]
Patch 1 (v1) - Integration Tests for Closing Notifications

https://github.com/qdot/gaia/commit/64339f4bfd563ca0ecaf0698e66db979c8df6898
Attachment #794966 - Flags: review- → review+
wrong commit above...

in master: https://github.com/mozilla-b2g/gaia/commit/a3b860b817d4877c10b43c34efdc1d43695fd9f7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
So I landed this but you still need a test for .onclose probably see https://bugzilla.mozilla.org/show_bug.cgi?id=908978
Flags: needinfo?(kyle)
Keywords: verifyme
QA Contact: jsmith
Kyle Machulis changed story state to accepted in Pivotal Tracker
Kyle Machulis changed story state to accepted in Pivotal Tracker
Kyle Machulis changed story state to accepted in Pivotal Tracker
Whiteboard: [ucid:System5, FT:systems-fe, KOI:P1] → [ucid:System5, FT:systems-fe, KOI:P1][systemsfe]
blocking-b2g: koi? → koi+
Flags: needinfo?(kyle)
Verified per completion of initial test pass.
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: