Fix Bootstrap light/dark theming #6

Merged
timmybee merged 1 commits from feature/bootstrap-theming into master 2026-03-06 10:17:48 +08:00
Owner

Summary

  • Dark mode toggle now works correctly — Alpine reactive theme property drives the data-bs-theme attribute, so icons swap on click and the page responds immediately
  • Saved theme preference is applied on page load in both the app and guest layouts
  • Removed hardcoded bg-light classes from the guest layout body, login page wrapper, and journey/cost-code sub-cards so they all adapt to dark mode
  • Fixed broken duplicate Bootstrap bundle import in app.js (the relative path to node_modules wouldn't resolve under Vite)

Test plan

  • Toggle dark/light mode — moon/sun icon should swap and the page should switch themes
  • Reload the page — saved theme preference should persist
  • Visit the login page — should respect the saved theme
  • Create a new travel request — journey and cost code cards should adapt to dark mode
  • Run npm run build to verify no JS errors
## Summary - Dark mode toggle now works correctly — Alpine reactive `theme` property drives the `data-bs-theme` attribute, so icons swap on click and the page responds immediately - Saved theme preference is applied on page load in both the app and guest layouts - Removed hardcoded `bg-light` classes from the guest layout body, login page wrapper, and journey/cost-code sub-cards so they all adapt to dark mode - Fixed broken duplicate Bootstrap bundle import in `app.js` (the relative path to `node_modules` wouldn't resolve under Vite) ## Test plan - [ ] Toggle dark/light mode — moon/sun icon should swap and the page should switch themes - [ ] Reload the page — saved theme preference should persist - [ ] Visit the login page — should respect the saved theme - [ ] Create a new travel request — journey and cost code cards should adapt to dark mode - [ ] Run `npm run build` to verify no JS errors
timmybee added 1 commit 2026-03-06 10:16:59 +08:00
Fix Bootstrap light/dark theming across all layouts
All checks were successful
linter / quality (pull_request) Successful in 1m52s
security / Dependency Audit (pull_request) Successful in 1m27s
security / Static Analysis (pull_request) Successful in 1m44s
tests / ci (8.4) (pull_request) Successful in 1m40s
tests / ci (8.5) (pull_request) Successful in 1m49s
236ba9558c
- Make dark mode toggle reactive using Alpine x-data theme property
- Apply saved theme on page load via data-bs-theme attribute binding
- Remove hardcoded bg-light classes that broke dark mode styling
- Fix duplicate/broken Bootstrap bundle import in app.js
timmybee merged commit 98abc637c8 into master 2026-03-06 10:17:48 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timmybee/travel#6