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

Styled-system upgrade tracking #168

Closed
36 tasks done
shawnbot opened this issue Aug 1, 2018 · 2 comments
Closed
36 tasks done

Styled-system upgrade tracking #168

shawnbot opened this issue Aug 1, 2018 · 2 comments
Assignees

Comments

@shawnbot
Copy link
Contributor

shawnbot commented Aug 1, 2018

What to do

  1. Factor out any instances of theme.colors.bg and theme.colors.border, since those aren't there anymore. Some components used these to fill in the gaps left by our CSS components. Please leave notes in Add docs for migrating to system props #161 if you come across any gotchas.

  2. Add common system props. See contributing.md (introduced in initial contributing/dev docs #180) for details.

  3. Refactor tests to get them passing again.

    • For components with only system props (system components?), we can get by with snapshot tests for now. Snapshots are stored in git, so we can look at them after the first run (when jest prompts us to update them) and spot-check the files generated in src/__tests__/__snapshots__ for any potential issues.

    • Use the expect(render(<X />)).toHaveStyleRule() to test individual style props. For props that are based on the theme, you can import theme from '../theme' and pass theme={theme}, then compare the style rule value to the one in the theme. Note that it's not currently possible to test responsive props. See Refactor tests to work with emotion #165 for more info.

    • For components that render system components (X = props => <Block {...props} />), be sure to spread the base component's propTypes into your components' prop-types.

  4. Rename all tag props to is to match styled-system conventions.

Components

Docs / Examples

  • Replace all instances of color names without a step (red) with "stepped" equivalents (red.5) in all three color props: bg, color, and borderColor (see First stab at migration docs #185 for info). @emplums
  • Replace all instances of tag="foo" with is="foo" @emplums

Etc.

@shawnbot
Copy link
Contributor Author

shawnbot commented Aug 8, 2018

Since we decided to do the Box deprecating in a future release, are we done with this??

@shawnbot
Copy link
Contributor Author

shawnbot commented Aug 8, 2018

I crossed out the Box item (to be dealt with in #189) and am closing this because we're DONE!

@shawnbot shawnbot closed this as completed Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants