-
Notifications
You must be signed in to change notification settings - Fork 91
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!
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? |
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
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.
@akolson, I couldn't find a matching theme color for $md-red-800
. As @LianaHarris360 mentioned, we should remove only those SCSS variables that have a corresponding color in KDS. Since this variable doesn’t have a match, I left it as is.
$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
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 updates, @shruti862. I just noted a few lingering items to address below.
border-bottom-style: solid; | ||
border-bottom-width: $ui-input-border-width; | ||
border-radius: 2px 2px 0 0; | ||
outline: none; | ||
|
||
&:hover:not(.is-disabled) { | ||
border-bottom-color: $ui-input-border-color--hover; | ||
border-bottom-color: $ui-input-border-color--hover !important; | ||
|
||
.ui-select-label-text { | ||
color: $ui-input-label-color--hover; |
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 line needs the !important
at the end as well.
@@ -953,29 +959,28 @@ | |||
align-items: flex-start; | |||
margin-bottom: $ui-input-margin-bottom; | |||
background: $md-grey-100; | |||
border-bottom-color: $ui-input-border-color; | |||
border-bottom-style: solid; | |||
border-bottom-width: $ui-input-border-width; | |||
border-radius: 2px 2px 0 0; | |||
outline: none; | |||
|
|||
&:hover:not(.is-disabled) { |
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.
When active, the color changes on hover, but it should remain the same when active and hovered. Perhaps we need to update this pseudo-class selector to ensure the color changes only when hovered, but not when it is disabled and/or active?
This applies for the selector on line 444 in lib/keen/UiTextbox.vue
also.
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.
@LianaHarris360, I tried to update the pseudo class to get what is needed but this doesn't work so currently trying other ways :)
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.
Hey @LianaHarris360 , I have corrected the styling of KSelect/index.vue
and compared with KSelect from official KDS Page and also changed styling of UiTextbox
but quite unsure about this one because I was unable to compare this,
Can you guide me how to review changes made to this 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.
Hi @shruti862! This is looking great. Liana left some comments to address. Also, there's a few clean up comments I left previously(here and here), but I think we should be good to merge once this feedback is resolved
Also bumping this feedback here |
I had already worked upon this but for the same reason mentioned above I have to get back the changes made . |
…tem into new-changee
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