-
Notifications
You must be signed in to change notification settings - Fork 8
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
add ThemeToggleButton, tests and doc #482
Conversation
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.
Thanks for the PR. How does it look in the gix-cmp showcase? If it needs adaptation, are you going to provide those in another PR? (It’s probably best to do it in two separate PRs indeed.)
Does this button work as a drop-in replacement of the toggle even if we don't move the component to a different place in the page? |
Note that I left comments assuming it was a drop-in replacement (that the community dev using the lib should also adopt). |
Waiting for an answer from Artem |
Artem told me this is a replacement, please provide feedback accordingly |
I'm confused by this. Can you show me how this looks in the account menu instead of the current theme switcher in the account menu? |
@dskloetd here you go: |
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.
Thanks!
Look weird in the context menu but, that's a question above my pay grade. Can you also share the screenshots regarding my earlier question as well? |
@peterpeterparker is talking about this: https://github.com/dfinity/gix-components?tab=readme-ov-file#documentation--showcase If you |
@peterpeterparker |
After talking with Artem again, he said we will most probably don't use it but as people are aready using it outside of NNS let's keep both toggle and the button. I will be moving some files around, will leave the context menu as is with ThemeToggle |
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.
Can you edit the description of the PR, I think it does not match anymore given that you are providing a new component.
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.
LGTM, thx
|
||
## Showcase | ||
|
||
<ThemeToggleButton /> |
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.
Not important at all, but I was wondering if it makes sense to put the switch and the button on the same show-case page so you can see them side by side and know the other one also exists if you look at one.
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.
Makes sense. I actually started writing a review comment when I approved the PR about referencing the components (adding links from one to the other), but ultimately did not provide the feedback as I felt I had already been picky enough.
@coskucinkilic WDYT?
Motivation
Add new ThemeToggleButton component
Changes
ThemeToggleButton component added to repo
Tests for ThemeToggleButton added to spec file
ThemeToggleButton is added to showcase
--icon-color variable added to IconDarkMode and IconLightMode
New --sidebar-icon variable has been added to themes
Screenshots