-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Introduce canonicalizeCandidates
on the internal Design System
#19059
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
Open
RobinMalfait
wants to merge
36
commits into
main
Choose a base branch
from
feat/canonicalize-candidates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
+3,012
−2,417
Open
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
80a90e0
hoist regex
RobinMalfait 33dd0f8
remove async
RobinMalfait a62d857
tmp: annotate migrations
RobinMalfait c82bc30
move `printCandidate` normalization tests to core
RobinMalfait 8c6fe35
expose `canonicalizeCandidates` on the design system
RobinMalfait 5d6ea74
canonicalize candidates at the end of upgrading your project
RobinMalfait 44352e8
move `migrate-bg-gradient` to core
RobinMalfait afa3216
move `migrate-theme-to-var` to core
RobinMalfait 852e288
cache the converter
RobinMalfait 4c722c0
only prefix variable that are not in `--theme(…)`
RobinMalfait 4bf93bf
move types to core
RobinMalfait 5de55bd
move dimensions to core
RobinMalfait 2c9a2c7
move signatures to core
RobinMalfait 34cb8b8
ensure `canonicalizeCandidates` returns a unique list
RobinMalfait 0c3d48e
move `migrate-arbitrary-utilities` to core
RobinMalfait f088459
move `migrate-bare-utilities` to core
RobinMalfait ae5909c
move `migrate-deprecated-utilities` to core
RobinMalfait e5352d3
move `replaceObject` to core
RobinMalfait 2863c60
move `migrate-arbitrary-variants` to core
RobinMalfait 0eaf373
move `migrate-drop-unnecessary-data-types` to core
RobinMalfait 683ffc5
move `migrate-arbitrary-value-to-bare-value` to core
RobinMalfait 1c02690
move `migrate-optimize-modifier` to core
RobinMalfait 760aef8
remove `!` from test case
RobinMalfait d5ba933
handle `&` and `*` in selector parser as standalone selector
RobinMalfait 80029cd
move parts of `migrate-modernize-arbitrary-values` to core
RobinMalfait 02ba94f
ensure we canonicalize at the end
RobinMalfait c956b08
big refactor
RobinMalfait c281426
drop unnecessary calls
RobinMalfait 368eb80
only stringify the value when something changed
RobinMalfait 55cbbaf
remove migration annotations
RobinMalfait e7ce1ad
move `selector-parser` from `./src/compat` to just `./src`
RobinMalfait 705476c
add attribute selector parser
RobinMalfait 226ae47
use dedicated `AttributeSelectorParser`
RobinMalfait 4441c44
remove intellisense features from `@tailwindcss/browser`
RobinMalfait 5b7fa87
immediately return replacement candidates
RobinMalfait 93b97b1
remove `@property` when computing a signature
RobinMalfait File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Does this mean these APIs aren't available when running the browser version?
Uh oh!
There was an error while loading. Please reload this page.
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.
These APIs are internal and were already inaccessible in the
@tailwindcss/browser
package. They were on an object (i.e. not tree-shakable) which meant they still took up some space. This replaces those APIs so they take up much less space since they can't be used anyway.basically this is just a code-size reduction and doesn't eliminate any actual functionality.
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.
Ah ok
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.
You can still import the
tailwindcss
package directly — even in the browser — it'll work just fine and will have these APIs.This is done to help eliminate some bundle size concerns with the CDN version (e.g. the one that scans class="…" attributes in HTML and compiles on the fly)
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.
Ah that must be it great, thanks mate