AOSSIE-Org / AOSSIE-Org/DebateAI

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

Aperta
#500 1 commento 0 reazioni 1 assegnatario Rivendicata da @RounakKumarAgarwal Vedi su GitHub
bug
Lingua principale
TypeScript
Stelle
84
Fork
198
Merge medio
2g 19h
PR unite (30g)
30

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.