Page MenuHomePhabricator

[MEX][Score] Display Lilypond errors for statement values
Closed, ResolvedPublic

Description

Errors for musical notation (Lilypond notation) are shown only after saving, due to technical limitations of how the extension works.

When there is an error, display a message instead of the snak value and show the full Lilypond error in a tooltip.
note: Tooltips will be introduced in the work for WikibaseQualityConstraints, in T411608

image.png (1,079×619 px, 101 KB)

Figma file

Acceptance Criteria

  • Notice of the Lilypond compilation error is shown in place of the snak value, matching the design in Figma
  • The full lilypond error is shown in a tooltip after tapping on the error icon, matching the design in Figma
  • In case the music notation has an error, a generic error message should be showing "Unable to display the value".
  • In the popover, the error message should be displayed as a full message (it would be nice to not have the red background in the error).
  • The popover is triggered on click.
  • Option 4 should be implemented (the html parsing is not considered).

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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

[mediawiki/vendor@master] Bump wmde/php-vuejs-templating to 2.2.0-beta.9

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

Change #1228436 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wmde/php-vuejs-templating to 2.2.0-beta.9

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

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

[mediawiki/extensions/Wikibase@master] POC: Make popover contents a list of refs of lists

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

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

[mediawiki/extensions/Wikibase@master] WIP: Display LilyPond errors in popover

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

I think Display LilyPond errors in popover is ready for review; the other changes can be abandoned later.

hoo removed hoo as the assignee of this task.Feb 5 2026, 7:50 PM
hoo subscribed.

I didn't test this with actual Lilypond errors, but manually changed my set up to emit the error-html.

Change #1234337 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Display LilyPond errors in popover

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

Change #1224980 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Wikibase@master] WIP: Display LilyPond errors in popover

Reason:

superseded by Ibd71713995

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

Change #1230966 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Wikibase@master] POC: Make popover contents a list of refs of lists

Reason:

superseded by Ibd71713995 (I think sooner or later a reactive version of the constraint indicators would still be useful, but we can figure that out later)

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

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

[mediawiki/extensions/Score@master] Update Cypress test for Wikibase change

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

Change #1242357 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Update Cypress test for Wikibase change

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

Some issues were found during the inspection (mostly related to UX):

  • The popover doesn't have a heading text (well, it has, it but doesn't show up) .. tested locally and test wikidata.
  • The popover error block should not have the error icon, it should be placed in the header to match the task Figma designs (low priority).
  • The width of the popover shows incorrect alignment (discussed on the task T417645) and might fall in the other task's scope.

Screenshot:

image.png (532×774 px, 83 KB)

Will move it back to "Ready for development"

Yes, we’re just showing the whole error block from the Score extension without “dissecting” it in any way. I think we discussed this in some story time meeting and agreed that it was okay? But I’m not sure… maybe something to discuss when Alice comes back.

@Lucas_Werkmeister_WMDE Yes, you are right .. I remember it (I thought it was only in my head since it was not mentioned in the description), I've edited my comment to discard this one.

My comment also applies to the first bullet point – the “intended” heading text, “Unable to compile LilyPond file”, is also part of the error block from the Score extension. I don’t think we should just duplicate it.

I thought the heading text should be "Issues", and the sub-heading "Unable to compile LilyPond input file:" could be part of the error message.
That's from the screenshots provided in the task, not sure if is it outdated or valid.

I think the Figma design and screenshots are generally outdated following our decision to display the Score error as a full block – I’d prefer to hear from Alice first if this is okay or not before adding a title.

Some issues were found during the inspection (mostly related to UX):
The popover doesn't have a heading text (well, it has, it but doesn't show up) .. tested locally and test wikidata.
The popover error block should not have the error icon, it should be placed in the header to match the task Figma designs (low priority).
The width of the popover shows incorrect alignment (discussed on the task T417645) and might fall in the other task's scope.

Dear @Alice.moutinho , Could you please verify the previous mentioned issues from the comments from the UX perspective?
Thank you!

Review: There are two open questions:

  1. The popover doesn't have a heading text (well, it has, it but doesn't show up) .. tested locally and test wikidata.

Should there be a header in addition to the Lilypond error block ? Or are we okay with only displaying the error block?

  1. The width of the popover shows incorrect alignment (discussed on the task T417645) and might fall in the other task's scope.

Did T417645 resolve the alignment issue ?

Ideally it would be good to have something closer to the design, so that the only box contained in the modal is the message with the lilypond error; with the icon and header outside and above like it is in the design.

If this is not possible, whoever picks this up can have a quick call with Alice to work through the possibilities.

If there is no clear solution after discussing with Alice, we can move this to M5 as it's currently functional (although not ideal) and shouldn't be blocking us from M4

Change #1268593 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Wikibase@master] Add options override option to indicator popover

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

Change #1268595 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Score@master] Add options override option to indicator popover

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

I've tried to address both concerns by adding custom options/overrides to popover indicator, therefore it can be used by other extensions.

(Reassigning back to Hasan as I don’t think I have anything to add at the moment beyond my review comments from 9 April.)

Peer review findings:
1- The popover header doesn't have the icon, but the icon is placed inside the Lilypond errors block (there is an icon but not visible).
2- The width of the popover still shows incorrect alignment.

Screenshot:

image.png (519×1,107 px, 117 KB)

Change #1268595 abandoned by Hasan Akgün (WMDE):

[mediawiki/extensions/Score@master] Add options override option to indicator popover

Reason:

Change of approach

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

Change #1268593 abandoned by Hasan Akgün (WMDE):

[mediawiki/extensions/Wikibase@master] Add options override option to indicator popover

Reason:

Change of approach

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

Hi @HasanAkgun_WMDE is there a new patch for the solution we should look into?
I'm not able to find it and the old patches are abandoned.

Change #1289411 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Score@master] Add custom error popover formatter

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

Change #1289410 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Wikibase@master] Add error popover formatter support

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

Hi @HasanAkgun_WMDE is there a new patch for the solution we should look into?
I'm not able to find it and the old patches are abandoned.

Sorry @mahmoud.abdelsattar.wmde , I wasn't aware but it's fixed now. There are some recommended changes and investigation, I will add handover notes soon.

Handover Notes

What is this ticket about (tl;dr style)?
We're trying to find a way to fix how Lilypond errors seem on new MEX UI.

Where did you leave off?
I've abandoned previous patches and created 2 new ones.

  • On Wikibase side, the patch itself makes it possible to register a custom error popover formatter, so any extension can use it to format what it puts inside the popover content and title areas.
  • On Score side, the patch uses this new extension method.

What were your intended next steps?
During mob review with @ArthurTaylor and @Lucas_Werkmeister_WMDE , since I've hardcoded error HTML inside scoreValueStrategy.spec.js , if the populated codex code changes that test could fail and block CI.

So, this is the next thing to address. Other than that there's a concern about efficiency of Wikibase patch, but it's not a priority and probably can be deferred.

During mob review with @ArthurTaylor and @Lucas_Werkmeister_WMDE , since I've hardcoded error HTML inside scoreValueStrategy.spec.js , if the populated codex code changes that test could fail and block CI.

Done in PS5 of the Score change.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Score/+/1289411 is the most recent patch, from Lucas, which once reviewed should complete the entire ticket

Change #1289410 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add error popover formatter support

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

Change #1289411 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Add custom error popover formatter

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