Page MenuHomePhabricator

[MEX][Score] support musical notation datatype for editing
Closed, ResolvedPublic

Description

In order to for MEX to support musical notation, a ValueStrategy must be registered for the datatype. Since the "musical-notation" datatype is added and defined by Extension:Score, this support should be added in that extension's repo, and not in Wikibase directly.

An example of registering strategies in another extension can be found here: Add support for Lexemes in wbui2025

Acceptance criteria

  • the value strategy is registered with the snakValueStrategyFactory when wbui2025 is enabled
  • 'musical-notation' is removed from WBUI2025_UNSUPPORTED_DATATYPES (in Wikibase)
  • it is possible to add and edit statements with musical notation datatype
  • there is a test (in Score) that confirms the happy-path of adding and editing a statement

Event Timeline

Change #1223627 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Score@master] Add wbui2025 support for Score values

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

Change #1223638 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Export StringValueStrategy so it can be subclassed

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

Change #1224025 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Remove 'musical-notation' from WBUI2025_UNSUPPORTED_DATATYPES

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

Change #1224050 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Score@master] [WIP] Add cypress tests to Score extension

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

The attached changes enable the datatype. There is some limited unit-testing - the code introduced is not very complicated or dangerous, and I haven't gone to the trouble of retroactively adding tests for existing Score functionality.

I've also added end-to-end tests with Cypress. Because there is no shellbox-score container and lilypond is not installed in the CI docker images, actually rendering scores will not currently work, but we can test that the end-to-end integration is somewhat functional.

Change #1223638 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Export StringValueStrategy so it can be subclassed

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

Change #1223627 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Add wbui2025 support for Score values

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

Change #1224025 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove 'musical-notation' from WBUI2025_UNSUPPORTED_DATATYPES

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

Change #1224050 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Add cypress tests to Score extension

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