You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace ButtonGroup usage with ToggleGroupControl #65339
Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] Code QualityIssues or PRs that relate to code quality
All of our remaining usage of the ButtonGroup component is visually outdated as a segmented control and often inaccessibly implemented. We should correct this by replacing them with ToggleGroupControl.
How to submit PRs
To pick up a task, write your name by the checklist item or post a comment to this issue.
Please include before/after screenshots in the PR.
changed the title [-]Replace all remaining usage with ToggleGroupControl to correct styling consistency and accessibility issues.[/-][+]Replace ButtonGroup usage with ToggleGroupControl[/+]on Sep 13, 2024
@mirka I would like to work on the packages/block-editor/src/hooks/layout.js part of this issue. I am unsure of what component in the Editor LayoutTypeSwitcher is affecting so I have been unable to test that my change has not broken anything. I thought it might be the type size selector. See screenshot.
Thanks @mirka The conditional trick worked and I was able to test the update. I created the PR for the change: #65498
@jeryj and I had done some digging Tuesday and discovered what you did, that this code is no longer used in core blocks. I have a branch that removes this code all together. I'm not sure what the protocol is for removing "deprecated" code, if it should be removed at all for backwards compatibility.
@spadeshoe Thanks for the PR, we'll get it reviewed shortly!
I had done some digging Tuesday and discovered what you did, that this code is no longer used in core blocks. I have a branch that removes this code all together. I'm not sure what the protocol is for removing "deprecated" code, if it should be removed at all for backwards compatibility.
Although it isn't used in any of the blocks in core, it's still a supported block API so we'll need to keep it 👍
Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] Code QualityIssues or PRs that relate to code quality
Activity
[-]Replace all remaining usage with ToggleGroupControl to correct styling consistency and accessibility issues.[/-][+]Replace ButtonGroup usage with ToggleGroupControl[/+]hbhalodia commentedon Sep 17, 2024
Hi @mirka, I want to work on the first issue mentioned in the description.
Thank You,
hbhalodia commentedon Sep 17, 2024
Hi @mirka - Have raised the PR for the task 1 - #65386
Thank You,
spadeshoe commentedon Sep 17, 2024
@mirka I would like to work on the packages/block-editor/src/hooks/layout.js part of this issue. I am unsure of what component in the Editor LayoutTypeSwitcher is affecting so I have been unable to test that my change has not broken anything. I thought it might be the type size selector. See screenshot.
mirka commentedon Sep 18, 2024
@spadeshoe Good question! I don't think this code path is actually reached in any of our core blocks. So you can force the condition like this:
Then insert a Grid block, for example. And you'll see this:
spadeshoe commentedon Sep 19, 2024
Thanks @mirka The conditional trick worked and I was able to test the update. I created the PR for the change: #65498
@jeryj and I had done some digging Tuesday and discovered what you did, that this code is no longer used in core blocks. I have a branch that removes this code all together. I'm not sure what the protocol is for removing "deprecated" code, if it should be removed at all for backwards compatibility.
mirka commentedon Sep 24, 2024
@spadeshoe Thanks for the PR, we'll get it reviewed shortly!
Although it isn't used in any of the blocks in core, it's still a supported block API so we'll need to keep it 👍
t-hamano commentedon Dec 13, 2024
I believe all tasks are complete and would like to close this issue.
ciampo commentedon Dec 13, 2024
@mirka , anything left before being able to deprecate
ButtonGroup?Edit: nevermind, just seen #65429
mirka commentedon Dec 13, 2024
Last instance that I somehow missed: #67985