Skip to content

🖍️ Color n' Constant Changes (#739) - #741

Merged
EightBitByte merged 19 commits into
devfrom
739/colors-n-constants
May 30, 2026
Merged

🖍️ Color n' Constant Changes (#739)#741
EightBitByte merged 19 commits into
devfrom
739/colors-n-constants

Conversation

@EightBitByte

@EightBitByte EightBitByte commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR completes the systematic elimination of all remaining hardcoded hex color values ("magic constants") across the Next.js frontend, centralizing them as semantically named CSS variables in globals.css for robust dark/light mode consistency. It also integrates key UI state refactors, optimization/performance fixes for dishes rendering, and addresses merge conflict cleanups.

Changes

🎨 Color & Theme Centralization (Magic Constants Clean-up)

  • CSS Variables Definition (globals.css): Expanded variables for surfaces (--surface-modal, --surface-dialog, --surface-tinted, --surface-scroll, --surface-elevated), borders (--border-input, --accent-border), text colors, calendars, and tabs.
  • Component Styling Migrations:
    • Converted custom/arbitrary hex codes to var(...) references inside:
      • Modals/Drawers: food-dialog-content.tsx, food-drawer-content.tsx, event-dialog-content.tsx, event-drawer-content.tsx, ingredients-dialog.tsx.
      • Views/Pages: calendar-view.tsx, my-foods/page.tsx, events/page.tsx, edit-preferences-content.tsx.
      • Header/Controls: restaurant-filters.tsx, mobile-actions.tsx, desktop-tabs.tsx.
    • Aligned custom opacity variations for accents to use #8EC5FF33 consistently across nutrition-goals.tsx, nutrition-breakdown.tsx, mobile-nutrition-bars.tsx, meal-search.tsx, and mobile-calorie-card.tsx.

⚡ Performance & State Management Refactoring (Restaurant UI)

  • Memoized Dishes Filtering: Pre-computed filtered dishes map per station via useMemo in dishes-view.tsx. This avoids redundant getDietaryConflicts computations on every render when switching views (e.g. toggling isCompactView or stations).
  • Zustand UI State Integration: Migrated local restaurant view states (such as isCompactView, showPreferencesOnly, selectedStation) to useRestaurantUIStore or resolved them in a central useRestaurantPage custom hook.
  • Clean Interface Controls: Streamlined restaurant-controls.tsx and restaurant-page.tsx by reducing drilldown props and offloading lifecycle operations to hooks/stores.

Closes #739, #727, #734, #728

@EightBitByte
EightBitByte temporarily deployed to staging-741 May 14, 2026 18:11 — with GitHub Actions Inactive
@github-actions
github-actions Bot temporarily deployed to staging-741 May 14, 2026 18:12 Inactive
@EightBitByte
EightBitByte temporarily deployed to staging-741 May 28, 2026 22:36 — with GitHub Actions Inactive
@EightBitByte
EightBitByte marked this pull request as ready for review May 28, 2026 22:36
@github-actions
github-actions Bot temporarily deployed to staging-741 May 28, 2026 22:37 Inactive
@EightBitByte
EightBitByte merged commit 73d14c4 into dev May 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Colors & Constants Fixing Dark Mode Color Discrepancies Anteatery Hero Image Light Mode Color Discrepancies

2 participants