-
Notifications
You must be signed in to change notification settings - Fork 192
Grid item column fallback #1958
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
Conversation
🦋 Changeset detectedLatest commit: 8018392 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
LGTM, good catch 🚀
There's just the changeset missing, if you can add it please 🙏
Also, would we want to create a specific story in Storybook to cover the use case where there's only the parameter col defined without any other breakpoint?
Also (number 2), when this will be released, we have to make sure to fix its usage on the CMS otherwise we'll have some regression on mobile and tablet breakpoints on a few elements.
0205a91
to
5a07ca9
Compare
5a07ca9
to
f089e0f
Compare
Yes, that's why this is something I will mention |
f089e0f
to
4812a3a
Compare
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.
Because of the potential regression on the responsive that this PR can introduce, we'll wait for the stable release to merge this. |
4812a3a
to
8018392
Compare
What does it do?
This PR changes the default
Grid.Item
column size fallback. Right now, the code always falls back to12
(a full-width span) unless a breakpoint-specific value ($s
,$m
,$col
) is provided. For example:At
xs
, if you don’t pass$xs
, it defaults to 12.At
s
, if you don’t pass$s
, it defaults to$xs
(or12
if$xs
wasn’t set).At
m
, if you don’t pass$m
, it defaults to$s
→$xs
→12
.At large, it cascades:
$col
→$m
→$s
→$xs
→12
.This means that if you set
col={6}
but don’t definexs
,s
, orm
, the smaller breakpoints will expand the item to12
columns instead of inheriting6
.Why is it needed?
Describe the issue you are solving.
How to test it?
Provide information about the environment and the path to verify the behaviour.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request