Page MenuHomePhabricator

Add favourite icon to search results
Closed, ResolvedPublic5 Estimated Story Points

Description

This is part of T377186: [STORY] New widget to search and favourite templates.

To the search results dropdown, add a favourite icon beside each result — results with a page_id in the favourites array will have the favourite icon in the "selected" state, results that are not will be in the "unselected" state

Clicking on an icon to favourite/unfavourite is not in scope for this ticket. That is done in T387187: Add functionality to favourite icon in search results.

Design (from Figma):

image.png (1×1 px, 231 KB)

Event Timeline

Samwilson renamed this task from Load list of favourites and populate search results to Load favourites data and set icon state in search results.Oct 21 2024, 5:14 AM
Samwilson updated the task description. (Show Details)
Cparle renamed this task from Load favourites data and set icon state in search results to Add favourite icon (with state) to search results.Oct 23 2024, 11:35 AM
Cparle updated the task description. (Show Details)
Cparle updated the task description. (Show Details)
KSiebert set the point value for this task to 8.Feb 20 2025, 10:42 AM
KSiebert edited projects, added Community-Tech (Fox Squad); removed Community-Tech.
Samwilson renamed this task from Add favourite icon (with state) to search results to Add favourite icon to search results.Feb 25 2025, 3:57 AM
Samwilson updated the task description. (Show Details)
Samwilson changed the point value for this task from 8 to 5.
Samwilson added a subscriber: JSengupta-WMF.

I've split out the user preferences handling, so am reducing the points of this task.

@JSengupta-WMF Should the favourite icon be a button (without border and any hover effect)?

It seems like keyboard navigation might be complicated here as well. We can arrow down the search result link and hit enter to select the highlighted item — but how should we handle tabbing to get to the favourite/unfavourite button?

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

[mediawiki/extensions/TemplateData@master] Template Discovery: Add favourite icon to search results

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

Yes favorite button is a quiet normal button. I guess in OOUI it will be called a button without border. Does the hover effect create any additional problem with keyboard navigation? If not then the hover state should be preserved.

Change #1122481 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Template Discovery: Add favourite icon to search results

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

KSiebert changed the task status from Open to Stalled.Mar 27 2025, 10:38 AM
dom_walden subscribed.

This appears to have been added.