Page MenuHomePhabricator

MPIC: Build a button with dropdown component
Closed, ResolvedPublic5 Estimated Story Points

Description

T360731

Description

The Codex component Menu currently only provides dropdown capability for text and select inputs.

Per wireframes, we need to build a button with a dropdown component that will provide an action menu for each instrument in the Catalog view.

Screenshot 2024-04-09 at 1.24.04 PM.png (1×2 px, 246 KB)

Developer Notes

The Abstract Wikipedia team implemented this feature - see https://www.wikifunctions.org/view/en/Z10012 and click on 3 dots in the Try this function section:

Screenshot 2024-05-03 at 1.36.48 PM.png (1×2 px, 264 KB)

I think this is where the code lives for this component:
https://github.com/wikimedia/mediawiki-extensions-WikiLambda/blob/b04677247beacbf95387225a1c37c8ca60ebb4bc/resources/ext.wikilambda.edit/components/base/ModeSelector.vue#L2

Acceptance Criteria

  • An action menu with custom links is made available when hovering over the 3 dot menu icon
  • Each link in the action menu navigates correctly. Separate ticket T364179
  • If possible, contribute back the component to Codex.

Required

  • Unit/Integration tests?
  • Documentation?
  • Passed QA?

Event Timeline

cjming triaged this task as High priority.Apr 25 2024, 4:06 AM
cjming created this task.

Change #1032560 had a related patch set uploaded (by Milimetric; author: Milimetric):

[design/codex@main] MenuButton: implement new component

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

Change #1032560 merged by jenkins-bot:

[design/codex@main] MenuButton: implement new component

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

Change #1037103 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w

Change #1037103 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w/

Marking as done - MenuButton component was included in Codex's v1.7.0 which was released today