WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#40529 closed defect (bug) (fixed)

Improve the Dashboard News widget no-js notice

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

Description

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

https://cldup.com/UfGCTzhlov.png

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

https://cldup.com/Y5biDjOOq4.png

https://cldup.com/f30NL2KvmE.png

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

Attachments (2)

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

Download all attachments as: .zip

Change History (7)

@afercia
2 years ago

#1 @afercia
2 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:

https://cldup.com/T4brWaD0A7.png

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:

https://cldup.com/W4v_qGIFYQ.png

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:

https://cldup.com/j3BhvaPG4J.png

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
2 years ago

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

Current:

https://cldup.com/UfGCTzhlov.png

Normal notice:

https://cldup.com/oUW_1P4ZBd.png

Alternative notice style:

https://cldup.com/T4brWaD0A7.png

#3 in reply to: ↑ 2 @SergeyBiryukov
2 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.

@afercia
2 years ago

#4 @afercia
2 years ago

Refreshed patch to use the default notice styling.

#5 @afercia
2 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.