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

未关闭 适合新手
#7,604 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@AAshGray 已经在做这个了。

开始于 2026年5月26日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
64/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
react, typescript

调研方向

从 frontend/web/components/ButterBar.tsx 开始,尤其关注第 73-85 行,并使用环境设置中的浅色 banner_colour 重新实现该横幅。将硬编码的白色文本行为替换为根据背景派生出的可读颜色,然后验证该横幅在所列环境页面的浅色和深色背景上都保持清晰可读。

由索引模型根据 Issue 内容生成。

描述

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)

主要语言
Python
星标
9.9k
派生
658
平均合并
1 天 15 小时
30 天内合并 PR
171

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Flagsmith/flagsmith 的其他 Issue

查看 Flagsmith/flagsmith 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。