Commit Graph

3719 Commits

Author SHA1 Message Date
Sebastian Markbage
df6388ab52 Add prettier-ignore where we do matrix style formatting 2017-03-13 16:57:13 -07:00
Ben Alpert
0d7b4d6dba 16.0.0-alpha.4 2017-03-13 08:54:41 -07:00
Ben Alpert
19c2649e02 Use fiber by default (#9155)
Affects our builds. But not in tests yet.
2017-03-10 17:06:02 -08:00
Dan Abramov
8de68c56f9 [Fiber] Remove unnecessary second getComponentName() (#9153)
* Remove unnecessary second getComponentName()

We already have one. The other one is also less fragile and doesn't throw on null type.

* Make setState in render warning check simpler

This skips it earlier since in most cases phase won't be "render".
This is unobservable.
2017-03-10 19:29:20 +00:00
Dan Abramov
6559b10b11 Use more widely supported emoji (#9139) 2017-03-09 00:55:36 +00:00
Dan Abramov
73378c9293 [Fiber] Performance measurements (#9071)
* wip

* better

* better

* track commits

* better

* wip

* Fix

* Add some lifecycles

* wip

* Naming

* Moar emojis

* Remove stacks in favor of a flag

* Fix Flow

* Gate behind __DEV__

* Revert flag for testing

* Measure all lifecycles

* Push it to the limits

* Polish

* Indent

* Refactor and track cascading updates

* More prominent warnings

* Make mark names themselves readable

This is useful for RN Systrace which doesn't let us assign labels after the fact.

* Keep track of how many effects we call

* Fix typo

* Do less work to reduce the overhead

* Fix lint

* Remove closure

* Remove unintentional formatting changes

* Add tests

* Fix test regex and record tests

* Disable irrelevant tests needed for ReactPerf

* Fix typo

* Fix lint and flow

* Don't treat cWM or cWRP as cascading

* Whitespace

* Update tests

* Gate callComponentWillUnmountWithTimerInDev definition by DEV
2017-03-08 18:28:53 +00:00
Dominic Gannaway
4e9d7ac833 Merge pull request #9096 from trueadm/component-tree-hook-dev
[Fiber] Split dev methods within ReactComponentTreeHook
2017-03-07 14:09:22 +00:00
Dominic Gannaway
a159e85c46 removed inline boolean checks for methods 2017-03-07 13:35:41 +00:00
Brandon Dail
6ca2140c73 Remove _resetEventPlugins, use jest.resetModuleRegistry (#9111)
* Move EventPluginRegistry._resetEventPlugins to DEV

This is not called during runtime at all and is only using in internal unit tests. Despite that, its currently being included in production builds. This change makes it so its only defined in DEV, which might even be too much (we can maybe inject it in our unit tests to avoid defining it at all in EventPluginRegistry)

* Remove _resetEventsPlugin, use resetModuleRegistry
2017-03-07 02:25:24 +00:00
Ben Alpert
d79c6ab995 Fiber DOM async feature flag (#9127)
D4662171
2017-03-06 16:21:43 -08:00
Vincent Taing
bb149c8170 Fix redundant null type coercion (#9114) 2017-03-06 15:20:12 -08:00
Ben Alpert
678cb70da2 Fix radio buttons using stale props in Fiber (#9126)
D4662269
2017-03-06 14:58:29 -08:00
Dominic Gannaway
f992d54157 removed describe.only 2017-03-06 15:18:21 +00:00
Dominic Gannaway
af4d249aa9 fixes tests so they correctly pass in fiber 2017-03-06 15:15:18 +00:00
Dominic Gannaway
b67a29a8ab Merge remote-tracking branch 'upstream/master' into component-tree-hook-dev 2017-03-06 14:55:33 +00:00
Dominic Gannaway
b572e3c907 moved non DEV methods to a new file called ReactFiberComponentTreeHook.js
This moves the non DEV methods to a new file called ReactFiberComponentTreeHook, updates existing references to DEV functions to remain inside DEV flags so they do not pull in ReactComponentTreeHook
2017-03-06 14:19:23 +00:00
jddxf
f939c1bca4 Don't reset the return fiber after cloning the child fibers, as we already do that while cloning. 2017-03-06 17:08:56 +08:00
Brandon Dail
12ad77d006 Remove EventPluginRegistry.getPluginModuleForEvent (#9110) 2017-03-06 00:52:56 -06:00
Brandon Dail
0c1f515faf Remove sliceChildren (#9109) 2017-03-06 00:52:39 -06:00
Brandon Dail
ceafdbf0a5 Remove ReactStateSetters (#9107) 2017-03-03 22:42:25 -06:00
Dan Abramov
d87c4d5e5c [Fiber] Don't schedule class fibers without relevant lifecycles for commit (#9105)
* Don't schedule class fibers without relevant lifecycles for commit

* Separate Update and Ref effects

* Simplify the exit condition

* Add missing annotation

* Write conditions differently to avoid an extra check

* Inline markUpdateIfNecessary()

* Inline markUpdateIfAlreadyInProgress()
2017-03-04 04:23:09 +00:00
Andrew Clark
ccde21cd2b Merge pull request #9088 from acdlite/testerrorutilsshim
Test that ReactErrorUtils module can be shimmed
2017-03-03 14:09:10 -08:00
Andrew Clark
e3f6c850c2 Merge pull request #9097 from acdlite/dontextractprodproptypeerror
Fix production propTypes test so it works with error code system
2017-03-03 11:06:04 -08:00
Sasha Aickin
fcf41e7ca2 Add async/await to unit tests; modify server rendering tests to use async/await. (#9089) 2017-03-03 10:34:14 -08:00
Andrew Clark
673f514f81 Fix PropTypes production test so it works with error code system 2017-03-02 16:12:50 -08:00
Dominic Gannaway
91de17ec52 added guards in place to prevent mixed prod+dev errors from occuring 2017-03-02 23:06:32 +00:00
Dominic Gannaway
397fd2b92e removed double semicolon 2017-03-02 22:09:12 +00:00
Dominic Gannaway
9a1db49259 removed comment 2017-03-02 22:08:15 +00:00
Dominic Gannaway
1f7cbb63e8 updated flow annotations 2017-03-02 22:06:46 +00:00
Dominic Gannaway
da9d91829e WIP - not sure how to get the Flow type working properly 2017-03-02 21:50:02 +00:00
Dominic Gannaway
e8f3f92a88 fixed flow issues and bug resulting in failing tests 2017-03-02 17:53:09 +00:00
Dominic Gannaway
0e23042e4b refactor of ReactComponentTreeHook to isolate dev methods 2017-03-02 16:15:37 +00:00
Andrew Clark
b1a565f8fa Convert shorthanded syntax for function Flow types to expanded form
Something in www's test pipeline isn't able to parse this.
2017-03-01 14:38:48 -08:00
Andrew Clark
a293d75f75 Test that ReactErrorUtils module can be shimmed
We do this in www
2017-03-01 14:38:48 -08:00
Andrew Clark
5881371b61 Merge pull request #9087 from acdlite/fixstringcasting
Fix string casting and remove Flow suppression comments
2017-03-01 13:51:17 -08:00
Sasha Aickin
3788654d57 Adding some server rendering unit tests. (#9055)
* Added a handful of SSR unit tests, ported from a previous pull request.

* Fixing linting errors

* Fixed a test helper function to properly report errors.

* Un-nested the new rendering tests. Updated the fiber test passing/not passing lists.

* Edited to comply with the react/jsx-space-before-closing eslint rule, which will soon be merged into master.

* Response to code review from @spicyj. Moved tests to separate file, reworked wording of test names, corrected use of canUseDom, and simplified tests against tagName. Thanks for the help, @spicyj!
2017-03-01 13:39:47 -08:00
Andrew Clark
5e5bc69230 Fix string casting and remove Flow suppression comments 2017-03-01 13:07:22 -08:00
Andrew Clark
d1ee199492 Fix usage of Boolean constructor 2017-03-01 12:30:32 -08:00
Andrew Clark
737dac4f03 areChildrenOffscreen -> shouldDeprioritizeSubtree 2017-03-01 10:56:31 -08:00
Andrew Clark
a1cd77db6e Pass type to areChildrenOffscreen, too 2017-03-01 10:56:31 -08:00
Andrew Clark
4602e768f3 Add areChildrenOffscreen to host config
Renderers can determine whether a node's children are offscreen based on
the host component's props. If so, they are given OffscreenPriority.

useSyncScheduling takes precedence.
2017-03-01 10:56:31 -08:00
Andrew Clark
4ef197b7d4 Check if we're in sync mode before deprioritizing hidden subtrees 2017-03-01 10:56:31 -08:00
Andrew Clark
81eef12507 Test that hidden subtrees render/update synchronously
When useSyncScheduling is set to true (as it is in the DOM renderer),
we shouldn't give OffscreenPriority to hidden subtrees. Everything
should be sync/task.
2017-03-01 10:56:31 -08:00
Andrew Clark
0585ee8b22 Merge pull request #9082 from acdlite/nobooleanorstringconstructors
Enforce no boolean or string constructors
2017-03-01 10:55:42 -08:00
Dominic Gannaway
8bc11649df Merge branch 'master' into remove-stack-dependencies-from-tests 2017-03-01 12:32:36 +00:00
Andrew Clark
1e9812e31b Convert usage of String and Boolean constructors 2017-02-28 18:56:57 -08:00
Sebastian Markbåge
e452e33741 providesModule -> explicit requires for cross-package dependencies (#9078)
* Add forwarding modules

* Codemod to use full package path outside of own package

Files that require modules from a different package than their own now
does so by the npm path name instead of the providesModule.

* Codemod fbjs module dependencies

* Fix gulp module mapping config

This is a bit lame but because of our module rewrite we need to white
list all the paths that we don't *don't* want to rewrite.
2017-02-28 18:42:52 -08:00
Ben Alpert
a269e7ec3f Enable react/jsx-space-before-closing rule (#9077)
We mostly do this but not 100%; I fixed the stragglers here with `./node_modules/.bin/eslint --fix src` and enabled the lint rule.
2017-02-28 09:03:08 -08:00
Dominic Gannaway
d2944bb5bf updates test-failing and tests-passing 2017-02-28 15:02:48 +00:00
Dominic Gannaway
04cd2b2a81 refactors/removes stack dependent tests to work with fiber 2017-02-28 15:00:42 +00:00