Commit Graph

2198 Commits

Author SHA1 Message Date
Christopher Chedeau 32d80aa5eb Merge pull request #1462 from spicyj/lint
Fix some linty things
2014-04-29 11:34:30 -07:00
Christopher Chedeau 92a3e94528 Merge pull request #1459 from spicyj/ti
Move tooling info to Complementary Tools wiki
2014-04-29 11:33:50 -07:00
Christopher Chedeau 3eee27ebc8 Merge pull request #1463 from andreypopp/example-commonjs
Add basic CommonJS example with browserify
2014-04-29 10:58:14 -07:00
Andrey Popp 93fed1a459 Add basic CommonJS example with browserify 2014-04-29 21:57:08 +04:00
Ben Alpert d5a4d29532 Fix some linty things 2014-04-28 23:30:05 -03:00
Ben Alpert 05cc7b635c Move tooling info to Complementary Tools wiki
I moved the info that was here to the wiki page: https://github.com/facebook/react/wiki/Complementary-Tools; it doesn't need to live in the website any more.
2014-04-28 21:03:19 -03:00
Pete Hunt b9e215d169 Merge pull request #1458 from spicyj/gh-1457
ReactTransitionGroup: Fix changing to null child
2014-04-28 17:00:22 -07:00
Ben Alpert 9dbbaf12bf ReactTransitionGroup: Fix changing to null child
Fixes #1457.

Test Plan: grunt fasttest
2014-04-28 20:52:42 -03:00
Paul O’Shannessy d657479a9d Merge branch 'spicyj-nested-render' from #1402 2014-04-27 13:15:58 -07:00
Cheng Lou 8b23a7e699 Warn instead of throw for nested render calls 2014-04-27 13:15:42 -07:00
Cheng Lou 3a796ab47c Merge pull request #1455 from jeffmo/master
Bump jstransform dependency to point at 4.0.1 or higher
2014-04-26 15:38:32 -07:00
jeffmo a7c3dc8b08 Bump jstransform dependency to point at 4.0.1 or higher 2014-04-26 15:34:40 -07:00
Pete Hunt 50eb9b3e50 Merge pull request #1452 from chenglou/perf-fix
Fix perf suite broken by descriptor change
2014-04-25 11:10:27 -07:00
Cheng Lou 5158a022df Fix perf suite broken by descriptor change 2014-04-25 10:38:17 -07:00
Paul O’Shannessy 28820e0adb Merge pull request #887 from syranide/textdocument
Test innerText/textContent on document.documentElement instead
2014-04-24 16:10:13 -07:00
Paul O’Shannessy 83687b927d Merge pull request #1450 from sahat/patch-1
Update build status svg badge
2014-04-24 15:45:19 -07:00
Sahat Yalkabov f98995fe08 Update build status svg badge 2014-04-24 18:41:34 -04:00
Paul O’Shannessy a0dc45e652 Merge pull request #879 from syranide/inlinechild
Remove unnecessary tests from insertChildAt and inline it instead
2014-04-24 15:02:14 -07:00
Andreas Svensson a9a398b15a Test innerText/textContent on document.documentElement instead 2014-04-24 23:51:05 +02:00
Andreas Svensson 9ee1d92b52 Remove unnecessary tests from insertChildAt and inline it instead 2014-04-24 23:44:41 +02:00
Isaac Salier-Hellendag cc292c1e22 Fix IE11 collapsed ranges in ReactDOMSelection
In IE10/11, it is apparently possible to have a Selection or Range object that has the following properties:

  - `anchorNode` === `focusNode` (Selection) or `startContainer` === `endContainer` (Range)
  - `anchorOffset` === `focusOffset` (Selection) or `startOffset` === `endOffset` (Range)
  - `isCollapsed` === `false` (Selection) or `collapsed` === `false` (Range)

As defined in http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html, this doesn't really make sense. Since the nodes and offsets are the same, the "collapsed" value should be `true`.

Moreover, when calling `selection.toString()` in this case, it appears that the entire text contents of `body` -- including `<script>` tag contents -- are considered within the selection. I thought maybe the selected nodes were missing from the DOM or something, but no, they're there.

Sidestep all of this in `ReactDOMSelection` by calculating the `collapsed` property manually and setting the selection length directly to zero if it is actually collapsed.

Side note: I think that for selection restoration on contenteditables, we shouldn't try to do this offset calculation. We should just use the structure provided natively (nodes and offsets) since we can restore using that structure as well.
2014-04-24 12:53:08 -07:00
Jeff Morrison 1b022e9b3a Merge pull request #1441 from zpao/update-jstransform
Upgrade jstransform to 4.0
2014-04-23 16:49:11 -07:00
Cheng Lou 7fa656dae9 Don't let new keys on style from transferPropsTo override old ones
Previous behavior: `transferPropsTo(<div style={{color: 'red'}} />)` would get `color` overriden if we transfer in a `style={{color: 'blue'}}`. This is inconsistent with how other props are transfered.

This simply reverses the order of arguments.

closes #1435
2014-04-23 16:44:32 -07:00
Paul O’Shannessy 4ed9e22a44 Upgrade jstransform to 4.0
Also enables the object-concise-method transform for --harmony

