Site Health: Add a unique wrapper for dashboard widget content.

This wraps the inner-content of the Site Health dashboard widget to give a unique target for CSS selectors, restoring the ability to collapse the widget.

The initial implementation targeted the `.inside` class used by all widgets to apply styling to the widget content, but this prevented the widget from being collapsed, as it added grid-styles which other widgets do not use, overriding the usual behavior when toggling widget visibility.

Follow-up to [50833].

Props alanjacobmathew, walbo.
Fixes #53521.
Built from https://develop.svn.wordpress.org/trunk@51247


git-svn-id: http://core.svn.wordpress.org/trunk@50856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Clorith 2021-06-27 15:56:58 +00:00
parent d18f86031a
commit c26143ea2e
6 changed files with 63 additions and 61 deletions

View File

@ -307,7 +307,7 @@ are styled in the Privacy section of edit.css */
padding-right: 16px;
}
#dashboard_site_health .inside {
#dashboard_site_health .health-check-widget {
display: grid;
grid-template-columns: 1fr 2fr;
grid-auto-rows: minmax(64px, auto);
@ -319,7 +319,7 @@ are styled in the Privacy section of edit.css */
}
@media screen and (max-width: 480px) {
#dashboard_site_health .inside {
#dashboard_site_health .health-check-widget {
grid-template-columns: 100%;
}
}

File diff suppressed because one or more lines are too long

View File

@ -306,7 +306,7 @@ are styled in the Privacy section of edit.css */
padding-left: 16px;
}
#dashboard_site_health .inside {
#dashboard_site_health .health-check-widget {
display: grid;
grid-template-columns: 1fr 2fr;
grid-auto-rows: minmax(64px, auto);
@ -318,7 +318,7 @@ are styled in the Privacy section of edit.css */
}
@media screen and (max-width: 480px) {
#dashboard_site_health .inside {
#dashboard_site_health .health-check-widget {
grid-template-columns: 100%;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1909,6 +1909,7 @@ function wp_dashboard_site_health() {
$issues_total = $issue_counts['recommended'] + $issue_counts['critical'];
?>
<div class="health-check-widget">
<div class="health-check-widget-title-section site-health-progress-wrapper loading hide-if-no-js">
<div class="site-health-progress">
<svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
@ -1969,6 +1970,7 @@ function wp_dashboard_site_health() {
</p>
<?php endif; ?>
</div>
</div>
<?php
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-beta4-51246';
$wp_version = '5.8-beta4-51247';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.