-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataViews: Fix some small issues with featured image #58371
Conversation
position: relative; | ||
background-color: $gray-100; | ||
overflow: hidden; | ||
flex-grow: 0 !important; |
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.
These styles were just moved, except for this added line. In general I'm not very fond of the styles we're adding because of the need to have a wrapper(dataviews-view-table__cell-content-wrapper
) with display:flex
, in table view.
<span | ||
className={ { | ||
<button | ||
className={ classNames( 'page-pages-preview-field__button', { |
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 was just a bug, that we weren't calling classNames
.
@@ -162,31 +170,27 @@ function FeaturedImage( { item, viewType } ) { | |||
} ); | |||
const hasMedia = !! item.featured_media; | |||
return ( | |||
<span | |||
className={ { | |||
<button |
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 changes here are just the removal of the span
wrapper.
Size Change: +31 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Flaky tests detected in 8ec4e1f005b1d952f7e3f80f7722d66bae4a57af. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7694815630
|
8ec4e1f
to
0040299
Compare
I think so too. I believe we shouldn't have a required
Besides the featured image(which is something to discuss for the above point), they should and they do in templates lists and patterns. There seems to be an issue for pages list, that I'll investigate. Both issues though should be follow ups. |
@@ -42,4 +15,32 @@ | |||
// Windows High Contrast mode will show this outline, but not the box-shadow. | |||
outline: 2px solid transparent; | |||
} | |||
|
|||
&.edit-site-page-pages__media-wrapper { | |||
width: $grid-unit-40; |
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.
width and height were also updated to use $grid-unit-40
instead of $grid-unit-50
.
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.
LGTM, but should featured image remain a hidden field of the table layout, or would users prefer to have it displayed by default?
It seems we intend to stick to having it hidden and I think there are suggestions to remove it completely, or at least use it as part of a 'summary' field alongside with title, etc.. |
@ntsekouras I'm seeing some peculiar behavior with the preview field on the templates page in list layout. Could it be related to this PR? 🤔 |
Yes and no :). My PR exposed an existing bug. Thanks for catching it! I opened a follow up here: #58400 |
What?
Currently if we are in the
Manage all pages
page and intable
view, we cannot select thefeatured image
field to be shown.Additionally I'm removing an extra wrapper we had for the featured image and fixed a bug, where we weren't adding a css class conditionally.
Testing Instructions
Manage all pages
pagefeatured image
field through the options when intable
view. Verify that is displayed as should. Noting that the column cannot be smaller due to the field'sheader
.featured image
field is displayed as expect in the other views(list and grid).