## 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**
* [x] Search by alias not rendering expected results: {T343650}
* [x] Fix behavior when searching by Zid: {T343395}
**New features and improvements**
* [x] Reorder ZObjectSelector options by coincidence: {T315979}
* [x] Also perform searches for other languages that aren't the current user lang: {T343764}
* [x] Show alias hits with different styling: {T323930}
* [x] When set to type=Z60/language, allow searching by language code: {T343465}
* [ ] Update secondary table with language codes (build script for prod? how to build it as safe as possible?) {T349589}
**Future improvements**
* [ ] Pre-rank items brought from the labels table: {T348545}
* [ ] Populate ZObjectSelector with most common types: {T343564}
* [ ] Excluded zids is too opinionated and restrictive: {T336292}
* [ ] Improve the result ranking algorithm: {T349583}
* [ ] Consider using description instead of type in the MenuItem second line: {T349584}
---
## 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