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
DocumentBar: Account for when top toolbar is open #61118
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: +33 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
className={ classnames( | ||
'edit-site-header-edit-mode__start', | ||
{ | ||
'is-opened': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a class here, maybe it's worth refactoring this to to add one or two classes to the edit-site-header-edit-mode
that can describe the whole state of the header?
One issue to watch ouf for here is that showTopToolbar
is about if the toolbar can render or not, not necessarily if it will. There are sometimes where the block toolbar could be rendered but won't, such as when editing a standalone navigation from the site editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just using the same existing conditions that is-collapsed
applies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a class here, maybe it's worth refactoring this to to add one or two classes to the edit-site-header-edit-mode that can describe the whole state of the header?
Perhaps so, as each start, center, end is affected by the toolbar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified the pr as such.
dc979ea
to
14de550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, is this a site editor only fix? The post editor doesn't suffer from the same issue? |
It does not, as long as command palette is contained to the site editor. |
@richtabor the command palette is not specific to the site editor, you can see the document bar when clicking "edit template". |
Ah, yes. It was never centered on the post editor then (like in the site editor, as seen here), so it doesn't have this issue (yet). |
Opened issue regarding a regresion: #61257 |
What?
Follow up as reported in #59134 (comment) to account for when the top toolbar is opened.
Testing Instructions
Screenshots or screencast