Commit Graph

2325 Commits

Author SHA1 Message Date
Cheng Lou
60af7d1c3d Remove unreachable return from shouldUpdateReactComponent
Eslint didn't catch this (we do have this rule turned on) because it's a
big. There are no other locations I think. Detected that when I minified
some code.
2015-11-21 18:00:40 -05:00
Ben Alpert
812e1a877f Merge pull request #5500 from hejld/master
Update DOM_OPERATION_TYPES mappings for ReactDefaultPerfAnalysis
2015-11-20 11:21:06 -08:00
Sebastian Markbåge
64f795e5ef Merge pull request #5411 from simonewebdesign/master
ReactShallowRenderer.render returns the rendered output
2015-11-20 11:20:37 -08:00
Ben Alpert
907dee2b5d Merge pull request #5451 from spicyj/empty-comments
Use comment nodes for empty components
2015-11-19 16:56:23 -08:00
jim
1d071c20e8 Removed unnecessary variables/assertions. 2015-11-19 11:32:51 -08:00
Jim
c643ecd7c7 Merge pull request #5495 from jimfb/remove-public-dom-instance
Remove legacy dom node/ref stuff.
2015-11-19 11:27:24 -08:00
hejld
a3779421a1 Update DOM_OPERATION_TYPES mappings for ReactDefaultPerfAnalysis 2015-11-18 20:58:32 +01:00
Ben Alpert
1a6d1e74e0 Merge pull request #5330 from laskos/fix-shallow-rendering-function-refs
Fix shallow renderer with ref as function
2015-11-17 23:53:00 -08:00
Paul O’Shannessy
c4f134883d Support reversed for <ol>s 2015-11-17 22:42:01 -08:00
Paul O’Shannessy
c07b304c76 Merge pull request #5381 from kevinrobinson/react-dom-server-package
Add additional secret property to build artifact for react-dom-server
2015-11-17 16:48:08 -08:00
jim
538d0b08f2 Remove legacy dom node/ref stuff. 2015-11-17 15:30:35 -08:00
Ben Alpert
e03df26e62 Merge pull request #5493 from spicyj/gh-4589
Finish comment in ReactDOMComponentTree
2015-11-17 09:54:23 -08:00
Ben Alpert
6c89857cdc Finish comment in ReactDOMComponentTree 2015-11-17 09:41:24 -08:00
hejld
ba8c987391 Fix typos and redundant words 2015-11-17 12:39:29 +01:00
hejld
94504c3767 Remove rendundant 'the'; keep iff (if and only if) 2015-11-16 20:05:37 +01:00
Ben Alpert
ea31f924b8 Merge pull request #5368 from spicyj/adler32
adler32: Properly break loop into 4096-char blocks
2015-11-11 22:21:22 -08:00
Paul O’Shannessy
8104262043 Merge pull request #5390 from chicoxyzzy/arrayof-objectof-tests
Add validation for arrayOf and objectOf in ReactPropTypes
2015-11-11 16:48:33 -08:00
Sebastian Markbåge
951f3b6ba8 Merge pull request #5406 from acdlite/better-error-message-for-setState-in-constructor
Updates the warning that is displayed when `setState` is called within either `render` or a component constructor.
2015-11-11 16:45:12 -08:00
Ben Alpert
358140679c Use comment nodes for empty components
This makes more sense and avoids DOM nesting problems.

