Commit Graph
2294 Commits
Author SHA1 Message Date
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
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 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
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
Ben Alpert 5becbe3f08 Remove obsolete tests with new tree-walking 2015-11-03 17:03:40 -08:00
Ben Alpert 19e2cf5ad5 Make ReactEmptyComponent-test not swallow logs 2015-11-03 17:03:40 -08:00
Ben Alpert 2858bca2e3 Merge pull request #5361 from ali/warn-on-missing-event-handlers
Warn on missing event handler properties
2015-11-02 20:23:20 -08:00
Ali Ukani 9ad4be0316 Warn on missing event handler properties
Fixes #3548. Warns on properties that are case-insensitive matches for
registered event names (e.g. "onclick" instead of "onClick").
2015-11-02 23:13:20 -05:00
Ben Alpert c802e9ede9 Test fixups after #4993 2015-11-02 18:26:52 -08:00
Ben Alpert d2888798f0 Merge pull request #4993 from jsdf/shallow-render-lifecycle
Run all component lifecycle methods when shallow rendering
2015-11-02 18:16:55 -08:00
conorhastings fbb8d2fe2d Show a friendly error when using TestUtils.Simulate with shallow rendering 2015-11-02 20:14:26 -05:00
Paul O’Shannessy 72a11421d2 Merge pull request #5367 from spicyj/haste-manifest
Add package.json for react-haste package
2015-11-02 11:15:28 -08:00
Ben Alpert d44c45f8a5 Add package.json for react-haste package
This will probably go away in a release or two.
2015-11-02 11:03:18 -08:00
chico 8a9039891b maskedContext should not be instantiated as null 2015-10-31 04:05:44 +03:00
Jim a2d26c82ea Merge pull request #5093 from jimfb/avoid-children-to-string-coercion
Should not coerce children prop on custom elements to a string.  Fixes #5088
2015-10-30 13:42:05 -07:00
Paul O’Shannessy 68eb1a6fb6 Add integrity to HTML property config 2015-10-30 13:35:51 -07:00
Jim 86fc94750a Should not coerce children prop on custom elements to a string. Fixes #5088 2015-10-30 13:33:21 -07:00
Alex DajaniandPaul O’Shannessy aa6fcf902c Fixed unclear wording in comment
Perhaps not understanding what "key a set a fragment..." is supposed to mean.  Hopefully I'm not misreading this as a typo.
2015-10-29 23:20:18 -07:00
Sebastian Markbåge d914f15c0e Revert "Overwriting of mutated props in constructor" 2015-10-29 22:36:38 -07:00
Christoph Pojer 1384d43f53 Merge pull request #5321 from cpojer/update-tests
Update tests
2015-10-29 18:42:12 -07:00
Jim d15e2fcd8e Merge pull request #5320 from drdelambre/overwrite_props
Overwriting of mutated props in constructor
2015-10-29 18:15:52 -07:00
Alex Boatwright cc09ed940f classes in the tests when can 2015-10-29 18:11:28 -07:00
Paul O’Shannessy 12c214a992 Merge pull request #5328 from zpao/non-native-event-name-dispatch
Use a custom event type for our event dispatching in ReactErrorUtils
2015-10-29 17:54:18 -07:00
cpojer ac17bdaaba Remove generateFromMetadata and getMetadata usage. 2015-10-29 15:45:30 -07:00
Paul O’Shannessy 29523d0113 Use a custom event type for our event dispatching in ReactErrorUtils
It turns out that IE doesn't like when native events types are used. There may
have been more involved at play but this fixes the issue.
2015-10-29 15:39:14 -07:00
Paul O’Shannessy d95a2239a8 Use a getter for canDefineProperty check.
This ensures that we treat es5-sham as a broken implementation of defineProperty and we won't try to use it.
2015-10-29 15:17:50 -07:00
cpojer 2ecfc4f8fb Codemod old APIs away. 2015-10-29 12:40:52 -07:00
Alex Boatwright c341269ab2 simple fix to prevent overwriting of mutated props 2015-10-28 23:37:29 -07:00
Evan Vosberg f8b4affb87 Add non-standard property for supporting Safari mask-icon.
See also: https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9.html#//apple_ref/doc/uid/TP40014305-CH9-SW20
2015-10-28 17:35:43 +01:00
Ben Alpert 7f205e9c1b Make sure top-level callback has correct context
Closes #5125 -- incorporates essentially the same fix with a much simpler test case. Thanks @yiminghe for reporting!
2015-10-27 13:11:45 -07:00
Ben Alpert 65b9ceb4f8 Merge pull request #5209 from antoaravinth/5189
Don't instrument listeners for ReactDefaultPerf
2015-10-27 11:59:02 -07:00
Ram Kaniyur ad654ceb66 Took keyOf outside the function. 2015-10-28 00:48:54 +11:00