Page MenuHomePhabricator

Update list of favourite templates when a favourite has been added or removed
Closed, ResolvedPublic8 Estimated Story Points

Description

When any change in favourites occurs, update the "favourite templates" list displayed below the search form.

  • When we favorite from the search results, the fave should appear in the list.
  • When we unfave from either the search results or the list, the list item should be struck out (and not appear on the next page load).
  • Re-favoriting a struck-out list item should un-strike it and that template should be faved in the search results (if it appears in subsequent searches).

Favoriting or unfavoriting from either template form, or in other browser tabs, is not in scope for this task.

Event Timeline

Cparle renamed this task from Update list of favourite templates when a new favourite is added to Update list of favourite templates when a favourite has been added.Oct 23 2024, 3:54 PM
Cparle updated the task description. (Show Details)
KSiebert renamed this task from Update list of favourite templates when a favourite has been added to Update list of favourite templates when a favourite has been added or removed.Mar 6 2025, 10:57 AM
KSiebert set the point value for this task to 8.Mar 6 2025, 11:03 AM

Notes from discussion: Instead of updating the list by removing a row when a template is unfavourited, it could instead be dimmed/greyed out/striked out (which would also still enable the user to "undo" the removal)

Change #1129823 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@master] [WIP] ext.templateData.templateDiscovery: Update list on favorite change

https://gerrit.wikimedia.org/r/1129823

Samwilson subscribed.

I've tried to list in the task description here all the cases we want to support. Feel free to change or add more.

Change #1129823 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Update list on favorite change

https://gerrit.wikimedia.org/r/1129823

Moving back to development to work on the adding functionality (i.e. prepend to the top of the list)

Change #1135928 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Update list on favourite add

https://gerrit.wikimedia.org/r/1135928

Change #1135928 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Update list on favourite add

https://gerrit.wikimedia.org/r/1135928