Repository navigation
Use variation as a prop instead of variationProp in the global styles UI - #47455
Merged
Merged
Conversation
youknowriad
requested review from
jorgefilipecosta,
noisysocks and
tellthemachines
January 26, 2023 12:15
|
Size Change: +322 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
tellthemachines
left a comment
Contributor
There was a problem hiding this comment.
Changes look good! Just one small issue needs addressing, see comment below. The repetition in manually defining the prefix for each tool seems a worthwhile tradeoff for getting rid of those regexes 😄
noisysocks
approved these changes
Jan 30, 2023
noisysocks
left a comment
Member
There was a problem hiding this comment.
Seems to work just fine and I like this approach much better 👍
tellthemachines
approved these changes
Jan 30, 2023
tellthemachines
left a comment
Contributor
There was a problem hiding this comment.
Thanks, all working now ✅
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
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.
Extracted from #47356
What?
Replaces the variationPath prop with the variation prop in the Global Styles UI components.
Why?
The variationPath prop is very specific prop that is tied to an implementation detail (how the variation is stored in theme.json), it also randomly has to end with a dot. it's a rather specific format, we should instead just pass the variation name like we do for elements and let the components decide what to do with it.
Testing Instructions
Try testing that the global styles are still working properly for block variations .