WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 8 months ago

#41138 assigned enhancement

Add classes to Widgets in widgets.php and customize.php pages

Reported by: alexvorn2 Owned by: audrasjb
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Widgets Keywords: needs-patch
Focuses: ui, administration Cc:

Description

Add widget base id class to widgets so developers could add custom CSS styles to their custom widgets.

Currently the widgets have only "widget" class and "ui-draggable".

What do you think? I think it's a great idea to highlight custom widgets with different colors, so users can easily find new installed widgets from plugins. (Maybe some one with have other purposes)

Attachments (1)

widget-background-color.png (70.3 KB) - added by alexvorn2 3 years ago.
like this

Download all attachments as: .zip

Change History (9)

@alexvorn2
3 years ago

like this

#1 @SergeyBiryukov
3 years ago

  • Focuses ui administration added

#2 @welcher
3 years ago

  • Keywords ui-feedback added

I think this could easily become a visual nightmare. Love to get some UI/UX input on this.

#3 @alexvorn2
3 years ago

Widgets are becoming more and more, we need to do something because finding the new installed widget from a custom plugin - is not so easy.

#4 @welcher
3 years ago

Perhaps, but if we add a class with the intent of differentiating via colors determined by the plugin author, then we are in the same situation but now all the widget have different colors. So the experience ( in the worst-case ) would be confusing AND ugly.

I certainly like the idea of making it easier to see new widgets, but am not sold on this specific approach.

Last edited 3 years ago by welcher (previous) (diff)

This ticket was mentioned in Slack in #design by joshuawold. View the logs.


22 months ago

#6 @JoshuaWold
22 months ago

We chatted about this in our #design triage. Because Gutenberg Phase 2 is rethinking parts of the WordPress interface, including widgets, it's likely helpful to circle back on this as part of that decision, or after that's been suggested.

At this stage one recommendation is to consider how Custom Gutenberg blocks are being introduced. Many block authors are creating simple icons to go along with their block, to make discoverability easier. That could work here.

#7 @karmatosed
11 months ago

  • Keywords ui-feedback removed

#8 @audrasjb
8 months ago

  • Keywords needs-patch added
  • Owner set to audrasjb
  • Status changed from new to assigned

Hi,

I think it's always a nice thing to add some classes to elements containers. Indeed, it can be used to make things ugly, but that’s the same for each part of WordPress admin.

I believe adding a class that meets the front-end widget class is a best practice that should be encouraged everywhere it's possible. Working on a patch right now.

Note: See TracTickets for help on using tickets.