Page MenuHomePhabricator

Create a configurable demo for MenuItem
Closed, ResolvedPublic

Description

Per Sarai's suggestion:

It would be really helpful if we added some configuration to the Default MenuItem, so users could try out its props: such as the ability to make it disabled, editing its label and description, removing or selecting a different icon (like with Button), removing or adding a thumbnail, and try out hideDescriptionOverflow.

Let's build a configurable demo for MenuItem to enable users to test out different props. If possible, we could remove some of the separate demos if we think the configurable demo sufficiently covers them.

Details

Related Changes in Gerrit:

Event Timeline

I'll wait until after T306581: Handle icons correctly in sample code generation merges to be able to configure the icon as well

STH triaged this task as Medium priority.May 17 2022, 5:53 PM

Change 793151 had a related patch set uploaded (by DannyS712; author: DannyS712):

[design/codex@main] docs, MenuItem: add configurable menu item demo

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

Change 793151 merged by jenkins-bot:

[design/codex@main] docs, MenuItem: add configurable menu item demo

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

This is nice! It would be great if we could make the configurable MenuIntem interactive. So it would display the selected, active and highlighted states, instead of presenting them in the table. But I believe this is conditioned by the current implementation approach, so all good and ready for sign-off.

EUdoh-WMF subscribed.

This component exists on the demo site, and is quite thorough with its testable features. Good work!

DAbad subscribed.

all good. closing