-
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
Data views: Make title display in grid views consistent #57553
Conversation
Size Change: +864 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
@@ -222,7 +222,7 @@ export default function PagePages() { | |||
<VStack spacing={ 1 }> | |||
<View | |||
as="span" | |||
className="edit-site-page-pages__list-view-title-field" | |||
className="dataviews-view-grid__title-field" |
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.
This makes the dataviews-view-grid__title-field
a public API. We need dataviews to handle it based on what's the primary field instead.
@@ -165,7 +165,9 @@ function Title( { item, categoryId } ) { | |||
) } | |||
<Flex as="span" gap={ 0 } justify="left"> | |||
{ item.type === PATTERN_TYPES.theme ? ( | |||
item.title | |||
<span className="dataviews-view-grid__title-field"> |
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.
Same comment as (also for changes below) https://github.com/WordPress/gutenberg/pull/57553/files#r1445053840
@@ -103,7 +103,7 @@ function TemplateTitle( { item, viewType } ) { | |||
|
|||
return ( | |||
<VStack spacing={ 1 }> | |||
<View as="span" className="edit-site-list-title__customized-info"> | |||
<View as="span" className="dataviews-view-grid__title-field"> |
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.
What?
Updates some styles and classes to make it easier to apply consistent styles to titles in grid layouts. Also fixes title truncation.
Why?
Currently the titles in the pattern management view are inconsistent with the ones in pages and templates.
How?
Apply a new css class (
.dataviews-view-grid__title-field
) in the relevant locations, and add styles topackages/dataviews/src/style.scss
.Testing instructions
Before
Templates
Pages
Patterns
After
Templates
Note: Fixed truncation.
Pages
Note: Fixed truncation.
Patterns
Note: Consistent title color, weight, decoration. Here items that do not function as links have the default
font-weight
.