Skip to content
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(grid): add narrow grid support to CSS Grid #10934

Merged

Conversation

joshblack
Copy link
Contributor

@joshblack joshblack commented Mar 7, 2022

Closes #10845

This PR reintroduces the narrow grid support to the CSS Grid and includes support for deriving the grid from the @carbon/grid package configuration.

It also documents some of the architectural decisions of the package, including testing scenarios, and updates the migration guide for @carbon/grid to include any changes.

This PR also updates @carbon/styles so that teams can easily use the flexbox grid instead of the CSS Grid with a $use-flexbox-grid flag. By default, the grid entry point will emit CSS Grid styles.

Changelog

New

  • Add usage docs for @carbon/grid
  • Add support for hanging on the grid with ColumnHang

Changed

  • Update v11 migration docs for @carbon/grid
  • Update usage docs for @carbon/styles
  • Update styles for CSS Grid Preview
  • Update @carbon/grid to not emit styles by default
  • Update mixin for CSS Grid to support building from config and supporting mixed subgrids

Removed

Testing / Reviewing

  • Grid Preview
  • Grid Storybook
    • v11
      • CSS Grid implementation works as expected
      • FlexboxGrid implementation works as expected
    • v10, flexbox implementation is unchanged
  • Verify subgrid matches the intended alignment when mixing modes

image

@netlify
Copy link

netlify bot commented Mar 7, 2022

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 14abfa0

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/622a4f4a5851190009147be0

😎 Browse the preview: https://deploy-preview-10934--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Mar 7, 2022

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 14abfa0

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/622a4f4a457d130008a175e3

😎 Browse the preview: https://deploy-preview-10934--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Mar 7, 2022

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 14abfa0

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/622a4f4a4297a20008513606

😎 Browse the preview: https://deploy-preview-10934--carbon-components-react.netlify.app

@joshblack joshblack marked this pull request as ready for review March 9, 2022 18:36
@joshblack joshblack requested review from a team as code owners March 9, 2022 18:36
@joshblack joshblack requested a review from abbeyhrt March 9, 2022 18:36
@joshblack
Copy link
Contributor Author

@tay1orjones @abbeyhrt let me know if you want to go over this together at all, the PR size just kept growing 🤦

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

I'm all in man, great work! 🥇

This will help unblock some issues I'm seeing updating the website to v11. Notably the "not emitting styles by default" change and exposing the scss utility helpers. Thank you!

I think it's worth cutting a patch for this so we can begin to iterate on it with the website asap.

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

This is all so cool! It looks good to me as far as I can tell, thanks for going over it with me Josh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide experimental narrow grid mode support in CSS Grid
3 participants