-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[not verified] Refactor post list thumbnail preview to function serve…
…r side. All javascript removed. (#21126) * Reworking post-list thumbnails to be server side. * Added changelog file. * Added CSS and placeholder image for empty thumbnails. * CSS fix placeholder disappearing. * Updated unit tests. Added alt tag to thumbnail image. * Updated comments. * Added rtl.css. * Don't add thumbnail column if 'title' is missing for some reason. * Add thumbnails to "Pages" admin table. Removed unused class name from thumbnail img. * Created add_thumbnail_filters_and_actions and moved column filter and action out of enqueue_scripts and into current_screen. * Removed unused in_admin_footer action.
- Loading branch information
1 parent
37a00a0
commit 4f55cf1
Showing
9 changed files
with
205 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Refactored to function server side. All javascript removed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* Pull "Title" header name over in "Thumbnail"s place. */ | ||
th.column-thumbnail + th a { | ||
margin-right:-60px; | ||
} | ||
|
||
/* If thumbnail column has .hidden class. The entire column is toggled off. Don't pull "Title" header name over. */ | ||
th.column-thumbnail.hidden + th a { | ||
margin-right:0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
/* Set the width of the thumbnail column */ | ||
.column-thumbnail { | ||
width: 50px; | ||
} | ||
|
||
.post-featured-image__container { | ||
float: left; | ||
margin-right: 5px; | ||
/* Style the thumbnail image. */ | ||
.column-thumbnail img { | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 4px; | ||
} | ||
|
||
.post-featured-image__container .post-list__post-featured-image { | ||
width: 48px; | ||
height: 48px; | ||
fill: #ccc; | ||
/* Style the Dashicon placeholder for empty thumbnails. */ | ||
.column-thumbnail .dashicons { | ||
font-size: 50px; | ||
width: 50px; | ||
height: 50px; | ||
background: #c3c4c7; | ||
border-radius: 4px; | ||
color: #f6f7f7; | ||
} | ||
|
||
/* Keep data-colname from appearing on mobile view. */ | ||
.column-thumbnail::before { | ||
content: "" !important; | ||
} | ||
|
||
/* Move the "Thumbnail" and "Title" columns closer together. */ | ||
th.column-thumbnail { | ||
padding-right:0; | ||
} | ||
|
||
/* Don't display the "Thumbnail" column name in the header or footer. */ | ||
th.column-thumbnail span { | ||
display:none; | ||
} | ||
|
||
/* Pull "Title" header name over in "Thumbnail"s place. */ | ||
th.column-thumbnail + th a { | ||
margin-left:-60px; | ||
} | ||
|
||
.post-list__post-featured-image .components-popover__content { | ||
padding: 5px; | ||
/* If thumbnail column has .hidden class. The entire column is toggled off. Don't pull "Title" header name over. */ | ||
th.column-thumbnail.hidden + th a { | ||
margin-left:0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.