Skip to content

feat: move theme switcher from header to footer#162

Merged
ManukMinasyan merged 3 commits intomainfrom
feat/theme-switcher-footer
Feb 25, 2026
Merged

feat: move theme switcher from header to footer#162
ManukMinasyan merged 3 commits intomainfrom
feat/theme-switcher-footer

Conversation

@ManukMinasyan
Copy link
Copy Markdown
Contributor

@ManukMinasyan ManukMinasyan commented Feb 25, 2026

Summary

  • Replaced the simple dark/light toggle button in the header with a 3-option theme switcher (System | Light | Dark) in the footer and mobile menu
  • Fixed auth links breakpoint from lg:flex to md:flex so Sign In / Start for Free are visible at tablet sizes (768-1024px)
  • Theme switcher uses pill-shaped segmented control with active state highlighting, consistent across footer and mobile menu

Test plan

  • Verify theme switcher appears in footer copyright section
  • Verify theme switcher appears in mobile menu footer
  • Test all three modes: System, Light, Dark
  • Confirm no toggle button in header
  • Check Sign In / Start for Free visible at ~922px viewport width

Copilot AI review requested due to automatic review settings February 25, 2026 08:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves theme selection UI out of the header and replaces it with a consistent 3-state theme switcher (System/Light/Dark) placed in the footer and mobile menu, while also adjusting the auth-links responsive breakpoint so links appear at tablet widths.

Changes:

  • Removed the header dark/light toggle button and introduced a 3-option theme switcher driven by localStorage + system preference.
  • Added the theme switcher control to the footer and mobile menu footer sections.
  • Updated the header auth-links breakpoint from lg to md to show “Sign In / Start for free” on tablet.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
resources/views/components/layout/mobile-menu.blade.php Replaces the mobile theme toggle with the new 3-option segmented theme control.
resources/views/components/layout/header.blade.php Removes header toggle UI, updates auth breakpoint, and implements shared theme management JS for .theme-btn.
resources/views/components/layout/footer.blade.php Adds the 3-option segmented theme control to the footer copyright row.

- Extract duplicated theme switcher markup into <x-theme-switcher> Blade component
- Use Alpine.js x-data for theme state instead of vanilla JS class toggling
- Leverage Tailwind v4 aria-pressed: variant for active button styling
- Move FOUC prevention script from header component to guest layout <head>
- Remove ~55 lines of vanilla JS theme management from header
- Sync multiple switcher instances via Alpine @theme-changed.window event
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Consistently store 'system' in localStorage instead of removing the key,
preventing mismatch with Filament panel theme storage. Update FOUC script
to handle the explicit 'system' value.
@ManukMinasyan ManukMinasyan merged commit f2da39a into main Feb 25, 2026
9 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.

2 participants