WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 13 months ago

Last modified 2 months ago

#26021 closed enhancement (wontfix)

MP6: Custom color schemes don't apply to frontend admin bar.

Reported by: bpetty Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Toolbar Keywords: has-patch
Focuses: ui Cc:

Description

While the custom color schemes apply to the admin bar while in the administration backend, the admin bar reverts back to the default colors on any frontend pages while logged in.

Attachments (1)

26021.patch (541 bytes) - added by sagarprajapati 5 years ago.

Download all attachments as: .zip

Change History (21)

#1 @bpetty
8 years ago

I've made an attempt to fix this myself, but can't seem to wrap my head around how these custom color scheme styles should be enqueued in the frontend for the admin bar, so I'm leaving this to someone more qualified.

#2 @helen
8 years ago

This was on purpose - color clashing, not loading color schemes on the front, etc.

#3 @SergeyBiryukov
8 years ago

  • Keywords needs-patch removed
  • Milestone 3.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#4 @nacin
8 years ago

#26711 was marked as a duplicate.

#5 @johnbillion
6 years ago

  • Component changed from Administration to Toolbar
  • Focuses ui added
  • Keywords needs-patch added
  • Milestone set to Awaiting Review
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Type changed from defect (bug) to enhancement

We should re-visit this. It's jarring when you visit the front end of your site and the admin toolbar colour scheme changes.

Relevant plugin: https://wordpress.org/plugins/admin-bar-color/

#6 follow-up: @knutsp
6 years ago

-1
I would not want the front toolbar colors to default to the admin toolbar colors.
Plugin material.

#7 in reply to: ↑ 6 @johnbillion
6 years ago

Replying to knutsp:

I would not want the front toolbar colors to default to the admin toolbar colors.

Why not?

#8 @knutsp
6 years ago

The admin toolbar relates to the complete admin color scheme. The front toolbar has to relate to the theme and be visually different. One should not confuse the toolbar with the theme design. The default is dark, and that goes well with most themes. There is no risk of color clash.

Today you may select the admin color scheme completely independent of the site theme, and choose form predefined schemes available. It may come with a deep blue admin toolbar. On the front there may be another kind of blue, and those blue variants may not look good together. So I would have to design my own admin theme with a toolbar that matches the site theme, which may not look good with the rest of the admin theme, and so on. It's a mixup.

In short: The aesthetics will suffer. So please leave this to a plugin.

#9 @DrewAPicture
6 years ago

  • Keywords close added

I'm also -1 on matching the front-end styles for all of the reasons outlined in previous comments. Suggest wontfix.

#10 @morganestes
6 years ago

  • Keywords needs-patch removed
  • Resolution set to wontfix
  • Status changed from reopened to closed

Based on the comments and the fact that there's a plugin available to accomplish this, I'm going to close this for now.

#11 @netweb
6 years ago

  • Milestone Awaiting Review deleted

Sitting on the fence here, I see pros and cons on both sides of this ¯\_(ツ)_/¯

Though, as it's now been closed I'm pulling the milestone :)

#12 @ocean90
5 years ago

#38687 was marked as a duplicate.

#13 @zodiac1978
5 years ago

Some people (like me) are using the color schemes to remind me that I'm using the dev or staging system. For this case it would be helpful to have the color scheme used on the frontend.

(Just to add a real use case reason for changing this behavior.)

#14 @SergeyBiryukov
5 years ago

#40312 was marked as a duplicate.

#15 @sagarprajapati
5 years ago

  • Keywords has-patch added; close removed

Right point @zodiac1978

I have always use the color schemes to remind the dev or staging system. I have attached patch for the solution of above issue. Please check it.

Thanks

#16 @msaggiorato
2 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Version 3.8 deleted

I think we should revisit this.

I'm also one of the people using color schemes to identify different environments, and having the frontend admin bar not respect the set admin_color setting, is confusing (even not in this use case, for consistency reasons).

Not sure if the patch works nicely with the current version of WP, but we should at least reopen the conversation about this.

Thanks

#17 @zodiac1978
23 months ago

If someone looks for a solution, there is this plugin:
https://wordpress.org/plugins/contextual-adminbar-color/

From the description:

Since WordPress Core will probably deprecate alternate admin color schemes in mid-term, this plugin is meant to be use by those who rely on colors to know is they are in staging, preproduction or production environment.

#18 @desrosj
13 months ago

  • Resolution set to wontfix
  • Status changed from reopened to closed
  • Version set to 3.8

While there are valid use cases here and fixing this does not appear to require a large amount of code, nothing I've presented here, in my opinion, has been enough to overrule the original design decision.

Another way to indicate the environment type for a site would be to add an individual node in the admin bar with a specific color, similar to how Query Monitor shows an admin bar item that is red if there are PHP errors reported.

I think the use cases also fall well outside of the 80/20 rule.

Because there are two plugins that solve this issue (both of which still work), I'm going to close this out again.

One note: the version field is used for specifying the first version of WordPress that is affected by the issue reporting. Since MP6 was merged in 3.8, changing that back.

#19 @johnbillion
12 months ago

#51674 was marked as a duplicate.

#20 @dlh
2 months ago

#53862 was marked as a duplicate.

Note: See TracTickets for help on using tickets.