Skip to content

Conversation

HichamELBSI
Copy link
Collaborator

What does it do?

This PR changes the default Grid.Item column size fallback. Right now, the code always falls back to 12 (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 (or 12 if $xs wasn’t set).
At m, if you don’t pass $m, it defaults to $s$xs12.
At large, it cascades: $col$m$s$xs12.

This means that if you set col={6} but don’t define xs, s, or m, the smaller breakpoints will expand the item to 12 columns instead of inheriting 6.

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

@HichamELBSI HichamELBSI requested a review from Adzouz September 25, 2025 14:10
@HichamELBSI HichamELBSI added the pr: fix This PR is fixing a bug label Sep 25, 2025
Copy link

changeset-bot bot commented Sep 25, 2025

🦋 Changeset detected

Latest commit: 8018392

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@strapi/design-system Major
@strapi/ui-primitives Major
@strapi/icons Major

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

Copy link

vercel bot commented Sep 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
design-system Ready Ready Preview Comment Oct 13, 2025 8:02am

Adzouz
Adzouz previously approved these changes Sep 26, 2025
Copy link
Contributor

@Adzouz Adzouz left a 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.

@HichamELBSI
Copy link
Collaborator Author

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.

Yes, that's why this is something I will mention

Copy link
Contributor

@Adzouz Adzouz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, approved 👏

@HichamELBSI HichamELBSI added the flag: don't merge This PR should not be merged at the moment label Sep 30, 2025
@HichamELBSI
Copy link
Collaborator Author

Because of the potential regression on the responsive that this PR can introduce, we'll wait for the stable release to merge this.

@HichamELBSI HichamELBSI force-pushed the fix/grid-item-column-fallback branch from 4812a3a to 8018392 Compare October 13, 2025 07:54
@HichamELBSI HichamELBSI removed the flag: don't merge This PR should not be merged at the moment label Oct 13, 2025
@HichamELBSI HichamELBSI merged commit 2168375 into main Oct 13, 2025
11 of 12 checks passed
@HichamELBSI HichamELBSI deleted the fix/grid-item-column-fallback branch October 13, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted pr: fix This PR is fixing a bug source: design-system relates to design-system package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants