Page MenuHomePhabricator

Use MenuGroups from Codex now it exists for our ModeSelector (move up/down/delete)
Closed, ResolvedPublic

Description

Codex now supports MenuGroups.

Use them in the ModeSelector and remove the custom styles

Event Timeline

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

[mediawiki/extensions/WikiLambda@master] ModeSelector.vue: use MenuGroups from Codex now it exists

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

DSmit-WMF changed the task status from Open to In Progress.Jan 23 2025, 2:08 PM
DSmit-WMF claimed this task.

Change #1113797 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ModeSelector.vue: use MenuGroups from Codex now it exists

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

Change #1113797 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ModeSelector.vue: use MenuGroups from Codex now it exists

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

This change added the message wkilambda-mode-selector-types-group-label: "Literals and resolvers".

A couple of questions about it:

  • "Literal" is generally a common word in programming, and there's even an entry for it in the glossary: https://www.wikifunctions.org/wiki/Wikifunctions:Glossary#literal . But what are "resolvers"?
  • The qqq documentation says: "Label for the literals and resolvers group in the Mode Selector". What is the Mode Selector? Or at least, what is a "mode" in this context? I have a vague guess about it, but it would be really nice to write a proper definition somewhere, for example in the Glossary.

Maybe its unclear. I followed a bit of the same style as the existing 'wikilambda-mode-selector-button-label'.
"wikilambda-mode-selector-button-label": "Label for the mode selector button for accessibility, available for screen readers. Clicking on the button opens a menu to let the user change what \"mode\" of Object this is.\n\n{{doc-wikilambda}}",
"wikilambda-mode-selector-types-group-label": "Label for the literals and resolvers group in the Mode Selector",
"wikilambda-mode-selector-delete-group-label": "Label for the delete item group in the Mode Selector",

With this change, the popover now contains groups. So there is a group with actions to move items in a list up or down (and delete).
The label you are talking about is the first group with the types to choose: a reference to an existing Object, an inline literal definition, or a function call.

Screenshot 2025-02-28 at 15.08.21.png (1×2 px, 431 KB)

Of course I am open to a suggestion to make it more clear. (maybe I should add at least that it is for screenreaders only).
"Label for a group in the popover action menu for accessibility, available for screen readers, that allows selecting a type: a reference to an existing object, an inline literal definition, or a function call."

Maybe its unclear. I followed a bit of the same style as the existing 'wikilambda-mode-selector-button-label'.
"wikilambda-mode-selector-button-label": "Label for the mode selector button for accessibility, available for screen readers. Clicking on the button opens a menu to let the user change what \"mode\" of Object this is.\n\n{{doc-wikilambda}}",

That's what I guessed. The problem is that I couldn't find a definition of "mode" anywhere. The best place for this definition would be the Glossary. If it's complicated to edit that page, you can write it here, and I'll add it.

With this change, the popover now contains groups. So there is a group with actions to move items in a list up or down (and delete).
The label you are talking about is the first group with the types to choose: a reference to an existing Object, an inline literal definition, or a function call.

Screenshot 2025-02-28 at 15.08.21.png (1×2 px, 431 KB)

Of course I am open to a suggestion to make it more clear. (maybe I should add at least that it is for screenreaders only).

I see that "Change what kind of Object this is: a reference to an existing Object, an inline literal definition, or a function call" is for screen readers, as its qqq already says.

Is "Literals and resolvers" also for screen readers only? In the screenshot, I see it only in the elements inspector, but it's not an aria-label attribute, like the "Change what kind of Object this".

In any case, the term "resolvers", like "mode", needs a definition in the glossary.

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

[mediawiki/extensions/WikiLambda@master] Add more descriptive explanations for the a11y labels of the ModeSelector buttons and groups

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

Change #1124827 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add more descriptive explanations for the a11y labels of the ModeSelector buttons and groups

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