Use T396445: [MEX] Server-side rendering for sub-components to split the current wikibase.mobileUi.statementView.vue into several components.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Extract first subcomponent for mobile editing experience | mediawiki/extensions/Wikibase | master | +53 -22 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T394621 [MEX] Mobile Editing Experience of Items Project | |||
| Resolved | karapayneWMDE | T394886 [MEX] M2 - Iteration 2 - Basic UI elements | |||
| Resolved | karapayneWMDE | T394885 [MEX] Format a simple statement using a string datatype | |||
| Resolved | karapayneWMDE | T396863 [MEX] Extract some sub-components | |||
| Resolved | karapayneWMDE | T397220 [MEX] Support multi-word component props in php-vuejs-templating | |||
| Resolved | karapayneWMDE | T397223 [MEX] Support component computed properties in php-vuejs-templating |
Event Timeline
Change #1160069 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Extract first subcomponent for mobile editing experience
There are some worrying test failures on the above patch, which start with:
[Vue warn]: Component is missing template or render function: {
name: 'WikibaseMexPropertyName',
props: {
url: { type: [Function: String], required: true },
label: { type: [Function: String], required: true }
}
}
at <WikibaseMexPropertyName url="mock-property-url" label="P1" >
at <WikibaseMexStatement statement= {
mainsnak: {
snaktype: 'value',
property: 'P1',
hash: 'ee6053a6982690ba0f5227d587394d9111eea401',
datavalue: { value: 'p1', type: 'string' },
datatype: 'string'
},
type: 'statement',
id: 'Q1$eb7fdbb4-45d1-f59d-bb3b-013935de1085',
rank: 'normal'
} ref="VTU_COMPONENT" >(And then some assertion failures because the contents of the component are missing.) I think Jest isn’t loading the SFC file properly, so the component ends up without its template?
Apparently the solution for our “Component is missing template or render function” error is:
diff --git i/repo/resources/wikibase.mobileUi/wikibase.mobileUi.propertyName.vue w/repo/resources/wikibase.mobileUi/wikibase.mobileUi.propertyName.vue index 649087ff4a..d101fc08e1 100644 --- i/repo/resources/wikibase.mobileUi/wikibase.mobileUi.propertyName.vue +++ w/repo/resources/wikibase.mobileUi/wikibase.mobileUi.propertyName.vue @@ -8,7 +8,7 @@ const { defineComponent } = require( 'vue' ); // @vue/component -module.exports = defineComponent( { +module.exports = exports = defineComponent( { name: 'WikibaseMexPropertyName', props: { url: {
I don’t understand it at all, but okay. (wikibase.mobileUi.statementView.vue and ScopedTypeaheadSearch.vue have the same thing already.)
Change #1160069 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Extract first subcomponent for mobile editing experience