Description
ZObjectSelector is one of our oldest components, and the most visible to users during common workflows like searching, using, and creating functions.
It wraps CdxLookup and, given an input string, it searches in the label secondary table to return those labels that match the search string.
This task is an epic to track the multiple behavior issues and suggestions to improve the behavior and usability of this component.
Bug fixes
- Search by alias not rendering expected results: T343650: Function selector does not search alias
- Fix behavior when searching by Zid: T343395: Typing a ZID into Function box and selecting the search-result leads to "The search has provided no result"
New features and improvements
- Reorder ZObjectSelector options by coincidence: T315979: API wikilambdasearch_labels doesn't order the results by % of coincidence but by last updated
- Also perform searches for other languages that aren't the current user lang: T343764: Add language form - multiple warnings for not recognized languages names
- Show alias hits with different styling: T323930: ZObjectSelector: Show alias hits with different styling
- When set to type=Z60/language, allow searching by language code: T343465: ZObjectSelector: When set to language, allow searching by exact language code
- Update secondary table with language codes (build script for prod? how to build it as safe as possible?) T349589: ZObjectSelector: Build and run script to update secondary table with language iso codes
Future improvements
- Add simple version of common result prompting: T350037: ZObjectSelector: Pre-populate the results with most common objects when the selection type is Z60/Language or Z4/Type
- Pre-rank items brought from the labels table: T348545: Add a way to pre-order labels table results on the initial query so that we don't have to calculate matchRate for too many items
- Populate ZObjectSelector with most common types: T343564: ZObjectSelector: Prepopulate with most common objects depending on the selection type
- Improve the result ranking algorithm: T349583: ZObjectSelector: Improve result sorting algorithm
- Consider using description instead of type in the MenuItem second line: T349584: ZObjectSelector: Consider showing the object description instead of the object type in the Lookup second line
Fix-it week material
- Excluded zids is too opinionated and restrictive: T336292: ZObjectSelector: Excluded types list is too opinionated and restrictive.
Improvements after user research
(As per suggestions listed in https://www.notion.so/wikimediadesign/Research-findings-dbba8d4b51714da59f2c843ec8e92366?pvs=4#95f220413f41421b8ca03baec37e4688)
- Remove down-chevron T350683: ZObjectSelector: remove the chevron icon
- Improve clear strategy T351206: ZObjectSelector: Fix clearing strategy when option isn't selected and user focuses out
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist