Problem/Motivation

The fgColor is not being changed in different environments. This seems to be because of a change in the HTML structure on the toolbar. Not sure if it's just us or not.

Steps to reproduce

Go to /admin/config/development/environment-indicator/current
Change the foreground color to anything.
Save
Clear Cache
Notice that your foreground color (text color) is never updated.

Proposed resolution

Merge this merge request to fix this.

Remaining tasks

Test via tugboat or other method.
Determine if any blocking issues with merge request.
Merge

User interface changes

You can now use the foreground color setting to set the color of the text in the toolbar.

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

edmund.dunn created an issue. See original summary.

balagan’s picture

StatusFileSize
new1.71 KB

With D10.3.1 this is what works for me.

thomwilhelm’s picture

Having the same issue after going from 4.0.18 to 4.0.19 whilst on Drupal 10.2, seems like the change in this issue caused the regression for me:

https://www.drupal.org/project/environment_indicator/issues/3456599

loopy1492’s picture

Status: Active » Reviewed & tested by the community

Onlu the active button was really affected for us. I applied the patch from #2 and it fixed the problem for us:

core: 10.3.1
environment_indicator: 4.0.19

trackleft2 made their first commit to this issue’s fork.

trackleft2’s picture

Title: fgColor not being picked up. » Foreground color setting broken for toolbar integration.
Priority: Normal » Major
Issue summary: View changes

Setting priority to major since this is one of the key settings in this module.

isholgueras made their first commit to this issue’s fork.

isholgueras’s picture

Status: Reviewed & tested by the community » Fixed
isholgueras’s picture

Status: Fixed » Closed (fixed)
dragos-dumi’s picture

After this change, the workspace indicator colors in the toolbar gets overwritten with the bg and fg color and might confuse users as you get for example green color on any Workspace. Attached a patch for this, if someone is lookig for a quick fix. Not sure if needs to be a sepparate issue or even if it should be considered in this module.

trackleft2’s picture

@dragos-dumi Interesting, thanks for the report. I'll make an issue for this module to create an automated test for how this module interacts with workspaces module.

leksat’s picture

$('.toolbar .toolbar-bar .toolbar-tab > .toolbar-item').css('background-color', settings.environmentIndicator.bgColor);

This new code now changes the background color of our custom toolbar elements. Now sure what to do with that 🤔

leksat’s picture

Also, the jQuery code does not use the context for the element selection. So every time it is applied to the whole page, no matter of the passed context.

danflanagan8’s picture

RE: #12, my clients are pointing out the same thing. I think it is the responsibility of this module to not override the core workspace styling. I created an issue and put in an MR.

#3532440: Environment indicator overrides workspace toolbar style