WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#53521 closed defect (bug) (fixed)

On WP 5.8-beta4-51243 Site Health Status screen elements cannot be collapsed!

Reported by: alanjacobmathew Owned by: Clorith
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.8
Component: Site Health Keywords: has-patch
Focuses: ui, css Cc:

Description

v 5.8 beta4 Theme: Twenty Twenty One. Fresh install. No plugins

The Site Health Status screen elements cannot be minimized in the latest version.

Steps to reproduce:

1: Dashboard -> Home
2: click on site health status element collapse button

https://i.imgur.com/yTI1z37.png

Change History (6)

#1 @desrosj
6 months ago

  • Component changed from General to Site Health
  • Milestone changed from Awaiting Review to 5.8

Thanks @alanjacobmathew, moving to investigate.

#2 @Clorith
6 months ago

  • Version set to trunk

Appears this is caused by the new grid-style layout of the Site Health widget content, the CSS rule for #dashboard_site_health .inside is more specific than the .js .closed .inside (id takes priority over classes).

A specific rule for the Site Health CSS will probably need to be made here to account for #dashboard_site_health.closed .inside to apply the display: none here as well.

#3 @sabernhardt
6 months ago

  • Focuses css added
  • Keywords needs-patch added

Yes, the grid layout competes with display: none and wins.

Another option is editing the two selectors that specify grid layout to
#dashboard_site_health:not(.closed) .inside

This ticket was mentioned in PR #1439 on WordPress/wordpress-develop by walbo.


6 months ago

  • Keywords has-patch added; needs-patch removed

Create a wrapper around site health widget content that handles the css grid.

This fixes a problem with open/closing the widget because .inside is used to close the widget, but the site health css overwrote the css used to hide it.

Trac ticket: https://core.trac.wordpress.org/ticket/53521

#5 @Clorith
5 months ago

  • Owner set to Clorith
  • Resolution set to fixed
  • Status changed from new to closed

In 51247:

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.

#6 @prbot
5 months ago

Clorith commented on PR #1439:

Merged in [51247].

Note: See TracTickets for help on using tickets.