Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40529 closed defect (bug) (fixed)

Improve the Dashboard News widget no-js notice

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-screenshots has-patch
Focuses: ui Cc:


When JS is off, the News widget displays a notice:

In a few other places in the admin, these kind of notices use the CSS notices styling:

It would be nice, for consistency, to use the same styling.

Attachments (2)

40529.diff (2.2 KB) - added by afercia 7 years ago.
40529.2.diff (2.1 KB) - added by afercia 7 years ago.

Download all attachments as: .zip

Change History (7)

7 years ago

#1 @afercia
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to afercia
  • Status changed from new to assigned

Screenshot with the patch applied:

Couple notes:

I'd propose to remove the overflow: hidden property set on the form for the configurable widgets, because the focus style around focusable elements gets cut-off:

The patch uses the CSS class wp-clearfix instead of overflow: hidden

The patch removes the selector #dashboard_primary .dashboard-widget-control-form because it targets the configurable widgets form: the News widget (#dashboard_primary) is not configurable any longer since the Dashboard redesign, so this selector seems a leftover. See [26144] and [26230]

It was used in WordPress 3.7 and before, for the Primary feed (Dev Blog) Widget. At that time, the News widget was the Secondary Feed (Planet) Widget. Screenshot from WordPress 3.7:

To test:

  • disable JavaScript in your browser
  • delete the widget transient, on VVV this can be quickly done via vagrant ssh and then using wp transient delete --all

#2 follow-up: @afercia
7 years ago

Could also use the normal notice, without notice-alt. For comparison:


Normal notice:

Alternative notice style:

#3 in reply to: ↑ 2 @SergeyBiryukov
7 years ago

Replying to afercia:

Could also use the normal notice, without notice-alt.

Normal notice looks better to me and more consistent with other instances.

7 years ago

#4 @afercia
7 years ago

Refreshed patch to use the default notice styling.

#5 @afercia
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40556:

Widgets: Improve the News dashboard widget no-js notice.

In the rare case this notice was displayed, it was unstyled. Uses the notice
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.

Fixes #40529.

Note: See TracTickets for help on using tickets.