Description
There are at least 10 community-contributed functions that employ lexeme senses. Z6831/Find lexemes for a Wikidata lexeme sense was deployed this week, and could encourage more such functions. So it would be helpful for users to have UI support that provides a selector, collapsed view, etc.
In particular, whenever requesting a function call with a lexeme sense input, a selector would provide substantial convenience, clarity, and time savings for users. This can be seen by comparing input selection in Z6826 Fetch Wikidata lexeme sense to that in Z6824 Fetch Wikidata lexeme form.
- Add a custom lexemeSense.vue component in the frontend default-view-types
- Fetch the lexeme senses from Wikidata using their Api
- Exact solution TBD by design
These should get a custom component:
- Fetch Lexeme sense: https://www.wikifunctions.org/view/en/Z6826
- Wikidata lexeme sense reference displayed as input param in: https://www.wikifunctions.org/view/en/Z6831 or https://www.wikifunctions.org/view/en/Z6806
- The collapsed and expanded views of the ZObjectToString https://www.wikifunctions.org/view/en/Z23538
Acceptance Criteria
- Lexeme Sense references are displayed with a custom, user-friendly component in both read and edit mode
- Component supports collapsed and expanded views, visually consistent with other Wikidata references
- Users can search for and select lexeme senses using live Wikidata data
- Users can create Wikidata Enums with type Lexeme Sense (with values like L123-S1)
- Selected senses show gloss and link to Wikidata in read mode
- Invalid or unavailable sense references degrade gracefully (e.g. show raw ID)
- Follows design: https://phabricator.wikimedia.org/T397410