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

allow attrs to be called with a function #2200

Merged
merged 15 commits into from Nov 11, 2018

Conversation

Projects
None yet
3 participants
@probablyup
Contributor

probablyup commented Nov 10, 2018

attrs is now implemented as an array internally to make it
easier to do merging etc and handle different types of things
passed in

Closes #1171

This is an alternate implementation of #2176 that will allow more & easier customization in the future (and is smaller.)

probablyup added some commits Nov 10, 2018

allow attrs to be called with a function
attrs is now implemented as an array internally to make it
easier to do merging etc and handle different types of things
passed in
same deal for native / primitives
also added some missing attrs tests for primitives

@probablyup probablyup requested review from imbhargav5, kitten and mxstbr Nov 10, 2018

@imbhargav5

This comment has been minimized.

Member

imbhargav5 commented Nov 10, 2018

This is so amazing. :D Also, love the "probably a bad idea" test cases.

@probablyup

This comment has been minimized.

Contributor

probablyup commented Nov 10, 2018

Haha I can't take credit for those tests!

@probablyup probablyup force-pushed the fn-attrs branch from 35467b6 to 98d95cf Nov 10, 2018

probablyup added some commits Nov 10, 2018

don't do flow through eslint
it makes configuring IDEs a pain

@probablyup probablyup force-pushed the fn-attrs branch from e61846c to 49441ee Nov 10, 2018

@probablyup

This comment has been minimized.

Contributor

probablyup commented Nov 10, 2018

mmk this is ready to go

probablyup and others added some commits Nov 10, 2018

deprecate object-form attrs with functions as keys
See the changelog entry for more information on rationale.
add SC_DISABLE_SPEEDY runtime override (#2185)
* add SC_DISABLE_SPEEDY runtime override

* refactor SC_ATTR tests into their own 'describe' section

* add tests for DISABLE_SPEEDY and SC_DISABLE_SPEEDY global variable

* add CHANGELOG entry

@probablyup probablyup force-pushed the fn-attrs branch from ba8a04c to 48ea24b Nov 11, 2018

@imbhargav5

LGTM!

@imbhargav5 imbhargav5 merged commit d6922fd into master Nov 11, 2018

3 checks passed

bundlesize ./dist/styled-components.min.js: 15.27KB < maxSize 16KB (gzip)(49B larger than master, careful!)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@imbhargav5

This comment has been minimized.

Member

imbhargav5 commented Nov 11, 2018

🔥

@probablyup probablyup deleted the fn-attrs branch Nov 11, 2018

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