-
Notifications
You must be signed in to change notification settings - Fork 90
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
Removed theme-dependent SCSS variables #886
base: develop
Are you sure you want to change the base?
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.
Thank you for your quick work on this, I apologize for the delayed review. I noticed that some of the variables that were taken out of variables.scss
are still being used in other places. Could you please check again to make sure that all of the removed styling variables aren’t being used elsewhere?
Also, could you please fill in the Changelog descriptions in your PR template? If you need any help with this, just let us know!
@@ -33,9 +33,8 @@ $ui-input-height: rem(32px) !default; | |||
$ui-input-margin-bottom: rem(16px) !default; | |||
|
|||
// Input label | |||
$ui-input-label-color: $secondary-text-color !default; |
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.
Even though it has been removed, there are still a couple of places in the file lib/KSelect/index.vue
where ui-input-label-color
is used, this could be causing some of the tests to fail.
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.
usages of Just rechecked this; we should be good$ui-input-label-color
still exist in KSelect
$ui-input-label-color--hover: black !default; | ||
$ui-input-label-color--active: $brand-primary-color !default; |
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.
ui-input-border-color--active
is still in use within lib/KSelect/index.vue
as well
Hey @LianaHarris360 ,Thank you for letting me know ! . I will surely revisit the variables that were removed from variables.scss to ensure they are not referenced elsewhere in the codebase. |
Hey @LianaHarris360, I have implemented all the suggested changes and completed the changelog description in the PR template as well. Please let me know if there’s anything else that needs to be addressed. |
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.
Looks like there are still some issues w/ the variables @shruti862 - seems some of the variables removed are still referenced in the codebase.
Overall, the changes here are on the right track. The changelog LGTM as well. Thanks @shruti862
@nucleogenesis @LianaHarris360
I found three darken utilities: Could you guide me on the best approach to determine the correct match? Is there a predefined scale for these variables, or should I compare them visually with the original color? |
@@ -49,17 +48,14 @@ $ui-input-text-color--disabled: $disabled-text-color !default; | |||
$ui-input-text-color--invalid: $md-red !default; |
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.
We can remove this. It's not being used anywhere.
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.
Thank you for letting me know, I will surely remove this in my next commit.
Hi @shruti862. I have taken some time to review your changes. Great work! However I am unsure about a few things which could be down to my not understanding what needs to be done; My impression from Liana's explanation of the issue is that we should replace all usages of theme dependent scss variables with JS/Vue theme variables in KDS components only.
That would mean that if the variable is not used in other areas in the codebase, then remove completely, otherwise leave as is. I also don't think the scope of these changes involves updating our KeenUI components themselves. If this is the case, then there's a few places where variables have been removed and yet still in use by Keenui components, for example. @LianaHarris360 could you please confirm if my understanding of this is correct? |
Originally, yes, that was the plan of action, but if there are places where variables that have been removed are still in use in Keen components, I think it does make sense to remove/replace them within this PR. I do see instances within |
Hey @LianaHarris360 , I’m currently stuck on this part and would really appreciate your help when you have a moment. Thanks! |
$ui-input-label-color--hover: black !default; | ||
$ui-input-label-color--active: $brand-primary-color !default; | ||
$ui-input-label-color--invalid: $md-red-800 !default; |
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.
^ should be replaced to use the KDS theme colors
$ui-input-border-color--hover: black !default; | ||
$ui-input-border-color--active: $brand-primary-color !default; | ||
$ui-input-border-color--invalid: $md-red !default; | ||
$ui-input-border-width: 1px !default; | ||
$ui-input-border-width--active: 1.5px !default; | ||
$ui-input-border-style--disabled: dotted !default; | ||
|
||
// Input icons | ||
$ui-input-icon-color: $secondary-text-color !default; |
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 be removed as it not used anywhere
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.
HI @shruti862! Thanks for the great work. I think we are moving in the right direction. Just a couple of things I picked up during my review;
$ui-input-text-color
$ui-input-button-color
$ui-input-button-color--hover
need to be refactored as well- It would be helpful to pass styling themes as computed props rather than defining them inline. This would greatly improve readability and maintainability.
Thanks again, and be sure to let is know in case you have any questions or comments
Description
This PR removes theme-dependent SCSS variables in the file
lib/keen/styles/variables.scss
and replace them with the corresponding JS/Vue theme variables.Issue addressed
Addresses issue #617
Addresses #PR# HERE
Before/after screenshots
Changelog
Steps to test
(optional) Implementation notes
At a high level, how did you implement this?
Does this introduce any tech-debt items?
Testing checklist
Reviewer guidance
Comments