Editor: Hide cmd palette shortcut in document bar when admin bar is shown#79060
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: +44 B (0%) Total Size: 8.46 MB 📦 View Changed
|
|
This PR is doing two things, both meaningful changes to experience:
The title container still looks the same. Users will expect it to function the same. Have we considered visual changes to communicate behavioral changes? |
Yeah, you're right, it's not that simple. I think I'm going to play it safe for now -- just hide the shortcut icon as it's the most offending issue. |
|
Flaky tests detected in 9fde74d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27253890346
|
arthur791004
left a comment
There was a problem hiding this comment.
Make senses to me 👍
| padding-left: $grid-unit-30; | ||
| .editor-document-bar.has-shortcut & { | ||
| @include break-medium() { | ||
| padding-left: $grid-unit-30; |
There was a problem hiding this comment.
nit: would it be better to also change it to padding-inline-start?
There was a problem hiding this comment.
While that's semantically correct, I want to avoid doing unrelated changes to make the PR very focused 😄
|
For what it's worth, if we will be introducing the adminbar by default inside the editor, then it is worth mid-term to ponder a different interface than the current gray document title blob. From @fcoveram, we have some more breadcrumb-like elements. Not totally polished but looking in this direction:
|
|
PR makes sense btw. 👍 |
fushar
left a comment
There was a problem hiding this comment.
then it is worth mid-term to ponder a different interface than the current gray document title blob.
Yes, I agree this is not ideal. But I believe the current changes are good for short-term to fix an obviously broken visual. If/when the experiment graduates, we can try to consider better UI for this 😄
| padding-left: $grid-unit-30; | ||
| .editor-document-bar.has-shortcut & { | ||
| @include break-medium() { | ||
| padding-left: $grid-unit-30; |
There was a problem hiding this comment.
While that's semantically correct, I want to avoid doing unrelated changes to make the PR very focused 😄

What?
Follow-up to #77964
When the admin bar is shown in the editor (via the above experiment), the cmd-K icon is no longer necessary.
Why?
Because it's already present in the admin bar. Otherwise, there will be duplicate buttons with the same functionalities that are close by.
How?
Hide the cmd-K shortcut icon from the document bar component in such case.
Testing Instructions
Screenshots or screencast
Before
After
Use of AI Tools
I used Claude Opus 4.8 to help with the implementation.