AOSSIE-Org / AOSSIE-Org/DebateAI

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

Offen
#500 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @RounakKumarAgarwal Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
84
Forks
198
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
30

Beschreibung

### 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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.