Page MenuHomePhabricator

Use default component in Metadata dialog for displaying expected/actual values
Closed, ResolvedPublic

Assigned To
Authored By
DVrandecic
Feb 29 2024, 8:45 PM
Referenced Files
Restricted File
Nov 28 2025, 1:33 PM
F70711569: Screenshot 2025-11-28 at 14.26.06.png
Nov 28 2025, 1:26 PM
F70711568: Screenshot 2025-11-28 at 14.25.54.png
Nov 28 2025, 1:26 PM
F70711567: Screenshot 2025-11-28 at 14.26.12.png
Nov 28 2025, 1:26 PM
F70708718: Screenshot 2025-11-28 at 10.54.43.png
Nov 28 2025, 9:55 AM
F70708717: Screenshot 2025-11-28 at 10.54.48.png
Nov 28 2025, 9:55 AM
F42263179: Screenshot 2024-02-29 at 12.44.24.png
Feb 29 2024, 8:45 PM

Description

For example, go here:

https://www.wikifunctions.org/view/en/Z10096

On the test
'ora per poi io preparo' is palindrome
the tests fail. Click on the (i) to get the Metadata dialog for the failed test.

It states:

Expected result: { "Z1K1": "Z40", "Z40K1": "Z41" }
Actual result: { "Z1K1": "Z40", "Z40K1": "Z42" }

Screenshot 2024-02-29 at 12.44.24.png (1,050×1,324 px, 122 KB)

Instead of the JSON of the ZObjects, we should use the default component to display the object (which would use the renderers)

Event Timeline

Jdforrester-WMF renamed this task from Use default component in Metadata dialog to Use default component in Metadata dialog for displaying expected/actual values.Mar 7 2024, 5:37 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

@gengh Mentioned a while ago that we are not displaying the errors using components on purpose. To make it easier for people to debug. can you confirm that Geno?

No, that's not the case.

We are displaying the object as it comes to make it easier to debug, instead of hardcoding functions that stringify results (e.g. I remember we spoke about this due to a special case that rendered the Z11K2 of a monolingual instead of showing it full)

In this case, we weren't using the default component to avoid bulkiness in this dialog, but we could if we find a way to make it look "good"

I am thinking what edge cases there can be. I would opt for a toggle to switch between rendered and json? I could sketch up something for that

A proposal for this. Perhaps should be checked/improved by @gonyeahialam or @JSengupta-WMF

Screenshot 2025-11-28 at 10.54.48.png (1,128×1,804 px, 179 KB)

Screenshot 2025-11-28 at 10.54.43.png (1,120×1,882 px, 172 KB)

Change #1212533 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] MetadataDialog: use default component in Metadata dialog for displaying expected/actual values

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

With long items:

Also I prefer adding it to the code editor for readability and scanability !

Screenshot 2025-11-28 at 14.25.54.png (876×2,082 px, 370 KB)
Screenshot 2025-11-28 at 14.26.12.png (946×2,114 px, 262 KB)
{F70711654}
View componentView raw json as textView raw json in code editor (readonly)

A proposal for this. Perhaps should be checked/improved by @gonyeahialam or @JSengupta-WMF

Screenshot 2025-11-28 at 10.54.48.png (1,128×1,804 px, 179 KB)

Screenshot 2025-11-28 at 10.54.43.png (1,120×1,882 px, 172 KB)

Without going too much into detail, using toggle component will work in this case. However, there are some quick improvements/Codex adaptation that will make the UI more intuitive and reduce design debt. Here's a proposal:
https://www.figma.com/design/ND0eb8Ub30XxWMCZRSwZCk/T358807-Displaying-expected-actual-values-in-Metadata-dialog?node-id=1-3835&t=Uxno1reMgk6PzsZh-1

Does clicking the links "true" or "false" take the user to another view? Or is it just to highlight the result?

True will link to Z40 or Z41 page of boolean true or false.

Change #1212533 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] MetadataDialog: use default component in Metadata dialog for displaying expected/actual values

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