Commit Graph
8746 Commits
Author SHA1 Message Date
Ben AlpertandGitHub bc66596afe 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ågeandGitHub 7224de03ef 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 AickinandGitHub ef30674e60 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ågeandGitHub eaf2dc4437 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ågeandGitHub b00bfbb11c Update yarn.lock (#10046) 2017-06-27 10:41:54 -07:00
Jack FordandDan Abramov 6c7fe5bebf Fix Typo in ReactFiberTreeReflection (#10055) 2017-06-27 17:53:16 +01:00
Jack FordandDan Abramov 6e8cebebb6 Fix Typo in ReactDOMFiberEntry (#10054) 2017-06-27 17:53:10 +01:00
Sebastian MarkbågeandGitHub 3a31b725f2 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 VaughnandGitHub bea3fc722f 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 SteynandDan Abramov d22fdc7d80 [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 AickinandDan Abramov f1b2419aa9 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 AickinandDan Abramov b4075b4ef3 Documentation: added info about streaming character encoding. (#10039) 2017-06-26 16:32:11 +01:00
Sasha AickinandDan Abramov 920bb6334a 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 BekkhusandDan Abramov d524417b39 Remove Travis badge from readme (#10041) 2017-06-26 11:22:21 +01:00
Sasha AickinandGitHub 50d1d8da16 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 AickinandDan Abramov c55508f8a3 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 AickinandGitHub 35de54aa62 Excluding src/node_modules from .gitignore. (#10028) 2017-06-23 08:05:09 -07:00
Dan AbramovandGitHub 48059b26e0 Remove Stack-only www shim code (#10019) 2017-06-22 02:38:02 +01:00
Dan AbramovandGitHub cfa3af3eee Remove unused www shims (#10018)
* Remove unused www shims

* Delete ReactElement.js
2017-06-21 19:10:45 +01:00
Dan AbramovandGitHub faa5c08cf8 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 AbramovandGitHub 21f6da58c8 Remove more isomorphic www shims (#10007) 2017-06-21 17:54:11 +01:00
Michael RidgwayandDan Abramov 9245a4649f [#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 KobayashiandDan Abramov 93795a9a81 Fix to work fiber-debugger (#10000) 2017-06-19 21:30:00 +01:00
Andrew ClarkandGitHub 29f9245578 Update flow to 0.48 (#10006) 2017-06-19 11:45:36 -07:00
Andrew Clark 4c023453f1 Only check minPriorityLevel after a commit 2017-06-19 09:53:19 -07:00
Andrew Clark 2cccb19930 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 973a2ea064 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 2f9bbbd0f6 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
newvladandNathan Hunzaker b15a1739f4 Create higher-order-components.md (#9976) 2017-06-19 10:06:54 -04:00
tokikuchandBen Alpert cecfca132c 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 AlpertandGitHub 52877cecc3 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 GannawayandGitHub 0d5291ec32 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 GannawayandDan Abramov 48c7bc40f7 removes Synthetic event forwarding module shims (#9945) 2017-06-15 17:07:34 +01:00
Dan AbramovandGitHub 0c1e649b79 Changelog for 15.6.1 (#9977) 2017-06-15 15:09:13 +01:00
Dan AbramovandGitHub 262ebb969c 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 ChadkinandDan Abramov 39fd4f8219 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 AbramovandGitHub 8748172fde 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 ClarkandGitHub 8f6004ad89 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 AbramovandGitHub 1d13542c9f 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 AbramovandGitHub fe47ce5bc8 Add future changelog for 15.6.0 addon release (#9953) 2017-06-14 13:52:25 +01:00
Dan AbramovandGitHub db60590f2b Reword animation documentation deprecation (#9957) 2017-06-14 13:04:04 +01:00
Dan AbramovandGitHub c89114bad1 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 MarchanandGitHub df4a054042 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 AbramovandFlarnie Marchan 356d50322e 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 MarchanandGitHub a4adcd01fe Update changelog for 15.6 (#9949) 2017-06-13 10:53:57 -07:00
Nathan HunzakerandGitHub 580f18a7bb 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, NoandDan Abramov 8f9318d08a Remove addons path deleted in #9209 (#9921) 2017-06-11 20:23:40 +01:00
Dan AbramovandGitHub 5c07ea6820 Don't build ReactDOMServerStack (#9916) 2017-06-10 18:08:05 +01:00
Jack FordandDan Abramov a2574d9aa6 Initial commit (#9917) 2017-06-10 15:51:13 +01:00
Brian VaughnandGitHub 6a6f04fc9b RN Inspector guard against clicks outside of RN (#9911) 2017-06-09 16:10:40 -07:00