We currently include the following code in three files:
<cdx-text-input v-if="!valueStrategy.isLookupDatatype() && snakTypeSelection === 'value'" v-model="textvalue"></cdx-text-input> <cdx-lookup v-else-if="valueStrategy.isLookupDatatype()" v-model:selected="lookupSelection" v-model:input-value="lookupInputValue" :menu-items="lookupMenuItems" :menu-config="menuConfig" @update:input-value="onUpdateInputValue" @load-more="onLoadMore" > </cdx-lookup>
with minor variations and associated logic in the views. This duplication makes it harder to introduce new snak value types and means that the functionality of addQualifier and addReferences lags behind the functionality in the main editStatement view.
Additionally, the addQualifier and addReference versions have no support for adding somevalue and novalue snaks, which is presumably desirable.
Acceptance Criteria
- editableSnak, addQualifier and addReference use the same component for snak input, presumably WikibaseWbui2025EditableSnakValue
- associated logic is removed from addQualifier and addReference so that the logic for snakvalues is encapsulated in the WikibaseWbui2025EditableSnakValue component