Skip to content

Improve docs to add light theme and GitHub link.#101

Merged
skydoves merged 1 commit intomainfrom
improve/docs-theme
Dec 18, 2025
Merged

Improve docs to add light theme and GitHub link.#101
skydoves merged 1 commit intomainfrom
improve/docs-theme

Conversation

@skydoves
Copy link
Copy Markdown
Owner

@skydoves skydoves commented Dec 18, 2025

Improve docs to add light theme and GitHub link.

Summary by CodeRabbit

New Features

  • Added dark mode support with toggleable light and dark color schemes to the documentation app
  • Added theme toggle button in the sidebar to switch between dark and light themes
  • Added GitHub link button in the sidebar for quick repository access

✏️ Tip: You can customize this high-level summary in your review settings.

@skydoves skydoves self-assigned this Dec 18, 2025
@skydoves skydoves merged commit 985af04 into main Dec 18, 2025
3 of 4 checks passed
@skydoves skydoves deleted the improve/docs-theme branch December 18, 2025 11:00
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes add dark theme support to the DocsApp by introducing a theme toggle feature. The refactoring updates the theme system to support both dark and light color schemes with composition locals, adds theme state management in DocsApp, and implements a theme toggle button with a GitHub link button in the DocsSidebar component.

Changes

Cohort / File(s) Summary
Theme System Refactoring
docs/src/wasmJsMain/kotlin/docs/theme/DocsTheme.kt
Updated DocsTheme function to accept darkTheme: Boolean = true parameter. Introduced DarkDocsColors and LightDocsColors public color scheme values. Removed default values from DocsColors data class, making all color properties required. Added LocalIsDarkTheme composition local and isDarkTheme public accessor. Implemented conditional color scheme selection via darkColorScheme()/lightColorScheme() based on theme state.
App-Level Theme State Management
docs/src/wasmJsMain/kotlin/docs/DocsApp.kt
Introduced isDarkTheme state variable. Updated DocsTheme invocation to accept darkTheme = isDarkTheme parameter. Modified DocsSidebar call to pass isDarkTheme and onToggleTheme parameters.
Sidebar UI with Theme Toggle
docs/src/wasmJsMain/kotlin/docs/component/DocsSidebar.kt
Updated DocsSidebar function signature to accept isDarkTheme: Boolean and onToggleTheme: () -> Unit parameters. Wrapped content in vertically scrollable column. Added bottom action row containing theme toggle button (with DarkMode/LightMode icons) and GitHub button with external link handling via LocalUriHandler. Added private GitHubIcon composable for the GitHub button.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify composition local LocalIsDarkTheme is correctly created and provided through CompositionLocalProvider
  • Validate conditional color scheme selection logic in DocsTheme (correct use of darkColorScheme() vs lightColorScheme())
  • Ensure theme state threading from DocsApp through DocsSidebar to toggle handler maintains proper state updates and recomposition
  • Review layout changes in DocsSidebar, particularly the vertically scrollable column structure and bottom action row positioning
  • Check that LocalUriHandler is properly scoped and correctly used for the GitHub button navigation

Poem

🐰 A theme toggle hops through the code with grace,
Dark and light now share the same space,
With composition locals held tight,
Your docs now bloom in day or night! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve/docs-theme

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1b81f5 and 9327cae.

📒 Files selected for processing (3)
  • docs/src/wasmJsMain/kotlin/docs/DocsApp.kt (1 hunks)
  • docs/src/wasmJsMain/kotlin/docs/component/DocsSidebar.kt (3 hunks)
  • docs/src/wasmJsMain/kotlin/docs/theme/DocsTheme.kt (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant