-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Some tokens are falsely labeled as broken #2340
Conversation
🦋 Changeset detectedLatest commit: 77769d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR Analysis
PR Feedback
How to use
|
@robinhoodie0823 Can you provide the testing for this PR inside for a valid case where the resolution algorithm is showing a falsely labelled broken token ? This just looks like a PR regressing the functionality to ever show an example of a broken reference |
Tests are failing here |
@robinhoodie0823 any updates on this one? |
No, I'm working on other tickets now. I will fix asap. |
Commit SHA:e4a29779859132dcdfc9ae5340a5a184f239a26a Test coverage results 🧪
|
Commit SHA:0b1839b1e2e75f04571a3994c3148741e3e4eeda |
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.
As @SorsOps already stated we need a test for this scenario.
Also, it seems you only removed the check if something is failing. What needs to be fixed is the fact that some tokens are falsely labeled as broken, not that we dont want tokens to show up as broken anymore.
The problem according to the issue is about typography, border, shadow tokens.
src/utils/TokenResolver.test.ts
Outdated
@@ -241,7 +241,6 @@ const output = [ | |||
value: 6, | |||
}, | |||
{ | |||
failedToResolve: true, |
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.
Why remove this? This token should be classified as failedToResolve because it did fail to resolve. We cant just remove this.
src/utils/TokenResolver.ts
Outdated
const hasFailingReferences = !AliasRegex.test(JSON.stringify(finalValue)); | ||
|
||
const stringifiedValue = JSON.stringify(finalValue); | ||
const convertedValue = stringifiedValue.substring(1, stringifiedValue.length - 1); |
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 this won't work for tokens that have another object inside, such as composite tokens or shadow tokens. Is there another way you can stringify the object that does not produce curly brackets?
For example right now the transformer tests are failing because of this
Great. Can you add a test to make sure we have this behavior covered going forward? (We should write/update tests for any PR we make) |
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.
✨
20231027_151149.mp4
Closes #2301