AOSSIE-Org / AOSSIE-Org/DebateAI

[BUG]: Novice badge icon uses hardcoded text-blue-500 instead of a theme token — doesn't adapt across themes

未关闭
#500 1 条评论 0 个 reaction 已指派 1 人 已被 @RounakKumarAgarwal 认领 在 GitHub 查看
bug
主要语言
TypeScript
星标
84
派生
198
平均合并
2 天 19 小时
30 天内合并 PR
30

描述

### Bug Description

The Novice badge icon is hardcoded to `text-blue-500`, so it stays the same blue in every theme (Light, Dark, High Contrast) instead of adapting to the active theme. This is inconsistent with the fallback badge icon in the same code, which correctly uses the `text-primary` theme token.

Hardcoded locations:
- `frontend/src/Pages/Profile.tsx:862` — `Novice: `
- `frontend/src/components/BadgeUnlocked.tsx:14` — `Novice: `

For contrast, the fallback icons in the same files use a theme token and adapt correctly:
- `Profile.tsx:875` — ``
- `BadgeUnlocked.tsx:56` — ``

Because `text-blue-500` is a fixed color, the Novice icon can clash with the active theme — most noticeably in High Contrast, where the rest of the UI uses the yellow/black accent system but the badge icon stays blue. The fix is to use a theme-aware token (e.g. `text-primary`, matching the fallback) instead of the hardcoded blue.

### Steps to Reproduce

1. Complete a debate so the Novice badge is earned (or view a profile that has it), at `/profile`.
2. Look at the Novice badge icon under the "Badges" section.
3. Switch between Light, Dark, and High Contrast themes.
4. Observe the Novice badge icon stays the same blue in all themes, rather than adapting like other theme-aware elements.

### Logs and Screenshots

Hardcoded (does not adapt):
Profile.tsx:862 Novice:
BadgeUnlocked.tsx:14 Novice:

Theme-aware fallback (for contrast, in the same files):
Profile.tsx:875
BadgeUnlocked.tsx:56

Image

Image

Image

Image

### Environment Details

- Page: /profile (Badges section) and the BadgeUnlocked popup
- Files: frontend/src/Pages/Profile.tsx:862, frontend/src/components/BadgeUnlocked.tsx:14
- Frontend: Vite + React + Tailwind
- Branch: main
- Fix: replace hardcoded text-blue-500 with a theme token (e.g. text-primary), matching the fallback icons

### Impact

Low - Minor inconvenience

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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