Currently, qualifiers and references are re-rendered on the frontend. The JS UI should just re-use the HTML that comes from the backend.
- Mentioned In
- rEWBA0b0fbb6171ab: snakview: Refactored drawing mechanism
rMEXTc44a462d2f89: Updated mediawiki/extensions Project: mediawiki/extensions/Wikibase…
T88275: [Bug] No language fallback applied for property labels on qualifiers and references in JS UI.
- Mentioned Here
- T88275: [Bug] No language fallback applied for property labels on qualifiers and references in JS UI.
While suppressing JS redrawing on load is not that hard (in relative terms--still, it is the snakview), additional implications show up: When stopping edit mode ("save"/"cancel"), the by far easiest action to update/reset qualifier and reference Snaks is to clear the list widget managing them and re-init that listview. That mechanism (which is not going to change) will, of course, drop any previously rendered DOM (removing fall-back information from any Property used in the qualifier/reference Snaks).
Question @Lydia_Pintscher: Which one is to tackle first: T88275 or T88425?
Along with the refactoring, the Property DOM is nor re-rendered on page load anymore. This definitely improves performance. SnakTypeSelector and Variation are sill re-rendered though. That may be avoided as well (as the values are rendered properly formatted in the back-end) which would result in more performance improvement. Should be done in other change sets though.
Update: The change set got updated to also not re-render the Variation on initialization. (SnakTypeSelector actually was not re-rendered when initializing the snakview on previously generated HTML.) Should be a considerable performance boost now.