-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stay in the selected inspector tab when switching blocks #55836
base: trunk
Are you sure you want to change the base?
Stay in the selected inspector tab when switching blocks #55836
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
I warned very early on about PRs like this for accessibility reasons. Some questions.
Always defaulting to the same tab offers all users a very predictable experience even though it may require an extra click at times. Thanks. |
This kind of comes down to a workflow issue. If your workflow is the one described - configure one type of setting sequentially for each block, then this is an improvement. If, on the other hand, your workflow is to fully configure each block as you go, then this is worse. I think we should prefer predictability (always opening the same tab) over presupposing a particular workflow. |
Would it make sense and is possible to set a default in the preferences? I, as a theme creator for example, would rather always have the styles tab open by default and are willing to accept extra clicks for opening the block settings. |
We already have a preference for the list view.
I could imagine a similar one for the block tab, like
@joedolson In general tend to agree with you. However, currently it feels like as if you were in the kitchen and every time you want to cut something you have to get a knife out of the drawer. And as you know, when cooking you'll use the knife a lot. I don't think this is a particular workflow, but essential for using the block editor. |
@hanneslsm Adding a preference would be an acceptable compromise but the least inaccessible option cannot be selected by default. Thanks. |
100% agree these things should be preferences someone can set. Also suggesting a related preference for the sidebar: #67698 |
Fixes #51104
What?
Why?
When building a template, it's common to go back and forth between blocks to adjust the same settings, like margins or other spacing. Having to navigate to the controls again and again is a source of friction.
How?
useLastSelectedInspectorControlTab
TabPanel
'sinitialTabName
andonSelect
props.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Gutenberg-remember-sidebar-tab.mov