-
Notifications
You must be signed in to change notification settings - Fork 65
feat: add validation into mergeClasses for makeResetStyles calls #260
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
feat: add validation into mergeClasses for makeResetStyles calls #260
Conversation
📊 Bundle size reportUnchanged fixtures
|
ba21a5e to
a686cfa
Compare
| /** | ||
| * @internal | ||
| */ |
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.
Oops, a leftover from the time when it was unstable.
| /** | ||
| * form parts of regular expression and removes collected classNames from string | ||
| * @example | ||
| * regex = /r?(f16th3vw|frdkuqy0|fat0sn40|fjseox00)/ |
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.
We don't use r prefix for RTL classes for a long time.
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "type": "patch", | |||
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.
shouldn't this be a minor ?
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.
Yup
Fixes #261.
Fixes #230.
This PR modifies:
mergeClasses()in Griffel core to emit errors if a call contains multiple occupancies of classes frommakeResetStyles.makeResetStylesBoth changes uses new global variable
DEBUG_RESET_CLASSESto store classes. This works similarly toDEFINITION_LOOKUP_TABLE, but we needDEBUG_RESET_CLASSESonly in development/tests so it has zero impact on production bundles.