Add Follow system mode option to Light / Dark theme palette toggle options - #1970
Open
Coderambling wants to merge 1 commit into
Open
Add Follow system mode option to Light / Dark theme palette toggle options#1970Coderambling wants to merge 1 commit into
Coderambling wants to merge 1 commit into
Conversation
Followed guidance in Zensical docs: https://zensical.org/docs/setup/colors/?h=.toggle#automatic-light-dark-mode Icon chosen from set here: https://mui.com/material-ui/material-icons/ Assuming this set is already available in site build assets.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1970 +/- ##
=======================================
Coverage 72.34% 72.34%
=======================================
Files 203 203
Lines 35680 35680
=======================================
+ Hits 25812 25814 +2
+ Misses 9868 9866 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
@Coderambling, Can you please use this for Drafting the Pr and also prefer adding short video or images of before and after, https://github.com/holoviz-dev/holoviz-skills/tree/main/contributing-to-holoviz/skills/pr-description |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Follow system mode option to Light / Dark theme palette toggle options.
Additional icon added for the system preferences option from the same source as the light / dark theme icons:
https://mui.com/material-ui/material-icons/
Assumption
icon library is already referenced in build files, so additional icon should load.
Code changes
Code changes follow Zensical documentation guidelines for adding this mode:
https://zensical.org/docs/setup/colors/?h=.toggle#automatic-light-dark-mode
Section in Zensical docs
Remark on syntax currently used in Lumen zensical.toml
The current Lumen zensical.toml file uses a table and sub-table hierarchy:
[[project.theme.palette]]
[project.theme.palette.toggle]
lumen/zensical.toml
Lines 117 to 126 in 562936a
I have followed that approach in file in this PR.
The Zensical doc combines the table and sub-table in one table. Should this be adopted for the Lumen file?
This would apply to the theme.palette section (3 occurences) and the theme.social sections in the Lumen file (5 occurrences).
Lumen extra.social code section
lumen/zensical.toml
Lines 189 to 210 in 562936a
Please advise, happy to make a separate PR for this.