-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
v4 final #2097
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's been superceded by "module"
* remove no-parser build * fix primitives build output
* Update ThemeProvider to use new context API * Fix flow * Set theme as context * Fix nested ThemeProviders * Add ThemeProvider tests * Add missing propagation test * Improve ThemeProvider propagation test * Rename children spy function * Add flow types * Upgrade withTheme to use new context * Migrate StyledComponent to use new context api * Add ThemeContextShape type * Cache ThemeConsumer render function * Upgrade enzyme and revert back tests * Update lockfile * Migrate StyleSheetManager * Use StyleSheetConsumer * Fix StyleSheetManager tests * Update ssr snapshot * Revert back enzyme adapter * Remove extraneous dependency * Cleanup context shape * Fix tests * Add StyleSheet type and EMPTY_OBJECT * Update lockfile * Fix jest/jsdom localStorage errors * Migrate StyledNativeComponent * Fix integration test * Fix some primitive tests * Fix tests * Fix flow * Fix flow * Update memoize-one flow-typed * Add StrictMode test * Remove extraneous dependencies * Cleanup flow definitions * Fix import statement * Change react peerDependency * Rename variable * Add changelog entry * Cleanup import statement * Fix errors after merge * Refactor ThemeProvider test to use withTheme and styled
* Upgrade dependencies * Bump travis node version
Now that it matches on word boundaries only, it isn't doing what I had intended to remove usage of the "stream" module.
* fix benchmarks build * rearrange some code * cache functions & use bind Does seem to have a small perf bonus over class binding
* fix removal of PropTypes import in production builds Frustrating, but because rollup doesn't have an internal concept of prod vs dev, it doesn't set NODE_ENV accordingly and babel uses the same config for everything. So we are able to eliminate the references to prop types, but the module import itself is not being eliminated without this change. * rollup cleanup Now that we're testing on Node 8+ we don't need to use Object.assign() anymore
* update sandbox to latest react, add webpack stuff for __VERSION__ alias * add a new [data-styled-version] attr to styles This will be hardcoded into the bundles at each release. Basically, it allows multiple versions of styled components to peacefully coexist on a page. There will still be a warning though since this isn't recommended. * rename [data-styled-components] to [data-styled] to avoid legacy conflicts styled components v3 and lower will still match against the newly updated styled component versioned tags, so we'll change the primary attribute so they're undetectable by legacy s-c * temporarily disable jest-styled-components integration test They'll need to adjust to the new data attribute and push out a beta version before we can turn this back on. * more obvious mock version in snapshots
This allows babel users to drop the element whitelist and save some bytes.
* fix standalone browser build something about the "umd" setting in recent versions of rollup just doesn't work properly * fix integration tests * go away flow
* Implement lazy keyframes - keyframes`` helper now returns Keyframes model - keyframes styles now inserting only with component rendering - To get animation name use `.getName()` method - some tests was changed to proper work with new `keyframes` helper * Optimize keyframes interpolation
* add keyframes changes to CHANGELOG * Add PR link * adjust some wording * Update CHANGELOG.md
They are no longer a thing in v16+
It's lighter and faster since its memoized. Saw some nice perf gain in benchmarking. before: ---Mount deep tree--- 17.14 ±01.82 ms (S/L) 13.06/04.08 ms ---Mount wide tree--- 22.89 ±02.67 ms (S/L) 16.91/05.98 ms ---Update dynamic styles--- 23.47 ±05.14 ms (S/L) 07.98/15.49 ms after: ---Mount deep tree--- 16.07 ±01.72 ms (S/L) 12.03/04.05 ms ---Mount wide tree--- 21.45 ±02.74 ms (S/L) 15.59/05.85 ms ---Update dynamic styles--- 22.49 ±05.28 ms (S/L) 07.50/14.99 ms
Alternate prop validator
Using the React-provided test renderer and test utilities. I couldn't figure out how to deal with the innerRef tests yet, but since that API is going away in one of my open PRs, I figured it wasn't worth the time to get working.
refactor away from enzyme
(cherry picked from commit cf1e930)
* create macro * add sourceType module when using babel.template * babel.types needs to be passed down to visitors * add tests * add pureAnnotation visitor from babel-plugin-styled-components * add test with require() * export 'styled-components/macro' * add css to macro * add keyframes to macro * update test snapshots * allow to import all helpers from src/index.js * add error when tags are not used with template literals * add test : should allow all helpers exported from styled-components * add injectGlobal to taggedTemplateImports * add missing tests and refactor tests * add typescript types * add flow types * replace injectGlobal by createGlobalStyle * just use babel-plugin-styled-components and apply to the whole file * update babel-plugin-styled-components to 1.8.0 * remove typescript files * add comments and fix styling of code * generate allowedImports from src/index.js * Remove unnecessary test to check allowedImports * move babel-plugin-styled-components to peerDependencies * fix tests : add babel-plugin-styled-components to devDependencies * move babel-plugin-styled-components to deps, with a lenient version * add macro to files * add changelog entry
* add warning when className prop is not used * remove comment * fix wording * add changelog * add tests
* fix createGlobalStyle HMR issue * clear out the window cache when resetting styled context
Adding, e.g., className="foo bar" caused the `classNameUseCheckInjector` to build a selector with multiple dots (`.foo...bar`) which causes an error in Chrome. This commit changes the classNames to be trimmed and excess spaces removed before the selector is constructred
Latest release broke support for uppercase aria/data attrs. This reverts commit af75481.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
develop -> master