-
-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theme: ✨ add default and update the others optional #591
Conversation
Codecov Report
@@ Coverage Diff @@
## master #591 +/- ##
==========================================
+ Coverage 85.89% 86.12% +0.23%
==========================================
Files 37 37
Lines 3849 3899 +50
==========================================
+ Hits 3306 3358 +52
+ Misses 543 541 -2
Continue to review full report at Codecov.
|
Hi @zwpaper, I have not yet fully gone through the codebase but I was thinking that a better way to implement the idea of default colors is to have it use the colors from the default theme when no color is mentioned. For example, if the user has not defined the color for the size block, it will lookup the color in the default theme for size. The idea is that they can mostly use the default colors, but just update only the ones that they don't like. The way you have done it will mean the user will have to define every single color if they need to change the colors. On a related note, I was thinking that we could improve how we pick up the theme file. We could make it so that if a file called |
Hi @meain, thanks for the input, as I mentioned in the description, I also wondering how should we handle the default color. This PR could be a small Proof of Concept and discussion. a fallback to the default theme is something like so that a fixed this also answers your second question, why I did not choose to use |
I think it is better to still fallback to the default theme instead of using a
Besides, people who plan to create full new things can always just make sure they cover everything by starting off with the default theme and updating all the values. |
Signed-off-by: zwPapEr <[email protected]>
Signed-off-by: zwPapEr <[email protected]>
Signed-off-by: zwPapEr <[email protected]>
Signed-off-by: zwPapEr <[email protected]>
@meain now this feature should works as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. The only thing that I would add here an option for the user to choose the default terminal foreground (reset
in crossterm, something like a none
option in theme file) so that they will not have to specify back/while etc and have it work in both light and dark setups, but that came come in later.
I think we could probably go for the next release as well now.
fix #549
difference:
default
value as fallback color instead of falling back to the default theme, one may copy the default theme value from READMETODO
cargo fmt