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

What should we do with the styled-system? #302

Open
nlopin opened this issue Feb 19, 2023 · 2 comments
Open

What should we do with the styled-system? #302

nlopin opened this issue Feb 19, 2023 · 2 comments
Labels
conversation needed Issues that may need to go to a broader conversation

Comments

@nlopin
Copy link
Contributor

nlopin commented Feb 19, 2023

Context

We use low-level styled-system library to provide nice component css-props and shortcuts like p, m, etc. Those props are crucial for the developer experience and are actively used across codebases together with the per breakpoint value setting like:

<Box m={{_: 2, small: 6}}> ...</Box>

Problem

The last time when styled-system was updated was in May, 2020. Even though the API is stable, issues with types pop up here and there.

styled-components at the same time is evolving, and version 6.0 will be shipped this year. There is a risk that styled-system won't work with it.

Options

Here are the steps we can proactively take to mitigate future issues. Please, add yours!

Option #1. Fork and support the styled-system library for Wave's use case only

Even though the codebase of the styled-system consists of many files, they are primarily configurations of what to expose in each helper. We'll have flexibility to remove things we don't use and keep the surface smaller than now.

The downsides:

  • costs to maintain the library
  • current codebase is in plain JS (there are tests, though)

Option #2. Implement a set of helpers with the same functionality

We use only a subset of the styled-system, it could be easier to implement the featureset in place.

Option #3. Migrate to other solution.

@lloydaf
Copy link
Contributor

lloydaf commented Feb 21, 2023

Can you provide some examples of how this is creating a problem?

@lloydaf lloydaf added the conversation needed Issues that may need to go to a broader conversation label Feb 21, 2023
@nlopin
Copy link
Contributor Author

nlopin commented Feb 23, 2023

One example is the issue with the Table component, solved in the ongoing PR.

New major is another potential risk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conversation needed Issues that may need to go to a broader conversation
Development

No branches or pull requests

2 participants