Skip to content

nsc-events-fullstack_32_172_use-MUI-theme-palette#174

Open
NahomAlemu wants to merge 2 commits intomainfrom
bug-172-use-theme-palette
Open

nsc-events-fullstack_32_172_use-MUI-theme-palette#174
NahomAlemu wants to merge 2 commits intomainfrom
bug-172-use-theme-palette

Conversation

@NahomAlemu
Copy link
Copy Markdown
Contributor

Summary & Changes 📃

  • Resolves: UI: Replace hardcoded color values with theme palette for dark mode consistency #172
  • Summary: Replace hardcoded color values with MUI theme palette for consistent dark mode support
    • 🔨 Fixes inconsistent dark mode rendering where hardcoded colors ("black", "white", #2074d4) ignored theme settings
    • 👀 Components now properly adapt to light/dark mode using theme palette colors
    • 🗨️ Used useTheme() hook and theme.palette.* properties; no changes to theme configuration required
  • Changes:
    • EditDialog.tsx - Replaced color: 'black' and color: "red" with theme palette
    • AttendDialog.tsx - Replaced snackbar hardcoded colors with theme palette
    • LoginWindow.tsx - Replaced button color: "black" with palette.secondary.contrastText
    • ArchiveDialog.tsx - Replaced snackbar colors with theme palette
    • CoverPhotoDialog.tsx - Replaced snackbar colors with theme palette
    • event-detail/page.tsx - Replaced 8+ instances of #2074d4, "white", "red", "grey" with theme palette
    • create-event/page.tsx - Replaced 20+ instances of #114FA2, #42A5F5, mode ternaries with theme palette
    • 🛠️ No breaking changes
    • 📝 Color mapping: "black"→text.primary, "white"→background.paper/contrastText, "red"→error.main, #2074d4→primary.main

How to Test 🧪

  1. Steps to Reproduce:
    - Step 1: Run npm run dev in nsc-events-nextjs
    - Step 2: Toggle between light/dark mode using theme switcher
    - Step 3: Navigate to Create Event, Event Detail pages
    - Step 4: Trigger snackbar notifications (attend/archive/delete actions)
  2. Expected Behavior: All UI elements adapt colors based on current theme mode so should be the same, except the code change.
  3. Actual Behavior: Previously, hardcoded colors remained static regardless of theme

Checklist ✅

  • I have tested this PR locally and it works as expected.
  • This PR resolves an issue (Resolves #issue-number).
  • Reviewers, assignees(self), tags, and labels are correctly assigned.
  • Squash commits and enable auto-merge if approved.

@NahomAlemu NahomAlemu self-assigned this Mar 7, 2026
@NahomAlemu NahomAlemu added the UI Frontend visual or layout work label Mar 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

✅ Full E2E Test Results

Running full test suite (critical files changed)

Status Count
✅ Passed 47
❌ Failed 0
📊 Total 47

View detailed report

@NahomAlemu NahomAlemu requested a review from taylorpapke March 7, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI Frontend visual or layout work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Replace hardcoded color values with theme palette for dark mode consistency

1 participant