Admin UI: ensure consistent header spacing with and without actions#76683
Admin UI: ensure consistent header spacing with and without actions#76683
Conversation
| } | ||
|
|
||
| .admin-ui-page__header-content { | ||
| min-height: 40px; |
There was a problem hiding this comment.
This magic number comes from here:
I'm not sure if we should try to match button (and compact or default size?) height with variables, or if this method is good enough?
There was a problem hiding this comment.
Oh, and compact buttons are 32px, but 40px accommodates normal-sized buttons too.
There was a problem hiding this comment.
We could use the DS size tokens that @jameskoster is working on in #76545
There was a problem hiding this comment.
I think the plan (#76709) is to enforce compact buttons, so I guess the value should be 32px. WDYT?
| z-index: 1; | ||
| } | ||
|
|
||
| .admin-ui-page__header-content { |
There was a problem hiding this comment.
Taking suggestions for better name since this doesn't actually consist everything, only most things. Notably, it excludes subtitle.
There was a problem hiding this comment.
Should we use css grid for the layout? Then I think we wouldn't need this container 🤔 Hacky codepen.
| style={ { width: 'auto', flexShrink: 0 } } | ||
| className="admin-ui-page__header-actions" |
There was a problem hiding this comment.
I could see moving these inline styles to the class, too. 🤔
There was a problem hiding this comment.
Yup, better to move them to inline styles
|
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: +208 B (0%) Total Size: 7.66 MB
ℹ️ View Unchanged
|
See design convo #76709
Follow-up to findings in title/breadcrumb size adjustment PR:
What?
Part of the changes suggested in:
Set consistent height for title + breadcrumbs + badge + actions row; previously, the row height would depend on whether there were actions or not, making the gap between title and subtitle inconsistent.
Also stops outputting the actions container if there are no actions.
Set consistent height for title + breadcrumbs + badge + actions row
All patterns
Before

After

Connectors
Before

After

Fonts
Before

After

Helps with the gap between the title row and the subtitle to always stay consistent regardless if there are actions or not.
Don't output actions container if there are no actions
Before

After

Why?
How?
Testing Instructions
Screenshots or screencast
Use of AI Tools