Flagsmith / Flagsmith/flagsmith

Environment banner text hardcoded to white, unreadable on light banner colours

Open Beginner friendly
#7,604 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 14h
Merged PRs (30d)
124

Description

## Describe the bug

The environment banner (the "butter bar" shown when `banner_text` is configured on an environment) renders its text in hardcoded white. When the chosen `banner_colour` is light, the text becomes effectively invisible against the background.

## To reproduce

1. Open an environment's settings
2. Enable the banner and set `banner_text` (e.g. `Production [Be Careful!]`)
3. Navigate to any page in that environment (Features, Segments, etc.)

The banner renders white-on-light and is unreadable.

## Expected behaviour

The banner text should remain legible regardless of the chosen `banner_colour`. Text color should be derived from the background.

## Affected code

`frontend/web/components/ButterBar.tsx` lines 73-85 hardcode `color: 'white'`:

## Screenshots

Will attach after issue creation (a banner with a pale cream `banner_colour` showing white text that is barely visible)

Contributor guide

Open the contributing guide

Research direction

Start in frontend/web/components/ButterBar.tsx, especially lines 73-85, and reproduce the banner with a light banner_colour from environment settings. Replace the hardcoded white text behavior with a background-derived readable color, then verify the banner remains legible on light and dark colors across the listed environment pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.