-
Notifications
You must be signed in to change notification settings - Fork 682
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
Update KDS theme token #12742
Update KDS theme token #12742
Conversation
Build Artifacts
|
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 @AllanOXDi! For this change we need to update the KDS version from 4.4.0
(the current version installed in release-v0.17.x
) to 4.6.0
which is the version that introduces the theme token updates. Between these versions there are two breaking changes that we will need to solve:
- In 4.5.0: There is a breaking change that was the removal of the internal state of KCheckbox, to handle this breaking change we need to backport this commit that handled this breaking change in develop, but is not present yet in release-v0.17.x
- In 4.6.0: Here we introduced the theme token updates, you can see linked the whole mapping, I see that we still need to update some more theme tokens in this pr (e.g. the grey palette).
As we havent updated the KDS version yet, we can see some regressions like this:
Before | After |
---|---|
@@ -59,7 +59,7 @@ | |||
v-if="attemptLog.missing_resource" | |||
class="coach-content-label" | |||
icon="warning" | |||
:color="$themePalette.yellow.v_1100" | |||
:color="$themePalette.yellow.v_500" |
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.
Just a note: v_1100 values map to v_600, so we will need to fix the current changes that changed v_1100 to v_500
Thanks @AlexVelezLl for the helpful notes on the KDS upgrade requirements to make those required changes clearer in terms of what needs to be added to make sure the KDS version works. @AllanOXDi I also wanted to add, in regards to this point in the acceptance criteria
"But, if there is a place where themeTokens.v_1000 is used, that needs to be updated to themeTokens.v_500" was just one example to illustrate that any situations where the numerical values is used does need to be updated, vs. |
…kbox KCheckbox no longer maintains its own internal state, rather, it is just like a fancy button which emits an event that it's been clicked and the parent component must react and update the value it passes to `checked` or `indeterminate` accordingly. These tests rely on KCheckbox to emit its internal state whenever it emits `change` and that no longer is the case given KCheckbox doesn't keep an internal state. I've tweaked some of the conditionals in UserTable that relied on that emitted `checked` value so that they instead get the same information from existing available values.
ef7d7ef
to
a1de0c8
Compare
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 work on this @AllanOXDi! Overall it looks good - I appreciate the detail-oriented work in you last updates. There are few small places where the tokens were missed or there is some other mis-match, which I've noted for reference, and I'll be opening a follow up PR momentarily so we can get those resolved and into the beta today.
Files with remaining theme tokens:
- PermissionsIcon.vue
- ProgressBar.vue
- HeaderTab.vue
- ToggleHeaderTabs.vue
@@ -115,8 +115,8 @@ | |||
}, | |||
linkStyle() { | |||
const hoverBg = this.isFullscreen | |||
? this.$themeBrand.secondary.v_1100 | |||
: this.$themePalette.grey.v_600; | |||
? this.$themeBrand.secondary.v_300 |
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.
I think here, because you previous had updated some of the code from v_1100 to v_600, you have now converted "twice", and there are a few places where you've changed v_1100
to v_300
. First, from v_1100
to v_600
(correct) and then when you went through with the additional updates, you changed the already updated v_600
to v_300
.
I'll mark the places where this "double" remapping has happened
@@ -63,7 +63,7 @@ | |||
return { | |||
color: this.$themeTokens.text, | |||
':hover': { | |||
'background-color': this.$themeBrand.secondary.v_1100, | |||
'background-color': this.$themeBrand.secondary.v_300, |
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.
here
@@ -341,10 +341,10 @@ | |||
cancelStyleOverrides() { | |||
return { | |||
color: this.$themeTokens.textInverted, | |||
'background-color': this.$themePalette.red.v_1100, | |||
'background-color': this.$themePalette.red.v_300, |
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.
here
@@ -10,7 +10,7 @@ | |||
<KIcon | |||
icon="warning" | |||
class="icon" | |||
:color="$themePalette.yellow.v_1100" | |||
:color="$themePalette.yellow.v_600" |
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.
The token on line 6 should also be updated
826a1f1
into
learningequality:release-v0.17.x
Summary
…
References
Closes #12735.
Reviewer guidance
…
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)