Columns block: Don't use ToolsPanelItem for Columns setting#70210
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +1 B (0%) Total Size: 1.85 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 022bece. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/15236120082
|
…s#70210) Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: fabiankaegy <[email protected]>
What?
ToolsPanelinstead ofPanelBody#67918Why?
Because the "Columns" setting is not a block attribute but represents the actual number of columns, it is difficult to define what the default is. Furthermore, if we reset the Columns setting, we lose focus.
How?
There are several possible approaches, but I think it's better not to use
ToolsPanelItemfor this setting. This will prevent the reset, and there's no need to add a new API to theToolsPanelItemcomponent itself.Testing Instructions
Screenshots or screencast