Description
Whenever an Wikidata Lexeme object (object of type Z6005) is presented or required in the UI, we will render a special component to view, create and edit Wikidata Lexemes.
Internal representation
Wikidata Lexemes will be represented in Wikifunctions as:
- Function call to Z6xx5 with the Lexeme id as a string input (should solve T373588 first, at least deciding the function Zid):
{
"Z1K1": "Z7",
"Z7K1": "Z6xx5",
"Z6xx5K1": "L1234"
}- As per our current implementation, the string "Lxxxx" is interpreted as a valid Z6/String object in canonical form; this should remain this way.
- Whenever a Lexeme is represented in Default View, it should be only represented as a function call to Z6xx5
- Mode selector should not allow changing to reference
- Mode selector should not allow changing to literal
Content retrieval
Api for the Lexeme Lookup search:
https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities
Api for retrieving a Lexeme object given its Lid:
Probably the same choice as decided for T368654: Determine which API we should use to fetch Lexeme data from Wikidata when specified in the function-orchestrator
Desired behavior/Acceptance criteria
- in view mode:
- shows the Lexeme label and links to the external wikidata reference
- the presentation may be, initially, a link, but it can maybe contain some visual aid to communicate that this is an external link to a Wikidata Lexeme object
- in edit mode:
- renders a selector (CdxLookup component)
- sets the selector to whatever initial value it may have (if any)
- allows searching and selecting from all available Wikidata Lexemes
Devices and Design (URLs or screenshots)
- Desktop: ...
- Small screens/mobile: ...
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