Skip to content

Conversation

@nwingt
Copy link
Member

@nwingt nwingt commented Jan 22, 2026

No description provided.

@nwingt nwingt requested a review from Copilot January 22, 2026 03:28
@notion-workspace
Copy link

dark mode phase 1 (wip)

Copy link
Contributor

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

This PR adds comprehensive color mode (light/dark/system) support to the 3ook.com application. The implementation includes user preference storage, UI components for switching modes, and extensive styling updates across pages and components to support dark mode.

Changes:

  • Added color mode type definitions and user settings integration for persisting user preferences
  • Enabled Nuxt UI color mode with light as default, and created a composable to sync color mode with user settings
  • Updated CSS with dark mode variants, replacing hardcoded colors with semantic color classes (text-highlighted, text-muted, text-dimmed, bg-accented)
  • Added ColorModeSwitcher component and integrated it into the account settings page
  • Applied dark mode styling across all major pages (store, reader, checkout, account, about) and components

Reviewed changes

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

Show a summary per file
File Description
shared/types/user-settings.d.ts Added ColorMode type and colorMode field to user settings
nuxt.config.ts Enabled Nuxt UI color mode with custom storage key and light default
composables/use-color-mode-sync.ts New composable to synchronize color mode between Nuxt and user settings
components/ColorModeSwitcher.vue New component for selecting color mode (light/dark/system)
assets/css/main.css Added dark mode CSS variables and moved highlighted text color into mode-specific rules
app.config.ts Updated UI component theme with dark mode ring colors
pages/store/index.vue Updated tag button hover states with dark mode variants
pages/store/claim.vue Replaced gray-600 with semantic text-muted class
pages/store/[nftClassId]/index.vue Updated text colors and backgrounds to support dark mode throughout product page
pages/reader/epub.vue Added dark mode support to epub reader with background and text color changes, updated UI controls
pages/plus/success.vue Replaced hardcoded green and gray colors with semantic theme colors
pages/list.vue Updated heading color to use theme-cyan
pages/checkout.vue Replaced hardcoded colors with semantic classes throughout checkout flow
pages/account/index.vue Added ColorModeSwitcher to account settings
pages/about.vue Updated text colors to use semantic text-muted class
components/* Updated various components with dark mode support using semantic color classes
i18n/locales/*.json Added translations for color mode labels and reordered some keys

@nwingt nwingt force-pushed the feature/dark-mode branch from 244887e to 07df180 Compare January 22, 2026 04:17
nwingt added a commit that referenced this pull request Jan 22, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 22, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 22, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 23, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 23, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 26, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 26, 2026
✨ Support color mode
@nwingt nwingt force-pushed the feature/dark-mode branch from 07df180 to 9756fcb Compare January 27, 2026 09:16
nwingt added a commit that referenced this pull request Jan 27, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Jan 27, 2026
✨ Support color mode
@nwingt nwingt force-pushed the feature/dark-mode branch from 9756fcb to 97a3557 Compare January 29, 2026 18:36
nwingt added a commit that referenced this pull request Jan 29, 2026
✨ Support color mode
@nwingt nwingt requested a review from Copilot January 29, 2026 18:37
Copy link
Contributor

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 32 out of 33 changed files in this pull request and generated 4 comments.

@nwingt nwingt force-pushed the feature/dark-mode branch from 97a3557 to b8e59ab Compare January 30, 2026 07:03
nwingt added a commit that referenced this pull request Jan 30, 2026
✨ Support color mode
@nwingt nwingt requested a review from Copilot January 30, 2026 07:07
Copy link
Contributor

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 33 out of 34 changed files in this pull request and generated 5 comments.

Copy link
Contributor

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 33 out of 34 changed files in this pull request and generated 4 comments.

nwingt added a commit that referenced this pull request Jan 30, 2026
✨ Support color mode
@nwingt nwingt force-pushed the feature/dark-mode branch from b8e59ab to 6541ce6 Compare January 30, 2026 08:03
@nwingt nwingt force-pushed the feature/dark-mode branch from 8b1b0a9 to a11d502 Compare February 1, 2026 17:13
nwingt added a commit that referenced this pull request Feb 1, 2026
✨ Support color mode
@nwingt nwingt requested a review from Copilot February 1, 2026 17:17
Copy link
Contributor

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 36 out of 37 changed files in this pull request and generated 3 comments.

Comment on lines +93 to +95
if (settingsEntry.value?.data) {
(settingsEntry.value.data as Record<string, unknown>)[key] = value
}
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

The immediate update of settingsEntry.value.data in queueUpdate creates a potential race condition. If the API call fails, the local state will be out of sync with the server. Consider whether this optimistic update is necessary, or if a rollback mechanism should be added to revert the change on API failure.

Copilot uses AI. Check for mistakes.
nwingt added a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
@nwingt nwingt force-pushed the feature/dark-mode branch from a11d502 to 83d7788 Compare February 2, 2026 02:40
nwingt added a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
nwingt added a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
@nwingt nwingt force-pushed the feature/dark-mode branch from 83d7788 to 731b79a Compare February 2, 2026 15:25
nwingt added a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
nwingt added a commit that referenced this pull request Feb 2, 2026
✨ Support color mode
definePageMeta({ layout: false })
definePageMeta({
layout: false,
colorMode: 'light',
Copy link
Member

Choose a reason for hiding this comment

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

Why force light mode here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Dont want to waste time on tuning the about page for dark mode

@nwingt nwingt requested a review from williamchong February 3, 2026 02:44
nwingt added a commit that referenced this pull request Feb 3, 2026
✨ Support color mode
💄 Fine tune dark mode color
👔 Enable color mode for Plus subscribers only
@nwingt nwingt requested a review from Copilot February 3, 2026 10:01
Copy link
Contributor

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 39 out of 40 changed files in this pull request and generated 4 comments.

@@ -0,0 +1,64 @@
export function useColorModeSync() {
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The ColorMode type is used but not imported. This file needs to import ColorMode from the shared types to avoid TypeScript errors.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

auto imported

import type { UserSettingKey } from '~/shared/types/user-settings'

const ALLOWED_KEYS = ['locale', 'currency'] as const satisfies readonly UserSettingKey[]
const ALLOWED_KEYS = ['locale', 'currency', 'colorMode'] as const satisfies readonly UserSettingKey[]
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

UserSettingKey is used on line 1 and 15 but is not imported. This will cause a TypeScript error. Add the import statement at the top of the file.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

auto imported

const selectedColorMode = computed(() => preference.value)

function handleColorModeChange(value: string) {
preference.value = value as ColorMode
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

ColorMode type is used on line 34 but is not imported. This will cause a TypeScript error. Add the import for ColorMode from shared types.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

auto imported

williamchong pushed a commit that referenced this pull request Feb 3, 2026
✨ Support color mode
williamchong pushed a commit that referenced this pull request Feb 3, 2026
✨ Support color mode
@nwingt nwingt merged commit 9adb2c6 into likecoin:develop Feb 4, 2026
7 checks passed
@nwingt nwingt deleted the feature/dark-mode branch February 4, 2026 07:49
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