Page MenuHomePhabricator

Show bubble notification after removing favourite
Closed, ResolvedPublic5 Estimated Story Points

Description

After successfully calling api.php?action=options to remove a favourite from user preferences, show a notification in the frontend that the preference has been removed, with an option to undo

Undo simply re-adds the favourite as if the user clicked on an unselected favourite icon (as in T377948: Add template to favourites on click)

Event Timeline

Design question (cc @JSengupta-WMF) — in T377466: Show bubble notification after adding favourite we have added a bubble notification when the user adds or removes a template from their favourites in the template search drop down. It looks like this:

image.png (433×176 px, 7 KB)

image.png (433×176 px, 7 KB)

(both are success type notifications, as the action was successful)

However, this task is calling for an "undo" option on the removal notification — mw.notify bubble notifications cannot show buttons. We'd probably need to use an OOUI Message instead.
These can instead look like the one shown for edit recovery (e.g. below)

image.png (433×176 px, 17 KB)

As the design only shows the first type of notification, it is unclear what you'd prefer here — could you clarify please? :)

@TheresNoTime I'm still exploring the solution. The design you saw was just a placeholder. With the undo feature I am leaning towards the OOUI message style (2nd one)

However, this task is calling for an "undo" option on the removal notification — mw.notify bubble notifications cannot show buttons. We'd probably need to use an OOUI Message instead.

We have at times put more complicated UI in a bubble notification — the watchlist expiry dropdown, for example. Whether it's a good idea, I'm not sure! It's definitely not that common.

However, this task is calling for an "undo" option on the removal notification — mw.notify bubble notifications cannot show buttons. We'd probably need to use an OOUI Message instead.

We have at times put more complicated UI in a bubble notification — the watchlist expiry dropdown, for example. Whether it's a good idea, I'm not sure! It's definitely not that common.

Oh, TIL!

KSiebert claimed this task.
KSiebert set the point value for this task to 5.