v0.4.2 - Dark Mode & Additional Currencies #38

Merged
bscott merged 4 commits from v0.4.2 into main 2025-08-23 15:04:41 -04:00
bscott commented 2025-08-23 14:51:27 -04:00 (Migrated from github.com)

Summary

• Complete dark mode implementation across all pages with system preference detection
• Added 4 new currencies: GBP, RUB, JPY, and SEK (Swedish Krona)
• Enhanced Settings page with improved currency selection grid
• Professional styling with proper accessibility and contrast ratios

Test plan

  • Test dark mode toggle functionality in Settings
  • Verify dark mode persistence across page navigation
  • Confirm system preference detection works correctly
  • Test all 7 currencies display correctly with proper symbols
  • Verify subscription calculations work with new currencies
  • Test responsive design in both light and dark modes
  • Validate accessibility compliance and contrast ratios

Resolves #24 (Dark Mode)
Resolves #34 (Additional Currencies - including SEK for @lagge78)

## Summary • Complete dark mode implementation across all pages with system preference detection • Added 4 new currencies: GBP, RUB, JPY, and SEK (Swedish Krona) • Enhanced Settings page with improved currency selection grid • Professional styling with proper accessibility and contrast ratios ## Test plan - [x] Test dark mode toggle functionality in Settings - [x] Verify dark mode persistence across page navigation - [x] Confirm system preference detection works correctly - [x] Test all 7 currencies display correctly with proper symbols - [x] Verify subscription calculations work with new currencies - [x] Test responsive design in both light and dark modes - [x] Validate accessibility compliance and contrast ratios Resolves #24 (Dark Mode) Resolves #34 (Additional Currencies - including SEK for @lagge78)
Copilot (Migrated from github.com) reviewed 2025-08-23 14:51:27 -04:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-08-23 14:53:00 -04:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR implements comprehensive dark mode functionality across all pages of the SubTrackr application and adds support for 4 new currencies. The dark mode system includes automatic system preference detection, localStorage persistence, and server synchronization.

Key changes include:

  • Complete dark mode implementation with system preference detection and persistence
  • Addition of GBP, RUB, JPY, and SEK currencies with proper symbols
  • Enhanced Settings page with improved dark mode toggle and currency selection grid

Reviewed Changes

Copilot reviewed 12 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/static/js/darkmode.js New DarkModeManager class with system preference detection and server sync
templates/*.html Added dark mode classes and color variants across all pages
internal/service/settings.go Extended currency validation and added dark mode preference methods
internal/handlers/*.go Added DarkMode template data to all page handlers
cmd/server/main.go Added dark mode API endpoint routing
Comments suppressed due to low confidence (1)

templates/settings.html:1

  • The yellow background (bg-yellow-50) combined with yellow text (text-yellow-800) may not provide sufficient contrast for accessibility compliance. Consider using a darker text color or ensuring contrast ratios meet WCAG AA standards.
<!DOCTYPE html>

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview This PR implements comprehensive dark mode functionality across all pages of the SubTrackr application and adds support for 4 new currencies. The dark mode system includes automatic system preference detection, localStorage persistence, and server synchronization. Key changes include: - Complete dark mode implementation with system preference detection and persistence - Addition of GBP, RUB, JPY, and SEK currencies with proper symbols - Enhanced Settings page with improved dark mode toggle and currency selection grid ### Reviewed Changes Copilot reviewed 12 out of 22 changed files in this pull request and generated 1 comment. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | web/static/js/darkmode.js | New DarkModeManager class with system preference detection and server sync | | templates/*.html | Added dark mode classes and color variants across all pages | | internal/service/settings.go | Extended currency validation and added dark mode preference methods | | internal/handlers/*.go | Added DarkMode template data to all page handlers | | cmd/server/main.go | Added dark mode API endpoint routing | </details> <details> <summary>Comments suppressed due to low confidence (1)</summary> **templates/settings.html:1** * The yellow background (bg-yellow-50) combined with yellow text (text-yellow-800) may not provide sufficient contrast for accessibility compliance. Consider using a darker text color or ensuring contrast ratios meet WCAG AA standards. ``` <!DOCTYPE html> ``` </details> --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/bscott/subtrackr/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
@ -19,30 +20,32 @@
}
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-08-23 14:53:00 -04:00

The DarkModeManager class is duplicated between settings.html and darkmode.js, creating maintenance issues. The class should only exist in the dedicated JavaScript file and be referenced through the script tag inclusion.

    </script>
    <script src="/static/js/darkmode.js"></script>
The DarkModeManager class is duplicated between settings.html and darkmode.js, creating maintenance issues. The class should only exist in the dedicated JavaScript file and be referenced through the script tag inclusion. ```suggestion </script> <script src="/static/js/darkmode.js"></script> ```
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bscott/subtrackr!38
No description provided.