Make WordPress Core

Opened 11 years ago

Closed 4 years ago

Last modified 2 years ago

#26021 closed enhancement (wontfix)

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

Reported by: bpetty's profile 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 8 years ago.

Download all attachments as: .zip

Change History (23)

#1 @bpetty
11 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
11 years ago

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

#3 @SergeyBiryukov
11 years ago

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

#4 @nacin
11 years ago

#26711 was marked as a duplicate.

#5 @johnbillion
10 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
10 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
10 years ago

Replying to knutsp:

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

Why not?

#8 @knutsp
10 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
10 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
9 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
9 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
8 years ago

#38687 was marked as a duplicate.

#13 @zodiac1978
8 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
8 years ago

#40312 was marked as a duplicate.

#15 @sagarprajapati
8 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
5 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
5 years 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
4 years 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
4 years ago

#51674 was marked as a duplicate.

#20 @dlh
4 years ago

#53862 was marked as a duplicate.

#21 @sabernhardt
2 years ago

#56572 was marked as a duplicate.

#22 @elyograg
2 years ago

The "Contextual Adminbar Colors" plugin works well.

While I understand that this was intentional, would it be possible to add an option to the Profile, next to the place where the admin color scheme is chosen, saying something like "Also use Admin Color Scheme on non-admin pages"? That way the default that you're aiming for won't be affected, but those who want the color scheme everywhere can get what they are after. It could even have a little warning saying something like "This option may cause problems with visibility of the toolbar."

Note: See TracTickets for help on using tickets.