Page MenuHomePhabricator

Display list of favourites
Closed, ResolvedPublic5 Estimated Story Points

Description

In the tab under the search widget show a list of favourites

  • when the tab loads use api.php?action=query&pageids=<pipe_separated_pages_id_of_favourite_templates> to get the page_title values for the templates
  • display the page titles in a list in alphabetical order, with a "selected" favourite icon beside each
  • show a scrollbar if necessary (or if this is difficult let's set the max number of templates to a smaller number)
  • if there are no favourites display a "you currently have no favourite templates" message

Event Timeline

Cparle updated the task description. (Show Details)

Change #1127257 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] [WIP] Add template list below the template search input

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

@JSengupta-WMF The default OOUI tab style is to have padding around the title and to align the contents with that. Do you want this to be overridden to match the designs?

Current WIP (TemplateWizard)Design (VisualEditor)
image.png (608×723 px, 42 KB)
Screenshot from 2025-03-14 14-25-11.png (805×910 px, 53 KB)

Change #1128062 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Favorites: Remove unused favorite config var

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

Change #1128064 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Favorites: Rename SearchResult to TemplateMenuItem

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

Change #1128062 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Favorites: Remove unused favorite config var

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

Change #1127257 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Add template list below the template search input

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

Change #1129724 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Add message when favorites list is empty

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

Change #1128064 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Favorites: Rename SearchResult to TemplateMenuItem

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

Change #1130009 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Sort templates by title

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

Regarding the 'no current favorites' message, having the icon within the message is not a common thing to do for translatable messages. On Slick, Amin suggested moving the icon to the tab label:

image (1).png (468×1 px, 19 KB)

Does this sound okay?

another consideration: we could hide the bookmark icon when favorited templates are present, as it may become redundant in those cases

image.png (722×2 px, 123 KB)

Both sound good to me. @AAlhazwani-WMF wdyt about the padding that Sam asked earlier on March 14? Doesn't bother me either way but I'm generally not a fan of overrides unless necessary.

Both sound good to me. @AAlhazwani-WMF wdyt about the padding that Sam asked earlier on March 14? Doesn't bother me either way but I'm generally not a fan of overrides unless necessary.

yeah, agreed! i don't think overrides are necessary

Great, thanks both of you. I'll move the no-items icon into the tab header, and leave the padding as-is for now. I think removing the tab header icon when there are favorites makes sense, but we could perhaps do the first take without that and update it if needed (just to keep things simpler).

Change #1130009 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Sort templates by title

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

Change #1129724 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Add message when favorites list is empty

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

KSiebert changed the task status from Open to Stalled.Mar 27 2025, 10:38 AM
Samwilson changed the task status from Stalled to Open.May 14 2025, 8:05 AM

Do we still want to change this so that the bookmark icon is shown in the tab header only when there are no favorites, and then not shown if there are any?

(Unstalling, as we're no longer waiting on QA.)

Yes, it sounds like we do want to do that. (Discussion was on WMF Slack.)

Example of the new design:

With no favoritesWith favorites
image.png (140×405 px, 9 KB)
image.png (110×398 px, 8 KB)

Change #1148995 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Favorite templates: Hide or show the bookmark icon in the tab header

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

Change #1148995 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Favorite templates: Hide or show the bookmark icon in the tab header

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

(Removing this from the project story because it doesn't look like it's going to be worked on in the current cycle of work, but the story itself is done.) Sorry, wrong task!

The work for this is all done, and I think the feature is sufficiently covered by more specific open tasks to not need any extra QA here for the general usage.