feat: added pinned theme (#DS-3003) - #1882
Conversation
78b93c4 to
2b5d356
Compare
|
Visit the preview URL for this PR (updated for commit 2b5d356): https://koobiq-next--prs-1882-u1j4ljpx.web.app (expires Fri, 14 Aug 2026 15:52:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
There was a problem hiding this comment.
Pull request overview
This PR extends KbqThemeService (in packages/components/core) with the ability to pin a specific theme by name, independent of the existing light/dark/auto mode resolution. Previously the service could only resolve a theme from its colorScheme polarity against the OS preference; now a named theme from the registered themes() can be pinned, persisted, and restored. This supports "select an exact theme" pickers rather than just a light/dark toggle. The change also refactors the cookie store to share read/write helpers and adds a docs example plus English/Russian documentation.
Changes:
- Added
pinnedThemewritable signal, a new publicsetMode()method (clears any active pin), and pin-awarecurrentTheme()resolution toKbqThemeService, with athemeinitial-pin setting onKbqThemeSettings. - Extended the
KbqThemeStorecontract (and bothlocalStorage/cookie implementations) withgetPinnedTheme()/setPinnedTheme(), persisting the pin under a-pinnedstorage key. - Added a
theme-static-selectiondocs example (module, ng-package, generated registry entry) and documentation incore.en.md/core.ru.md, plus comprehensive unit tests and public-API snapshot updates.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/components/core/services/theme.service.ts |
Core feature: pinned-theme signal, setMode(), pin-aware currentTheme(), store contract + cookie refactor |
packages/components/core/services/theme.service.spec.ts |
Extensive unit tests for pinning, persistence, restoration, and store behavior |
tools/public_api_guard/components/core.api.md |
Public API snapshot updated for new members |
packages/docs-examples/components/core/theme-static-selection/theme-static-selection-example.ts |
New docs example demonstrating pinning |
packages/docs-examples/components/core/index.ts |
Examples module exporting the new example |
packages/docs-examples/components/core/ng-package.json |
ng-packagr entry for the new core examples package |
packages/docs-examples/example-module.ts |
Generated registry entry for the example |
packages/components/core/core.en.md / core.ru.md |
Documentation of theme pinning + example embed |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Select by specific theme