Commit Graph
6845 Commits
Author SHA1 Message Date
Keyan ZhangandGitHub 46cd6a0b62 pinned babylon version for eslint to work (#7008) 2016-06-09 16:14:44 -07:00
Jim 2282894d52 Remove console.log from test (#7006) 2016-06-09 09:24:03 -07:00
Jim 0bb0fe8d00 Fix controlled/uncontrolled validation for radio+checkbox inputs (#7003) 2016-06-09 07:58:42 -07:00
Toru KobayashiandJim 731e42998a Remove setProps and replaceProps completely (#6921) 2016-06-09 03:53:52 -07:00
ogomandJim 9c7f895783 Updte tutorial to ja-JP (#6967) 2016-06-08 19:20:20 -07:00
Jim f0b140d726 Fix IE11 placeholder textContent value bug. (#7002) 2016-06-08 18:58:37 -07:00
Brandon DailandJim c47830d12c Warn if childContextType is defined on SFC (#6933)
Add console.error message content check

Use appropriate name in warning/test
2016-06-08 13:32:43 -07:00
Hiroyuki WadaandJim 518336e2fb Fix #5839 Add error event to source element (#6941)
* Fix #5839 Add error event to source element

* Add test case for <source onError={callback}>
2016-06-08 13:30:27 -07:00
Josh HuntandBen Alpert 99d8524d23 Fix #6950, work around IE missing innerHTML on SVG nodes (#6982)
* Workaround IE lacking innerHTML on SVG elements

* Add tests for setInnerHTML

* Correctly check if node has innerHTML property

* Ensure tests for setInnerHTML actually tests both codepaths

* Provide mock element for setInnerHTML tests

* Only use SVG setInnerHTML workaround for SVG elements
2016-06-08 10:00:03 -07:00
Yusong LiuandJim 5331323cd2 Fix the typo in the documentaion pages for shallowCompare (#6980)
* fix the typo for the docs of shallowCompare at:
https://facebook.github.io/react/docs/shallow-compare.html

* change "value" to "values" to match the two objects.
2016-06-07 23:09:50 -07:00
Sebastian Markbåge 0cafd83834 Merge pull request #6988 from sebmarkbage/newreconciler
[Fiber] Minimize abuse of .alternate
2016-06-07 18:42:18 -07:00
Timothy Yung 7988acaa95 Improve error message for components in bad states (missing instance) (#6990) 2016-06-07 17:23:40 -07:00
Keyan Zhang 1abce1630c Add reactProdInvariant and corresponding babel rewrite pass (#6948) 2016-06-07 17:11:04 -07:00
Sebastian Markbage 40180c4b26 Get rid of ugly and difficult to follow breaks in switch
Because pattern matching or something.
2016-06-07 17:05:25 -07:00
Sebastian Markbage c83a0428f1 Minimize abuse of .alternate
This avoids using .alternate as much as possible and isolates it
to the root. For anything that is "work in progress" this happens
to be the same as the alternate field. To avoid an extra "current"
field on work in progress fibers, we can just use the alternate.

The timing for when this is true might be a bit tricky to reason
about so I explicitly pass the current value everywhere from the
top. That way we can always change this in the future to use an
explicit field or we can try to maintain a parallel data
structure that remembers which was the "current" fiber for each
wip child.
2016-06-07 15:03:32 -07:00
Sebastian Markbåge ccd26ee020 Merge pull request #6981 from sebmarkbage/newreconciler
[Fiber] Add support for simple updates and fiber pooling
2016-06-07 14:30:07 -07:00
Sebastian Markbage 3a32d2642f Rename unitOfWork -> workInProgress
These values represent fibers that are incomplete. In the current
model they're mutated in place. In a completely immutable model
they would need to be cloned for every step they make progress.
I.e. one where the child is still in this WIP state and one when
it is complete.

To clarify this I'll name them workInProgress while they're in
that state, which is also what Jordan did in his prototype.
2016-06-07 13:49:12 -07:00
Sebastian Markbage cce58ffd62 Simple updates using alternate fibers
This splits the Fiber type into Fiber and Instance. This could be
two different object instances to save memory. However, to avoid
GC thrash I merge them into one.

When ReactChildFiber reconciles children, it clones the previous
fiber. This creates a new tree for work-in-progress. The idea is
that once flushed, this new tree will be used at the root.

However, we know that we'll never need more than two trees
at a time. Therefore my clone function stores the clone on the
original. Effectively this creates a fiber pool.

Ideally, the .alternate field shouldn't be used outside of clone
so that everything can work with pure immutability. I cheat a bit
for now so I don't have to pass both trees everywhere.

ReactChildFiber is a bit hacky for reuse and doesn't solve all
cases. Will fix that once I try to get parity.
2016-06-07 13:49:11 -07:00
Jim eb705d1448 Fix autofocus for input and textarea (#6986) 2016-06-07 12:50:37 -07:00
Dan Abramov d101f68bce Tweak ReactPerf warning message and code style (#6977) 2016-06-06 20:59:28 +02:00
Ben Alpert 8c60aaf430 Revert "Fallback to legacy set/get in old versions of FF" (#6976) 2016-06-06 11:49:43 -07:00
AlexanderandDan Abramov 2a46103ac8 Warn that ReactPerf does not work in the production build (#6884)
Fixes #6871
2016-06-06 20:46:57 +02:00
Dan Abramov afe483790b Revert "Warn that ReactPerf does not work in the production build (#6884, #6975)"
This reverts commit f71dfbcbf0.

Reverting because GitHub stripped the original PR author.
2016-06-06 19:44:40 +01:00
Dan Abramov f71dfbcbf0 Warn that ReactPerf does not work in the production build (#6884, #6975)
Fixes #6871
2016-06-06 20:37:46 +02:00
Keyan Zhang cf73de9459 [Docs] Error Decoder Page (#6946) 2016-06-04 14:43:56 -07:00
Ben Alpert 3c3c30a19a Fix function declaration in if statement (#6963)
Firefox doesn't like these and throws.
2016-06-04 13:37:57 -07:00
Keyan Zhang 96994c20b8 added instruction for downloading babel-browser (#6960) 2016-06-03 15:43:32 -07:00
Ben Alpert 1801d56500 Use remarkable instead of marked (#6961)
https://github.com/reactjs/react-tutorial/issues/139
2016-06-03 14:41:38 -07:00
Keyan Zhang c9eb572a6f Fix null node issue in ReactCSSTransitionGroup (#6958) 2016-06-03 13:42:45 -07:00
Paul O’Shannessy d3b36d5524 Merge pull request #6957 from zpao/flow026
Upgrade Flow
2016-06-03 13:17:15 -07:00
Paul O’Shannessy dd093faadf Add <any> type args for ReactElement,Class,Component 2016-06-03 13:13:20 -07:00
Paul O’Shannessy 2efc7186fe Fix $FlowFixMe broken by comment spanning multiple lines 2016-06-03 13:13:19 -07:00
Paul O’Shannessy 36d1a271c4 Upgrade to flow 0.26 & match internal config with strict args
Also ignore examples, important because react can be installed by the commonjs
one and the modules will get detected there too, resulting in duplicate
definitions
2016-06-03 13:12:47 -07:00
Daniel RosenwasserandPaul O’Shannessy 6b3f11cdd7 Update link and description of TypeScript support. (#6953) 2016-06-03 10:27:39 -07:00
Andrew ImmandJim 8216125d82 Fallback to legacy set/get in old versions of FF (#6930) 2016-06-02 11:35:21 -07:00
Sasha AickinandBen Alpert d6e70586b7 Replace the implementation of escapeTextContentForBrowser with escape-html (#6862)
* Replacing the implementation of escapeTextContentForBrowser with escape-html for performance

* Addressing @spicyj's code review comment here: https://github.com/facebook/react/pull/6862#issuecomment-223102868 . Pulled the code of escape-html in to react and changed the encoding of single quote to &#x27.

* Addressing code review comment https://github.com/facebook/react/pull/6862#discussion_r65462074 to make code more inlinable for v8. Thanks, @spicyj.
2016-06-01 17:14:30 -07:00
Ben Alpert 9498747606 Remove Flux from docs nav (#6945)
Most people don't use the official Flux implementation or docs so I think this is likely to be more confusing than helpful. Maybe later we can add a better comparison of data management solutions.
2016-06-01 11:41:35 -07:00
Keyan Zhang bfd1531eca Add a gulp script for extracting error codes (#6882) 2016-06-01 11:21:26 -07:00
Ben Alpert 50982cea99 Add rudimentary test renderer (#6944) 2016-06-01 11:17:10 -07:00
Jim 51f8b1b40c Remove css px warning, stop appending px to strings (#6899) 2016-05-31 14:32:27 -07:00
Sebastian Markbåge dc5686a42f Merge pull request #6931 from sebmarkbage/newreconciler
[Fiber] Simple test assertions
2016-05-31 14:20:18 -07:00
Sebastian Markbage 8056fbc2c9 [Fiber] Simple test assertions
I'll split the coroutine and incremental testing into their own
tests so that I can expand them with more edge cases.
2016-05-31 13:52:28 -07:00
Sebastian Markbåge 7de23758f1 Merge pull request #6903 from sebmarkbage/newreconciler
[Fiber] Transfer everything from Element onto the Fiber and use Tag instead of Stage
2016-05-31 13:39:59 -07:00
Sebastian Markbage 811084d74e Use the tag instead of stage field for coroutine stages
This gets rid of a field that we only need for coroutines.

We might need this if we have multi phase handlers in the future
but then maybe we can just use multiple tags.
2016-05-31 13:34:19 -07:00
Sebastian Markbage aa14d89c7d Transfer everything from Element onto the Fiber
This has a few benefits:

1) This allows the element to always remain on the young generation.
2) The key can be accessed on the fiber which is easier to keep as the
same class and is directly accessible in the child reconciliation of every
object.
3) This conveniently means that we don't have to create a fake element for
continuations which was really hacky.

We can still do the quick bailout of rerendered things using the props
object which is also unique.
2016-05-31 13:34:19 -07:00
hjmossandJim 4e82e8b6e6 Grammar: less dependencies -> fewer dependencies (#6917)
* Grammar: less dependencies -> fewer dependencies

* changelog.md grammar: less dependencies -> fewer dependencies
2016-05-31 09:17:13 -07:00
Toru KobayashiandJim 97b44085ff Remove getDOMNode from docs (#6919) 2016-05-30 09:16:15 -07:00
Alex JacobsandDan Abramov 29ed7c6c8c Fix minor lint warnings (#6909) 2016-05-28 22:04:32 +01:00
Ben Alpert e62384bca4 Fix style test for Jasmine 2 (#6913) 2016-05-28 12:58:08 -07:00
Nate NorbergandJim 38900cc7ca Added more specific warning for using onDblClick instead of onDoubleClick (#6881) 2016-05-27 15:23:05 -07:00