Page MenuHomePhabricator

[MEX][SPIKE] Investigate re-using wbformatvalue API and existing value formatters in MEX work
Closed, ResolvedPublic

Description

For the MEX VueJS template approach, we will need to (re-)implement the formatting of values of all different types, even to have a read-only view of the Items.

The current implementation in Wikibase uses some custom PHP Templating on the server side to generate the static HTML and the same templating via the wbformatvalue API for providing formatted values to the client-side UI.

Reimplementing value formatting for MEX would likely involve (at least) many months of development without contributing meaningfully to a more usable UI. It might instead be possible to re-use the existing value-formatting code - as a custom Vue component for the client side, and with the component stubbed in PHP for the server-side rendering.

Acceptance Criteria

  • Investigate the possibility and technical approaches for reusing the existing value formatter code for MEX - time limit 2 days.

Event Timeline

ArthurTaylor renamed this task from [MEX] Invetigate f to [MEX][SPIKE} Investigate re-using wbformatvalue API and existing value formatters in MEX work.Jul 2 2025, 9:48 AM
ArthurTaylor renamed this task from [MEX][SPIKE} Investigate re-using wbformatvalue API and existing value formatters in MEX work to [MEX][SPIKE] Investigate re-using wbformatvalue API and existing value formatters in MEX work.
ArthurTaylor updated the task description. (Show Details)

Change #1169087 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] [PoC] Use SnakFormatter in MEX

https://gerrit.wikimedia.org/r/1169087

Change #1169643 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Use Pinia store to stash server-rendered HTML

https://gerrit.wikimedia.org/r/1169643

Change #1169087 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use SnakFormatter in MEX

https://gerrit.wikimedia.org/r/1169087

Change #1169643 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use Pinia store to stash server-rendered HTML

https://gerrit.wikimedia.org/r/1169643