-
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
Unify DataViews Header Title & Subtitle #62429
Conversation
.components-heading { | ||
flex-grow: 1; | ||
flex-basis: 0; | ||
} |
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.
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: +400 B (+0.02%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
@jasmussen Thanks for the testing. This PR only works on the Patterns page. Because in the Pages and the Templates views, the DataView title is very short and cannot be changed by the user. |
I'm still doing something wrong, because I see the following in the patterns page: I appreciate the PR happy to give it a green check. But my main pushback remains: is there a way we can code this so it applies to all headings? The less custom CSS and custom classes we can get away with, the better. It might never be relevant on Page and Template sections, but in future tags and categories sections (#55083) it might again be. |
Sorry, I was wrong. It seems it wasn't working properly if the text contained spaces. Now it should work for any text. Additionally, I've applied the same styles to the Templates and the Pages. To test this, you'll need to change the text in your browser developer tools. In the future, we may be able to standardize headers across Patterns, Pages, and Templates to reduce the amount of CSS. |
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.
* Unify DataViews Patterns Header Title & Subtitle * Don't wrap text * Apply same logic to Pages, Templates Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
This PR achieves the following two things in the header of the Patterns page:
Truncate the title when it is extremely long
Before
After
Add a 4px gap between the title and subtitle, which makes the add button and subtitle less cramped
Before
After
Testing Instructions