-
Notifications
You must be signed in to change notification settings - Fork 535
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
docs(versioning): update versioning guide with css custom property changes #4612
docs(versioning): update versioning guide with css custom property changes #4612
Conversation
|
Wanted to get your thoughts on this @langermank @mperrotti if you have the time! Let me know if I can provide any additional context for this. Also wanted to include you @lukasoppermann as an FYI in case this was of interest due to overlap with primitives 👀 The work you did with Banner prompted this and I wanted to make sure this was captured in our versioning guide 👍 |
size-limit report 📦
|
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.
What do you think of this decision? Is it too broad? Too specific?
I'm ok with it, but you could also use this logic to make the argument that changing most other CSS properties could also be considered a breaking change. For example: if we add or remove a position: relative
from a component's styles, we change the layout logic and stacking context that consumers might have been relying on in their external styles.
Are there any cases to changing a CSS Custom Property that this entry misses?
Not that I can think of.
Do you agree or disagree with the decision for the semver bump annotation for this type of change?
Agree, but I can easily see people forgetting to do the bump.
occurs when a consumer of the component is setting the value of this CSS Custom | ||
Property in some way expecting a change in the component. For example: | ||
|
||
```diff |
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.
Woah, I didn't know there was a diff
flag for code blocks. Nice!
``` | ||
|
||
```diff | ||
// This is a breaking change if base-size-6 is defined in the next major |
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.
So this is a breaking change even though --space-small
and --base-size-6
come from Primer Primtives and we provided a fallback?
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.
That's a great point about the fallback. You're totally right that the fallback would still apply so there would not be any breakage in the UI, in this case what I'm trying to think through is if this would be a breaking change when someone anticipated --space-small
to be the token applied to a component and then it changes to a different token.
Put another way:
ExampleComponent
depends onspace-small
- Consumer uses/leverage/extends
space-small
ExampleComponent
no longer depends onspace-small
, usesbase-size-6
I'm down either way on this, totally happy to say that the relationship between Component -> token can change and should not be a part of the contract here.
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 that the relationship between Component and token can change and should not be part of the contract here.
Saw this scenario come up recently and wanted to make sure it was documented with respect to corresponding semver change 👀
Changelog
New
Changed
Removed
Rollout strategy
This is a change to project documentation
Testing & Reviewing
I would love to get your feedback on this entry in the versioning doc. Here are some questions if none come to mind to get things going 👀