Commit Graph

8746 Commits

Author SHA1 Message Date
Ben Alpert
864ae8fa98 Support comment node as a mount point (#9835)
This means you don't need an extra wrapper div for each component root you need. Rendered stuff is inserted before the comment you pass in.
2017-06-27 17:22:07 -07:00
Sebastian Markbåge
52a2365f19 Fix mount and unmount warnings in Fiber (#10056)
* Warn if unmounting a non-container

* Warn if the 2nd+ child is a "root" element but not first

This triggers our non-reuse mode. This is covered by ReactMount already but
the test doesn't pass yet without also landing #10026.
2017-06-27 17:15:53 -07:00
Sasha Aickin
f8a3a3989a Removed ReactMarkupChecksum from renderToString (#10053)
* Removed ReactMarkupChecksum from renderToString

* Oops. I messed up the merge in the previous commit.
2017-06-27 14:20:45 -07:00
Sebastian Markbåge
e955008b9b Remove most comments from HTML generation output (#10029)
Simplifies markup generation by only inserting a simple comments between
consecutive text nodes.

I also skip past comments and other nodes while hydrating. This leaves them
in place instead of being removed by the hydration mechanism. This is more
efficient but will also be needed by hydration validator.

There's a special case for empty strings. We probably shouldn't have nodes
for those at all. For now I special case it by assuming there won't be one
so if we need one, we'll insert an empty text node.

I also dropped the ID from the react ID.
2017-06-27 10:43:27 -07:00
Sebastian Markbåge
3c5b515286 Update yarn.lock (#10046) 2017-06-27 10:41:54 -07:00
Jack Ford
7831440dc9 Fix Typo in ReactFiberTreeReflection (#10055) 2017-06-27 17:53:16 +01:00
Jack Ford
15d3f2852f Fix Typo in ReactDOMFiberEntry (#10054) 2017-06-27 17:53:10 +01:00
Sebastian Markbåge
90b7facd52 Don't use the render callback with promises (#10050)
This covers up errors that are thrown in Fiber, because callback gets
fired *and* an error is thrown. Created a follow up #10049 to reevaluate
these semantics.

# Conflicts:
#	scripts/fiber/tests-passing-except-dev.txt
#	scripts/fiber/tests-passing.txt
2017-06-27 08:24:31 -07:00
Brian Vaughn
cb32253d2f ReactNativeFiberErrorDialog mutates error message (#10045)
This ensures that custom properties that are required by Facebook's error tooling (eg 'framesToPop') don't get dropped.

I also improved the handling/messaging of thrown strings.
2017-06-26 12:34:29 -07:00
Almero Steyn
2675ce13b8 [Docs: A11y] Add accessibility docs (#9519)
* [Docs: A11y] Add accessibility docs

* Fix the link

* Replace link image

* Tweak style
2017-06-26 18:17:05 +01:00
Sasha Aickin
8e2b70c772 Add node-stream.js to react-dom's package.json files entry, enabling the file to be uploaded to npm. (#10044) 2017-06-26 17:17:15 +01:00
Sasha Aickin
167f54c949 Documentation: added info about streaming character encoding. (#10039) 2017-06-26 16:32:11 +01:00
Sasha Aickin
c01d3061bb Pin prettier to a specific version so that it produces the same output on dev machines and CI. (#10038) 2017-06-26 16:30:45 +01:00
Simen Bekkhus
b629b78350 Remove Travis badge from readme (#10041) 2017-06-26 11:22:21 +01:00
Sasha Aickin
411e04bd71 Add ReactDOMNodeStream, adding streaming rendering. (#10024)
* Add ReactDOMNodeStream, adding ability to stream generated HTML.

* Forgot to rename a documentation page.

* Tests are passing locally but failing on CI; attempt to fix that with this tweak.

* Adding some debugging info to try to track down CI problem.

* More debugging of CI. Yay for printf debugging.

* More printf debugging of CI to figure out what is going on with includes during tests.

* I made a truly stupid error with my printf debugging statements for CI. Fixing that.

* And another dumb copy and paste typo.

* The node-stream.js stub for tests wasn't being added because of .gitignore.

* Fix for code review coment https://github.com/facebook/react/pull/10024#discussion_r123606138 . Thanks to @razh for helping me out.

* Removing all the console.logs I put in to debug the build problems on the CI server.

* Fix for code review coment https://github.com/facebook/react/pull/10024#discussion_r123628227 . Thanks to @aweary for the suggestion.

* Response to code review comment https://github.com/facebook/react/pull/10024#discussion_r123649131 . Thanks, @gaearon.

* Responding to code comments https://github.com/facebook/react/pull/10024#pullrequestreview-46104491 , https://github.com/facebook/react/pull/10024#pullrequestreview-46104616 , and https://github.com/facebook/react/pull/10024#pullrequestreview-46104822 . Thanks to @sebmarkbage for the help.

* Attempt to tweak spacing to see if it makes the prettier build step happy.

* Found a prettier bug that wasn't being reported by npm run prettier for some reason.

* Fixed a small prettier issue
2017-06-24 22:31:42 -07:00
Sasha Aickin
55c5cc264b As pointed out by @gaearon in code review comment https://github.com/facebook/react/pull/10024#discussion_r123649131 , ReactDOMServer is an object, not a class. (#10027) 2017-06-23 16:07:25 +01:00
Sasha Aickin
a494741b21 Excluding src/node_modules from .gitignore. (#10028) 2017-06-23 08:05:09 -07:00
Dan Abramov
fa98ecba9f Remove Stack-only www shim code (#10019) 2017-06-22 02:38:02 +01:00
Dan Abramov
8e251c5416 Remove unused www shims (#10018)
* Remove unused www shims

* Delete ReactElement.js
2017-06-21 19:10:45 +01:00
Dan Abramov
df10073f7d Remove "unstable" warning from ReactDOM (#10017)
* Remove "unstable" warning from ReactDOM

* Remove assertion about the warning

* There's more!
2017-06-21 19:06:25 +01:00
Dan Abramov
e68e95284b Remove more isomorphic www shims (#10007) 2017-06-21 17:54:11 +01:00
Michael Ridgway
7b05946776 [#9627] Fix componentWillUnmount test case in isMounted tests (#9629)
* Fix componentWillUnmount test case in isMounted tests and add mixin tests

* Upgrade create-react-class to 15.6.0
2017-06-20 23:37:01 +01:00
Toru Kobayashi
e817e8c95a Fix to work fiber-debugger (#10000) 2017-06-19 21:30:00 +01:00
Andrew Clark
11d67115f3 Update flow to 0.48 (#10006) 2017-06-19 11:45:36 -07:00
Andrew Clark
443ab45835 Only check minPriorityLevel after a commit 2017-06-19 09:53:19 -07:00
Andrew Clark
dcc02dd0f1 Task work inside batched updates is always sync, even for initial mounts
Behavior now matches Stack. It's unfortunate that this prevents us
from unifying SynchronousPriority and TaskPriority.
2017-06-19 09:53:19 -07:00
Andrew Clark
812244b57a Remove Animation priority
There's no advantage to scheduling updates with animation priority
versus scheduling sync work inside requestAnimationCallback. So we can
remove all the animation-specific code. Now there's only one type of
callback.
2017-06-19 09:53:19 -07:00
Andrew Clark
6a0c56cffc ReactNoop.flush methods return an array of yielded values
Allows us to make assertions on the values that are yielded when
performing work. In our existing tests, we do this manually by pushing
into an array.

ReactNoop.flushThrough extends this concept. It accepts an array of
expected values and flushes until those values are yielded.
2017-06-19 09:53:19 -07:00
newvlad
390fda7260 Create higher-order-components.md (#9976) 2017-06-19 10:06:54 -04:00
tokikuch
00ba97a354 Use KeyboardEvent.char in the fallback logic if available (#9792)
When a user types an emoji via Touch keyboard in IE, React's fallback logic
creates the `BeforeInput` event based on the `keypress`.  However, the length
of an emoji character (e.g. `\uD83D\uDE0A`) is two, so the `which` property
does not represent an emoji correctly.

Because IE's KeyboardEvent has the `char` property holding an entire emoji,
we can use it directly instead of converting from the `which`.
2017-06-16 15:14:09 -07:00
Ben Alpert
5029c3d6bc Split out container methods in host config (#9983)
This makes it so you don't need to pattern-match manually to build a renderer where the container and instance types are not the same. Prerequisite to #9835.
2017-06-16 15:00:38 -07:00
Dominic Gannaway
54e8478a3d Move out more ReactDOM FB shims (#9987)
* move out further ReactDOM shims from FB

* fixed a typo
2017-06-16 15:41:47 +02:00
Dominic Gannaway
52e13922b5 removes Synthetic event forwarding module shims (#9945) 2017-06-15 17:07:34 +01:00
Dan Abramov
ca83e3d321 Changelog for 15.6.1 (#9977) 2017-06-15 15:09:13 +01:00
Dan Abramov
310a6c4fc1 Wrap all non-UMD DEV bundles into a condition (#9969)
* Wrap all non-UMD DEV bundles into a condition

* Update header.js

* Create header.js
2017-06-15 00:53:22 +01:00
Bogdan Chadkin
29eb21dd04 Prevents adding units to css custom properties (#9966)
* Prevents adding units to css custom properties

* Fix code style

* Optimize custom property checking

* Prevents adding units to css custom properties in markup creation

* Update passing tests

* Fix argument name and reuse check in DEV
2017-06-14 23:15:09 +01:00
Dan Abramov
7dc27d35c1 Streamline Fiber/Stack testing and bundling setup a little bit (#9964)
* Remove internal forwarding modules for /lib/

* Add *Entry suffix to all entry points

* Don't bundle ReactNativeFeatureFlags since it's shimmed

* Delete TestRendererStack

* Switch tests at forwarding modules rather than via Jest

* Share mocks between regular and equivalence fixtures

* Rename environment flag to be more generic

* Remove accidental variable name change

* Minor naming changes for consistency

Files that have two versions get the engine in variable name.
2017-06-14 22:10:33 +01:00
Andrew Clark
462f4debfe Fuzz tester that simulates Sierpinski Triangle demo (#9952)
* Add ReactNoop.yield, ReactNoop.flushAndYield, ReactNoop.flushUnitsOfWork

Incremental tests often rely on yielding at a specific point. Using an
explicit API should make our tests more resilient to changes
in implementation.

* Fuzz tester that simulates Sierpinski Triangle demo

The tests only assert that the output of the tree is consistent after
each action, and that the final result after all work has flushed is
the expected value. It does not assert how work is reused, which means
it can't detect starvation issues. However, this also means that it
is fairly resilient to changes in our incremental algorithm.
2017-06-14 10:54:18 -07:00
Dan Abramov
14c0fd562d Add addon changes to 15.6.0 changelog (#9958)
* Add addon changes to 15.6.0 changelog

* Oops

* Add to blogpost
2017-06-14 13:57:00 +01:00
Dan Abramov
e2cf6f61c2 Add future changelog for 15.6.0 addon release (#9953) 2017-06-14 13:52:25 +01:00
Dan Abramov
d1445d42ed Reword animation documentation deprecation (#9957) 2017-06-14 13:04:04 +01:00
Dan Abramov
4f19558c6b Use public API in tests wherever possible (#9954)
* Use public API in tests wherever possible

* Add missing src/node_modules files
2017-06-14 00:58:35 +01:00
Flarnie Marchan
ce6108dac3 Blog post for 15.6.0 (#9950)
* Blog post for 15.6.0

**what is the change?:**
A short and sweet summary of 15.6.0 changes

**why make this change?:**
To thank community contributors and call out important changes.

**test plan:**
Visual inspection.
I also looked it over in a markdown viewer - http://dillinger.io/

**issue:**
https://github.com/facebook/react/issues/9398

* Add 'Installation' and 'Changelog' to 15.6.0 blog post

**what is the change?:**
Added the 'Installation' section we have on most release blog posts,
customized for the 15.6.0 version of React.
Added the 'Changelog' from master to the blog post.

**why make this change?:**
To show folks how to install React and what changes are in this release.

**test plan:**
Visual inspection

**issue:**
https://github.com/facebook/react/issues/9398

* Improvements to blog post, and add self to `authors.yml`

**what is the change?:**
- Add self to contributors so my name turns into a link
- Use backticks for code-ish things
- Second header to ##, not #
- Change production mode link to the new address per @bvaughn's comment
- Update changelog with fixes from https://github.com/facebook/react/pull/9951

**why make this change?:**
Make things more clear and accurate.

**test plan:**
Visual inspect - @flarnie will paste an image of how it appears in the
actual docs.

**issue:**
https://github.com/facebook/react/issues/9398

* Further improvements to 15.6 blog post

**what is the change?:**
- Reword heading about deprecation warning changes
- add 'br' s to the list of installation options
- add some stray missing backticks

**why make this change?:**
Clarity and readability

**test plan:**
Visual inspection

**issue:**
https://github.com/facebook/react/issues/9398
2017-06-13 15:51:45 -07:00
Dan Abramov
00340f436b Minor fixes to 15.6.0 changelog (#9951)
* Minor fixes to 15.6.0 changelog

* Remove remaining double space

* Backticks
2017-06-13 13:25:08 -07:00
Flarnie Marchan
ac2f142729 Update changelog for 15.6 (#9949) 2017-06-13 10:53:57 -07:00
Nathan Hunzaker
d7157651f7 Add controlList to DOM property whitelist (#9940)
See:

- https://github.com/WICG/controls-list/blob/gh-pages/explainer.md
- https://developers.google.com/web/updates/2017/03/chrome-58-media-updates#controlslist
2017-06-12 21:09:33 -04:00
Taehwan, No
35ae38db2f Remove addons path deleted in #9209 (#9921) 2017-06-11 20:23:40 +01:00
Dan Abramov
7cd6fd2bc1 Don't build ReactDOMServerStack (#9916) 2017-06-10 18:08:05 +01:00
Jack Ford
a0534fb5c9 Initial commit (#9917) 2017-06-10 15:51:13 +01:00
Brian Vaughn
4aea7c3fad RN Inspector guard against clicks outside of RN (#9911) 2017-06-09 16:10:40 -07:00