[go: nahoru, domu]

Page MenuHomePhabricator

Add icon-only support to ToggleButton
Closed, ResolvedPublic2 Estimated Story Points

Description

Regular Buttons detect when their only content is an icon, and make themselves square (32x32). ToggleButtons should also do this. Right now they don't, and icon-only ToggleButtons are wider than they are long (46x32). See https://doc.wikimedia.org/codex/latest/components/demos/toggle-button.html#stateful-icon-only

Screenshot from 2022-07-26 10-54-23.png (53×67 px, 553 B)
Screenshot from 2022-07-26 10-54-10.png (56×72 px, 599 B)
Regular buttonToggleButton

Event Timeline

CCiufo-WMF raised the priority of this task from Lowest to Medium.Jul 5 2023, 4:37 PM
CCiufo-WMF updated the task description. (Show Details)
CCiufo-WMF set the point value for this task to 2.

As part of this we should also land https://gerrit.wikimedia.org/r/c/design/codex/+/817814 , so that we can more easily share the icon-only detection code between Button and ToggleButton.

Change 817814 had a related patch set uploaded (by Catrope; author: Catrope):

[design/codex@main] Button, Tabs: Factor out common slot content analysis code

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

Change 949608 had a related patch set uploaded (by Catrope; author: Catrope):

[design/codex@main] Button: Move icon-only check into buttonHelpers

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

Change 949609 had a related patch set uploaded (by Catrope; author: Catrope):

[design/codex@main] ToggleButton: Add icon-only detection

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

Change 950199 had a related patch set uploaded (by Catrope; author: Catrope):

[design/codex@main] Button: Factor out warn-once logic into new useWarnOnce composable

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

Change 817814 merged by jenkins-bot:

[design/codex@main] Button, Tabs: Factor out common slot content analysis code

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

Change 949608 merged by jenkins-bot:

[design/codex@main] Button: Move icon-only check into its own composable

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

Change 950199 merged by jenkins-bot:

[design/codex@main] useIconOnlyButton: Factor out warn-once logic into new useWarnOnce composable

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

Change 949609 merged by jenkins-bot:

[design/codex@main] ToggleButton: Add icon-only detection

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

Design sign-off done, it LGTM. The only thing we should fix is the alignment of the icon within the button, but I guess this is part of a separate task. So moving this task to Pending Release.

Change 953351 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v0.17.0 to v0.18.0

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

Change 953351 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.17.0 to v0.18.0

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