![image](https://cloud.githubusercontent.com/assets/6820/11098713/952348ca-885b-11e5-9757-e4a76467b0b8.png)

(ReactSimpleEmptyComponent isn't used here but React Native can use it as it currently does.)
2015-11-11 10:04:14 -08:00
Nicholas Clawson
e39f51429b Allow nonce attribute 2015-11-10 10:46:30 -08:00
Ben Alpert
b4b1adddda Merge pull request #5434 from spicyj/two-reconcile
Handle multiple DOM updates without interference
2015-11-09 17:38:11 -08:00
Ben Alpert
4b80ea23a1 Merge pull request #5433 from spicyj/unmount-children-order
Unmount children before unsetting DOM node info
2015-11-09 17:38:06 -08:00
Ben Alpert
f9a8bdcafe Handle multiple DOM updates without interference
This test failed before! How embarrassing.
2015-11-09 15:22:23 -08:00
Ben Alpert
586653935c Unmount children before unsetting DOM node info 2015-11-09 15:04:57 -08:00
Simone Vittori
c8b8c818b5 ReactShallowRenderer.render returns the rendered output 2015-11-08 13:07:07 +00:00
Jim
2f7f1a9d45 Merge pull request #5405 from yangshun/inconsistent-error-messages
More consistent error message for findRenderedDOMComponentWithX
2015-11-05 12:03:05 -08:00
Andrew Clark
5fec308d60 Updates the warning that is displayed when setState is called
within either `render` or a component constructor.

Follow up to #5343
2015-11-05 11:12:58 -08:00
Tay Yang Shun
d16754125f More consistent error message for findRenderedDOMComponentWithX 2015-11-06 03:05:08 +08:00
Jim
59dd7b33ee Merge pull request #5391 from zjjw/transition_timeouts
Clear transition timeouts when component unmounts. Fixes #4876
2015-11-05 10:32:18 -08:00
jj
73b496db95 Clear transition timeouts when component unmounts. Fixes #4876 2015-11-05 10:23:15 -08:00
chico
a86d25d584 update error messages 2015-11-05 06:12:27 +03:00
chico
8987522a2a remove eslint-disable when possible and update eslint version 2015-11-05 05:11:39 +03:00
Ben Alpert
9419976e51 Revert #4993 with an added test for refs
We were shallow-rendering a component that used refs at FB so this can't go in as-is. It's a little unclear what we _should_ do though, since there is nothing to hold a ref to (since we're shallowly rendering) and we generally promise that child refs are resolved before a parent's componentDidMount. Also, changing shallow rendering to use the original `_renderValidatedComponent` (instead of `_renderValidatedComponentWithoutOwnerOrContext`) breaks tests because now the `_owner` field doesn't match up for `toEqual` (non-null in `getRenderOutput` but null if constructed in a test).
2015-11-04 17:53:40 -08:00
chico
7ae67916cc Adding validation for arrayOf and objectOf in ReactPropTypes 2015-11-05 00:20:33 +03:00
Ben Alpert
c193d1a0c2 Don't put IDs in the DOM in createElement mode 2015-11-04 11:39:44 -08:00
Ben Alpert
b80f676d27 Add hooks back for devtools 2015-11-04 11:39:44 -08:00
Ben Alpert
35543c6312 Remove unused modules
- Remove last references to ReactInstanceHandles (still used in responder unit test)
- Remove ClientReactRootIndex/ServerReactRootIndex
2015-11-04 11:39:44 -08:00
Ben Alpert
3cebadaa6b Remove now-unused _rootNodeID from composites 2015-11-04 11:39:44 -08:00
Ben Alpert
e48c8be556 Use incrementing numerical IDs to identify DOM components 2015-11-04 11:39:44 -08:00
Ben Alpert
f06ddf7905 Turn ReactInstanceHandles-test into ReactDOMTreeTraversal-test
This test relied on the fact that ReactDOMComponent still produced hierarchical IDs -- although this module could be used standalone, we're replacing it completely so it makes more sense to just move the tests over to test ReactDOMTreeTraversal.
2015-11-04 11:39:44 -08:00
Ben Alpert
663c4b7d2e Stop relying on hierarchical IDs in ReactDefaultPerf 2015-11-04 11:39:43 -08:00
Ben Alpert
5d94d7d43c Perf: Static children count for wasted time 2015-11-04 11:39:43 -08:00
Ben Alpert
4ba0e95a96 Kill ReactMount.getNode/getID/purgeID with fire 2015-11-04 11:39:43 -08:00
Ben Alpert
796f8c353c put/deleteListener take an instance, not an ID
This removes SimpleEventPlugin's dependency on ReactMount.getID.
2015-11-04 11:39:43 -08:00
Ben Alpert
d11ccd6956 Propagate events based on component tree, not IDs 2015-11-04 11:39:43 -08:00
Ben Alpert
f470cb88f8 Events: Pass native instances up until propagation
Next step: take advantage of having the native instances in EventPropagators instead of converting right back to IDs.
2015-11-04 11:39:43 -08:00
Ben Alpert
6d20556c78 Add functions to find the instance given a node 2015-11-03 17:03:40 -08:00
Ben Alpert
ce528457a4 ReactDOMComponentTree
New module! With this, we have a new module that uses the component tree to store DOM nodes. Most of the logic in this file relates to markup adoption -- if we were to drop that (along with server rendering) this file could just be a `return inst._nativeNode;`.

This works with useCreateElement only because we need to reference each node as it's created.

Events is now the only thing using ReactMount.getNode -- I'll introduce pointers back from the DOM nodes (and a `ReactDOMComponentTree.getInstanceFromNode`) and make that work.
2015-11-03 17:03:40 -08:00
Ben Alpert
5a7c273a1b Always do useCreateElement for updates
Initial render can still be a markup string.
2015-11-03 17:03:40 -08:00
Ben Alpert
276ef737fe Make ReactDOMComponent-test pass with useCreateElement 2015-11-03 17:03:40 -08:00