closes #1438
2014-04-23 16:36:45 -07:00
Paul O'Shannessy 3d605da15f Split DefaultDOMPropertyConfig
This makes it a little easier to add SVG properties. It also makes use of that injection that we claim is easy to use and will likely start playing a bigger part soon.

Closes #1009
2014-04-23 16:22:10 -07:00
Paul O’Shannessy ff60e81fa9 Remove whitespace_transformer package
This was a one-time use thing, let's get rid of it. If we ever need to
push an update, we'll do it from the 0.9-stable branch.
2014-04-23 16:00:44 -07:00
Pete Hunt df72bd76be Update videos.md 2014-04-23 15:45:48 -07:00
Jan Kassens 514f5fb98b fix warnings in cloneWithProps test
Don't test refs in this case, already testing warning above
2014-04-23 14:14:45 -07:00
Jan Kassens 9e9d8dbe76 fix warnings in ReactComponentLifeCycle test
Don't use inputs to avoid warnings in tests
2014-04-23 14:14:42 -07:00
Jonas Gebhardt 01d41f6e18 better error message for React EventPlugin order check
Ran into this while inadvertently requiring multiple React versions in a separate project (`require('react');` vs `require('React');`
2014-04-21 15:42:25 -07:00
Jan Kassens 4c199daa26 fix log spew from ReactDOMTextarea test
Similar to previous but for textarea. If `value` is set, we have to also set
`onChange` to avoid warnings.
2014-04-21 15:42:00 -07:00
Jan Kassens 089146b2f8 fix log spew from ReactDOMInput test
The prop validation threw a warning that either `onChange` or `readOnly` is required. Set the `onChange` where needed.
2014-04-21 15:41:50 -07:00
Paul O'Shannessy c8933b947b unbreak server-side/web worker
We're now trying to access document directly at require time. Wrapping in a function prevented that before. But we can simply check what environment we're in first.
2014-04-20 11:44:01 -07:00
Juraj Dudak 385eb1cef1 Fixed a bug in expectRenderedChildAt
React components have _mountIndex, that looks like it is their order in DOM.
If you swap 2 elements in DOM, their order in children array isn't changed, but their _mountIndex is
2014-04-18 12:57:24 -07:00
Christoph Pojer 9a13393ce3 Remove function wrappers in DOMSelection
There is no point in doing the feature detection on every call, unless there is an IE bug where it is not sure about which support for selection it has (totally plausible).
2014-04-18 12:57:05 -07:00
Jonas Gebhardt 3a49ee7d82 Add typed ReactLink to ReactProps
Adds a PropType that checks for proper use of the ReactLink API and optionally validates the type of value passed in via the link. Basically, it's a wrapper around PropTypes.shape that hides the implementation of ReactLink.
2014-04-18 12:56:46 -07:00
Cheng Lou 0a5c22264b Make custom PropTypes return error rather than whatever
The new rule for PropTypes is that it should return an error object if validation fails, not throw, not warn.
2014-04-18 12:56:25 -07:00
Cheng Lou 4487831281 Allow false as an acceptable renderable type value
`false` is renderable.
2014-04-18 12:56:06 -07:00
Cheng Lou 3ee081b125 Merge pull request #1188 from spicyj/comp-spec-inv
Add clearer invariants to composite spec mixing
2014-04-17 12:50:29 -07:00
Cheng Lou 13f799ee8e Merge pull request #1419 from spicyj/inv-process
Add clearer invariant in processUpdates
2014-04-17 01:30:58 -07:00
Ben Alpert 945d041160 Add clearer invariant in processUpdates
The `updatedChildren[j].parentNode.removeChild(updatedChildren[j]);` line below can fail if (1) we're moving/moving the same node twice or (2) the node we're looking for is gone completely. This makes it easier to distinguish between the two cases.

Perf shouldn't be a concern here because this is DOM code and invariants are fast in comparison.

Test Plan: grunt test
2014-04-16 15:09:31 -07:00
Cheng Lou e9c00b1bae Remove grunt-complexity
The report itself is more or less useful because it detects stuff like
big objects (e.g. CSSProperty) as being too complicated. Furthermore, afaik
nobody refactors the code based on what the report says =).
2014-04-16 11:52:25 -07:00
Paul O’Shannessy b3f5e863e0 Merge pull request #1340 from matthewwithanm/download-attribute
Support download attribute properly
2014-04-15 16:30:30 -07:00
Cheng Lou 7832b94114 Merge pull request #1412 from gasi/patch-3
Match `setTimeout` delay with documentation
2014-04-15 13:47:20 -07:00
Daniel Gasienica 663dd6f5b3 Match setTimeout delay with documentation 2014-04-15 13:45:09 -07:00
Paul O’Shannessy 0dcbfe831a Merge pull request #1410 from spicyj/sih
Don't try to detach a detached node
2014-04-15 12:59:57 -07:00
Ben Alpert cc0233dd76 Don't try to detach a detached node
Test Plan: grunt test
2014-04-15 11:27:46 -07:00
Ben Alpert c9767c2822 Guard top-level methods, not in every render call
Test Plan: grunt test
2014-04-15 00:03:02 -07:00
Matthew Dapena-Tretter 32a7a1cedb Rename "booleanish" to "overloaded boolean" 2014-04-14 23:00:25 -04:00
Cheng Lou c6df1c2dd2 Fix PropType for travis
closes #1404
2014-04-14 17:20:50 -07:00