-
Notifications
You must be signed in to change notification settings - Fork 587
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
fix(fast-element1): fix design token updates when attaching/detaching nodes and deleting values #6960
Open
m-akinc
wants to merge
5
commits into
microsoft:archives/fast-element-1
Choose a base branch
from
m-akinc:more-design-token-fixes
base: archives/fast-element-1
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix(fast-element1): fix design token updates when attaching/detaching nodes and deleting values #6960
m-akinc
wants to merge
5
commits into
microsoft:archives/fast-element-1
from
m-akinc:more-design-token-fixes
+187
β11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
m-akinc
commented
May 14, 2024
packages/web-components/fast-foundation/src/design-token/design-token.spec.ts
Show resolved
Hide resolved
m-akinc
commented
May 14, 2024
packages/web-components/fast-foundation/src/design-token/design-token.spec.ts
Show resolved
Hide resolved
@chrisdholt No rush, but it's been a couple weeks since I posted this, so I thought I'd give you a ping. |
@janechu is there anything I can do to help get this in? |
janechu
approved these changes
Jun 5, 2024
LGTM, sorry for the delay! |
m-akinc
commented
Jun 5, 2024
change/@microsoft-fast-foundation-030341a5-c95f-4516-a637-9e489443ff23.json
Outdated
Show resolved
Hide resolved
5 tasks
@chrisdholt while we've got some momentum, would be nice to get a review on this. π |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
π Description
This PR addresses a couple design-token-related bugs:
T
(with CSS variable--T
)T
to "10" for both<my-child>
and<my-parent>
<my-child>
's value is the same as the inherited value, the value is not reflected to CSS on<my-child>
T
to "20" for<my-other-parent>
<my-child>
under<my-other-parent>
(detach, then append)<my-child>
, the value of the CSS variable--T
should be "10" for it, but it is not. It is "20", which is incorrect.<my-child>
differs from<my-other-parent>
, it should reflect the value to CSS. It doesn't. β<my-element></my-element>
T
(with CSS variable--T
)T
to "10" for<my-element>
T
from<my-element>
<my-element>
should not have any value for--T
, but it is still defined as "10".Also:
.only
from a combobox test that was apparently submitted on accidentconsole.error
). Now that we are properly triggering token re-evaluations when detaching elements from the DOM, a derived token may throw an error during evaluation, because it depended on an inherited token value. It seems better to print an error than to let this derail execution.π« Issues
N/A
π©βπ» Reviewer Notes
Stackblitz demo of bug numbered 1 in description.
Stackblitz demo of bug numbered 2 in description.
π Test Plan
Added additional test cases.
β Checklist
General
$ yarn change