Sebastian Markbage
c6b2687bbd
Partially revert React.createDescriptor
...
We still have some issues to work out when the type argument is a mock.
2014-07-25 16:48:10 -07:00
Paul O’Shannessy
d526456951
Delete ImmutableObject-test.js
...
Our syncing doesn't update these tests so just remove them.
2014-07-25 16:47:48 -07:00
andres suarez
1961fecf2d
ReactTransitionChildMapping comment typo
2014-07-25 09:03:51 -04:00
Cheng Lou
af21aeb59f
Merge pull request #1924 from spicyj/autobind-bind
...
Use .bind when autobinding
2014-07-25 01:34:15 -07:00
Cheng Lou
7f584f3a49
Merge pull request #1511 from syranide/strsidefx
...
HAS_SIDE_EFFECTS should compare by type-casting
2014-07-24 13:38:01 -07:00
Paul O’Shannessy
f76d4dd48f
Merge pull request #1770 from eins78/master
...
Also list <form> in error message as possible culprit
2014-07-24 12:53:19 -07:00
Ben Alpert
f1508c4937
Use .bind when autobinding
...
This eliminates all of the `boundMethod` frames from call stacks when debugging and as far as I know should behave the same otherwise.
Test Plan: jest
2014-07-24 12:11:19 -07:00
Andreas Svensson
3b94abcb3b
HAS_SIDE_EFFECTS properties must compare as property type
2014-07-24 11:53:02 +02:00
Paul O’Shannessy
efdc5da097
Merge pull request #1903 from syranide/ie8nmlb
...
Remove empty TextNode left behind by IE8 setInnerHTML workaround
2014-07-23 18:40:35 -07:00
Cheng Lou
b0945b16cc
Merge pull request #1560 from spicyj/simplify-lifecycle
...
Simplify composite lifecycle state
2014-07-23 18:02:39 -07:00
Andreas Svensson
8a135c0e75
Remove empty TextNode left behind by IE8 setInnerHTML workaround
2014-07-23 21:52:56 +02:00
Paul O’Shannessy
13e2c38a01
Merge pull request #1865 from syranide/modistatefalse
...
getModifierState should always return a boolean
2014-07-23 10:12:49 -07:00
Andreas Svensson
030071dd8b
getModifierState should always return a boolean
2014-07-23 10:01:22 -07:00
Cheng Lou
79076fad9c
Merge pull request #1774 from syranide/ie8focusthrow
...
Fix IE8 potentially throwing during restoreSelection
2014-07-22 16:29:07 -07:00
Paul O’Shannessy
6d02e04672
Merge pull request #1879 from syranide/modistatewrong
...
getModifierState incorrectly exposed as SyntheticMouseEvent.getEventModifierState
2014-07-22 15:50:15 -07:00
Ben Alpert
6259d88f03
Simpler way to prevent flushing updates on server
...
Test Plan: Only failing tests in jest are immutable tests that were already failing.
2014-07-21 17:25:52 -07:00
Paul O’Shannessy
04e341936c
Include Object.assign polyfill
...
This isn't a good final solution but it makes React actually usable on
its own.
This also makes tests runnable, though only via jest
(./node_modules/.bin/jest)
2014-07-21 16:18:12 -07:00
robarnold
83e5e9bedf
Fix small issue in ReactContext comment
...
Noticed this the other day and meant to fix it.
2014-07-19 19:09:35 -07:00
Andreas Svensson
6f0db65777
getModifierState incorrectly exposed as SyntheticMouseEvent.getEventModifierState
2014-07-19 10:44:11 +02:00
Sebastian Markbage
c419cce5c9
Move defaultProps resolution to the descriptor factory
...
Moves the defaultProps resolution to the descriptor factory.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
3a7dbe6b73
Deprecate transferPropsTo
2014-07-18 22:01:36 -07:00
Paul O'Shannessy
de711efcc9
When proxying statics functions, copy properties
...
Port of 076047012a which went in
externally before ReactLegacyDescriptor happened, so it needed to be
ported.
2014-07-18 22:01:36 -07:00
Ben Newman
23c5332208
Fix ReactTestUtils.mockComponent so that mockTagName is not ignored.
...
The `mockTagName` parameter was always optional, and so probably was not
used very often. If you tried to use it, it would be shadowed by the
`var mockTagName` declaration in the `render` method, so only
`module.mockTagName` or `"div"` were ever possible values.
2014-07-18 22:01:36 -07:00
Ben Newman
2347abf75c
Don't call window.getSelection when it isn't defined.
...
Sadly, jsdom does not support `window.getSelection` yet, but
`ExecutionEnvironment.canUseDOM` is `true` in a jsdom environment.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
3818656f70
Use Object.assign in merge/mergeInto
...
Relax the argument type checks. Currently we throw for non-objects and terminals
but Object.assign does a coercion to Object instead. It also allows merging
Arrays as if they are objects.
This also relaxes the check for dependents such as ImmutableObject. This sucks
but it will allow us to use a fast code path to native Object.assign.
We always have the option of adding warnings to Object.assign or static type
checks.
I'm keeping the null check. Object.assign throws for null checks.
We'll also start returning the result of coercions just like Object.assign.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
225d76f772
Drop transferPropsTo usage in React core
...
These were completely unnecessary uses of transferPropsTo.
2014-07-18 22:01:36 -07:00
Ben Newman
66cdba3dfb
Avoid leading spaces when first argument to joinClasses is falsy.
...
This detail is going to become more important once the idiom
`className={joinClasses(this.props.className, newClass)}` becomes more
common, as it will when we move away from `this.transferPropsTo`.
2014-07-18 22:01:36 -07:00
Sebastian Markbage
5aab0bddaa
Move key/ref off props and prepare for new descriptor factories
...
Breaking changes
- key/ref are no longer accessible on props but they are accessible on the
descriptors. This means that parents/owners can access it but not the
component itself.
- Descriptor factories are now plain functions and you can't rely on the
prototype or constructors of descriptors to identify the component type.
Existing descriptor factories are now wrapped in a legacy factory. Currently it
does nothing but it will give us a hook to track callers to factories that are
not using JSX but just invoking the function directly. It also proxies static
methods/properties to the underlying class. The newer factories don't have this
feature.
ReactTextComponent has it's own little factory because it's props is not an
object. This is a detail and will go away once ReactTextComponent no longer
needs descriptors.
2014-07-18 22:01:36 -07:00
Paul O’Shannessy
9929f6de1e
Merge pull request #1870 from spicyj/gh-1866
...
Don't initialize reconcile transaction on server
2014-07-18 16:40:03 -07:00
Paul O’Shannessy
8439deadd0
Merge pull request #1869 from syranide/modistatecase
...
getModifierState is case sensitive
2014-07-18 16:13:34 -07:00
Ben Alpert
54d91c293d
Don't initialize reconcile transaction on server
...
...when calling setState from within a componentWillMount. Fixes #1866 .
Test Plan: jest
2014-07-18 11:03:34 -07:00
Andreas Svensson
495d866a66
getModifierState is case sensitive
2014-07-18 18:24:11 +02:00
Paul O’Shannessy
5bfee601ce
Bump version for 0.12.0-alpha
...
[skip ci]
2014-07-17 14:22:50 -07:00
Ben Alpert
076047012a
When proxying statics functions, copy properties
...
Test Plan: jest
2014-07-15 15:09:16 -07:00
Mouad Debbar
97dbada03d
Up-to-date React.Children
...
Make sure we actually include `.count`
2014-07-14 15:01:44 -07:00
Andreas Svensson
f8ccc2186f
Fix IE8 potentially throwing during restoreSelection
2014-07-14 21:07:56 +02:00
Paul O’Shannessy
0f9cec2e78
0.11.0-rc1
2014-07-12 19:50:45 -07:00
Ben Alpert
92d2dcc25f
Revert "Add helpful message about pooled classes"
...
This reverts commit e65f17b86c . This might have a perf impact so we're not going to go with it for now.
2014-07-11 16:00:58 -07:00
Paul O’Shannessy
2b0e51bdba
Add String.prototype.trim to polyfill check
...
Also shortens the URL so it fits on 1 line
2014-07-11 10:36:38 -07:00
Paul O’Shannessy
897b423e0e
Merge pull request #1797 from spicyj/transition-group-names
...
Add displayName to ReactTransitionGroup + friends
2014-07-08 14:40:34 -07:00
Ben Alpert
734a345257
Add displayName to ReactTransitionGroup + friends
...
Fixes facebook/react-devtools#42 .
Test Plan: Crossed fingers.
2014-07-08 12:18:46 -07:00
Max F. Albrecht
bcea3bee45
Also list <form> in error message as possible culprit
2014-07-08 14:08:17 +02:00
Cheng Lou
e10d10e31e
Merge pull request #1531 from spicyj/two-face
...
Give useful error when using two copies of React
2014-07-03 14:45:23 -07:00
Ben Alpert
70bf3e1306
Give useful error when using two copies of React
...
If we don't error here, we end up with a confusing error later on in this.getDOMNode() where ReactMount doesn't have the proper container registered in its object.
2014-07-03 14:20:31 -07:00
Andrew Zich
559eb89965
make invariant show formatted actual errors in all unminified environments
...
Because we can have !__DEV__ but unminified, we still want to see the
message in those cases.
2014-07-03 13:53:41 -07:00
Cheng Lou
e8e08127c5
Merge pull request #1461 from spicyj/no-esc-slash
...
Don't escape slash; it's unnecessary
2014-07-03 11:05:16 -07:00
Ben Alpert
c8d9957f68
Fix spelling/grammar in test comment
2014-07-02 14:09:38 -07:00
Yuval Dekel
40b522c498
Give context for owners of compenent instantiations with propType errors
...
See modification to the test-file: Basically we add a small hint at the end
of the error warning for propType errors to help identify which instantiation
of the component at hand is faulty.
2014-07-02 12:47:26 -07:00
Paul O'Shannessy
a4e5327b76
Remove jest usage in ReactDescriptorTest
...
Until we're only using jest on github, we should stick with Jasmine spies. Soon, hopefully.
2014-06-30 20:55:19 -07:00
Paul O'Shannessy
022e44c95b
Cleanup ReactChildren
2014-06-30 20:55:09 -07:00