-
Notifications
You must be signed in to change notification settings - Fork 128
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
[RFC] Grid #535
Comments
|
I think we should move to the no grid approach. My biggest concern is that gutter/col definition exists (and should be followed, since it it's part of our visual language) within our design system. By removing the grid and letting the consumer decide how to arrange things, it will probably mean we will end up with different spacings across different domains. |
And we can't also discard the convenience of grid as utility vs redoing it for scratch over and over. If we don't provide a built in grid, we could maybe nudge into the right direction like suggesting libraries (like https://rebassjs.org/reflexbox/) and configuration for it to match our gutter/col usage. |
Alright, there seems to be a consensus to drop support for a grid in Circuit UI. What does that mean for the existing Grid components? I'd like to discourage their use, but do we fully deprecate them or keep them around for legacy reasons? |
I would deprecate and link to documentation for migrating to any other grid system we choose. We could write it in a |
I think we need to discuss this in further details before we go for deprecation. The majority of our web context is still using the Grid. What I propose is:
Let's be careful and remember that the design system is meant to power up our developers in their current scenarios. Not provide an experience that most of them can't comply to. |
Naturally I wasn't suggesting a deprecation without a solid proof of concept + migration guide. Looks like we're on the same page 👌 |
Hey, I'm late to the party. :D Generally I feel we don't need a dependency for the Grid. At this point, I think even the Dashboard would be fine with Flexbox (and maybe the Grid?). Could well be that we bump the build targets for iOS and Android early next year. I still feel we should
We want to make sure designs and implementations use the grids that are part of the design system and we want consistency. |
Here's an adaptation of the Circuit UI Grid using CSS Grid. The API should be pretty much identical and so should the spacing/gutter be. |
We're still using a float-based grid but it's not because of browser support anymore. It's because we haven't updated it yet. See #535
We're still using a float-based grid but it's not because of browser support anymore. It's because we haven't updated it yet. See #535
* Remove workarounds for legacy browsers * Add draft migration guide entry and remove polyfill docs * Remove mention of browser support from Grid docs We're still using a float-based grid but it's not because of browser support anymore. It's because we haven't updated it yet. See #535 * Start using onChange instead of onClick in RadioButton and Checkbox * Remove unused shared prop types * Remove unused script The old clean script was pointing to an old path * Reintroduce clean script but fixed * Remove unnecessary skipLibCheck from tsconfigs * Deduplicate * Add draft docs * Remove unused imports in SB docs * Compile Circuit UI to es2018 * Update docs * Transpile to es2017 * Update docs and add draft contributor docs for browser support * Do not include all @types * Remove unused imports * Fix storybook warning * Update browser support for contributors docs * Add changeset
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Add a comment explaining why the issue is still relevant to prevent it from being closed. |
The grid components will be marked as legacy in Circuit UI v7. We recommend using the native CSS Grid instead. We might explore patterns for column and gutter widths in the future. |
Components to amend
Grid, Row, Col
Context
Circuit UI currently provides a float-based grid system. This is mostly because SumUp's dashboard is still supporting very old browsers (i.e., webviews on old Android phones) with bad flexbox and no CSS grid support. Users of Circuit UI aren't all happy with this and provided some feedback:
divs
that pollute the JSX and DOM.Goals
Proposals
1. No grid / BYO
CSS Grid is now supported by 93.5% of globally used browsers. It covers even the most advanced use cases (except nested subgrids). Plus there are a plethora of third-party React grid libraries to choose from. So do we still need to provide a grid system with Circuit UI?
The only thing we need to provide is consistent values for the gutter in the
theme
(see also #534).2. Improve the grid
We could add additional features to the current grid components, e.g. to support nested grids. Some users also suggested to switch to flexbox and while flexbox is arguably more powerful than floats, it's still only meant for one-dimensional layouts (versus CSS Grid's two dimensions).
The text was updated successfully, but these errors were encountered: