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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update styled-components to the latest version 馃殌 #806

Closed
wants to merge 6 commits into from

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Oct 15, 2018

The dependency styled-components was updated from 3.4.10 to 4.0.0.

This version is not covered by your current version range.

If you don鈥檛 accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


Find out more about this release.

FAQ and help

There is a collection of frequently asked questions. If those don鈥檛 help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 馃尨

greenkeeper bot added a commit that referenced this pull request Oct 17, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Oct 17, 2018

Update to this version instead 馃殌

greenkeeper bot added a commit that referenced this pull request Oct 18, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Oct 18, 2018

Update to this version instead 馃殌

Release Notes for v4.0.2
  • Handle an edge case where an at-rule was being supplied to the self-reference stylis plugin at an incorrect context setting, by @probablyup (see #2114)

greenkeeper bot added a commit that referenced this pull request Oct 30, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Oct 30, 2018

Update to this version instead 馃殌

Release Notes for v4.0.3
  • Interpolating a styled component into a string now returns the static component selector (emotion cross-compat)

    import styled from 'styled-components';
    

    const Comp = styled.div</span></span> <span class="pl-s"> color: red;</span> <span class="pl-s"><span class="pl-pds">;

    </span><span class="pl-s1"><span class="pl-pse">${</span>Comp<span class="pl-pse">}</span></span><span class="pl-pds">; // .sc-hash

  • Add suppressClassNameWarning prop to disable warning when wrapping a React component with styled() and the className isn't used, by @Fer0x (see #2156)

  • Expose ThemeContext to enable static contextType support for React 16.6, by @imbhargav5 (see #2152)

  • Filter out invalid HTML attributes from attrs, by @Fer0x (see #2133)

  • Add warning if an attrs prop is a function that returns an element, by @timswalling (see #2162)

@sareh sareh added this to PR In Progress in News Article via automation Nov 1, 2018
@benjaminhobbs benjaminhobbs added the blocked This issue should not be worked on until another internal issue is completed - see desc for details label Nov 3, 2018
@benjaminhobbs
Copy link
Contributor

benjaminhobbs commented Nov 3, 2018

Done changes needed in this update but now blocked by styled-components/jest-styled-components#191

Similar changes will also be needed in Storybook. Forgot about those in the commits above.

greenkeeper bot added a commit that referenced this pull request Nov 12, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Nov 12, 2018

Update to this version instead 馃殌

Release Notes for v4.1.0
  • Performance optimization for fully static (no function interpolation) styled-components by avoiding using ThemeConsumer since it isn't necessary, by @mxstbr (see #2166)

  • Allow disabling "speedy" mode via global SC_DISABLE_SPEEDY variable, by @devrelm (see #2185)

    To make use of this, you can either set SC_DISABLE_SPEEDY in your app's entry file or use something like webpack.DefinePlugin to do it at build time:

    webpack.DefinePlugin({
      SC_DISABLE_SPEEDY: true,
    });
  • Attrs can now be passed a function (see #2200); thanks @oliverlaz for providing an early PoC PR for this!

    e.g.:

    styled.div.attrs(props => ({ 'aria-title': props.title }))``;
  • Fix the warnTooManyClasses dev helper not being totally dead code eliminated in production (see #2200)

  • Deprecate functions as object keys for object-form attrs (see #2200)

    e.g.:

    styled.div.attrs({ 'aria-title': props => props.title })``; // bad
    styled.div.attrs(props => ({ 'aria-title': props.title }))``; // good

    Support for this will be removed in styled-components v5. The primary impetus behind this change is to eliminate confusion around basic functions vs styled-components vs React components provided as values in the object-form attrs constructor, each of which has different handling behaviors. The single outer function to receive the props and then return a props object is conceptually simpler.

  • The standalone CDN build is now UMD-compliant and can be used with RequireJS, etc.

  • Add pixels to unitless numbers when object interpolation is used, by @Fer0x (see #2173)

  • Trying to interpolate a non-styled component into CSS is now a hard error, rather than a warning (see #2173)

greenkeeper bot added a commit that referenced this pull request Nov 12, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Nov 12, 2018

Update to this version instead 馃殌

Release Notes for v4.1.1
  • Put back the try/catch guard around a part of the flattener that sometimes receives undetectable SFCs (fixes an errant hard error in an edge case)

@jtart
Copy link
Contributor

jtart commented Nov 13, 2018

Closed in favour of #937.

@jtart jtart closed this Nov 13, 2018
News Article automation moved this from PR In Progress to Done Nov 13, 2018
@jtart jtart deleted the greenkeeper/styled-components-4.0.0 branch November 13, 2018 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue should not be worked on until another internal issue is completed - see desc for details
Projects
No open projects
News Article
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants