Skip to content

feat: support muti-theme#19

Open
SmilingPixel wants to merge 12 commits intomainfrom
feat/app_theme_0421
Open

feat: support muti-theme#19
SmilingPixel wants to merge 12 commits intomainfrom
feat/app_theme_0421

Conversation

@SmilingPixel
Copy link
Copy Markdown
Owner

This pull request introduces a comprehensive theming system for the application, including support for user-selectable theme modes (System, Light, Dark), a "Pure Black" mode for OLED screens, and a new color palette for both light and dark themes. The settings screen is enhanced to allow users to choose their preferred appearance. Additionally, the UI is updated to consistently use theme-based colors, improving visual coherence and dark mode support.

Copilot AI review requested due to automatic review settings April 29, 2026 08:56
Copy link
Copy Markdown
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 a user-configurable theming system (System/Light/Dark + optional pure-black dark mode) and wires it into settings persistence and the app’s top-level Compose theme, while updating parts of the UI to rely on MaterialTheme colors.

Changes:

  • Add theme preferences (ThemeMode, pure-black toggle) to SettingsRepository and persist them in DataStore (non-web) and localStorage (wasm).
  • Introduce MarkDayTheme + new light/dark/pure-black color palettes.
  • Update Settings UI to allow selecting theme mode and pure-black option; adjust some screens to use theme-based colors.

Reviewed changes

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

Show a summary per file
File Description
composeApp/src/wasmJsMain/kotlin/io/github/smiling_pixel/preference/SettingsRepository.wasmJs.kt Persists theme preferences in localStorage and exposes them as flows.
composeApp/src/nonWebMain/kotlin/io/github/smiling_pixel/preference/DataStoreSettingsRepository.kt Adds theme preference keys and flows backed by DataStore.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/theme/ThemeMode.kt Introduces ThemeMode enum (System/Light/Dark).
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/theme/Theme.kt Adds MarkDayTheme that selects light/dark/pure-black color schemes.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/theme/Color.kt Defines the new palette constants for light/dark/pure-black.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/screens/SettingsScreen.kt Adds Appearance section UI for theme mode and pure-black toggle.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/screens/MomentsScreen.kt Removes hardcoded Color import (toward theme usage).
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/screens/EntryDetailsScreen.kt Replaces hardcoded grays with MaterialTheme.colorScheme values.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/preference/SettingsRepository.kt Extends settings API with theme/pure-black flows + setters.
composeApp/src/commonMain/kotlin/io/github/smiling_pixel/App.kt Applies MarkDayTheme based on persisted theme settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread composeApp/src/commonMain/kotlin/io/github/smiling_pixel/App.kt Outdated
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
import androidx.compose.material3.HorizontalDivider
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

HorizontalDivider is imported but not used in this file, which will generate an unused-import warning (and may fail builds if warnings are treated as errors). Please remove the unused import.

Suggested change
import androidx.compose.material3.HorizontalDivider

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
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 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread composeApp/src/commonMain/kotlin/io/github/smiling_pixel/App.kt
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