Commit Graph
15395 Commits
Author SHA1 Message Date
Brian Vaughn bec073365d Fix hooks warnings identified by prerelease version of react-hooks ESLint plugin 2019-02-19 13:15:57 -08:00
Sebastian Markbåge 13645d224d Deal with fallback content in Partial Hydration (#14884)
* Replace SSR fallback content with new suspense content

* The three states of a Dehydrated Suspense

This introduces three states for dehydrated suspense boundaries

Pending - This means that the tree is still waiting for additional data or
to be populated with its final content.

Fallback - This means that the tree has entered a permanent fallback state
and no more data from the server is to be expected. This means that the
client should take over and try to render instead. The fallback nodes will
be deleted.

Normal - The node has entered its final content and is now ready to be
hydrated.

* Rename retryTimedOutBoundary to resolveRetryThenable

This doesn't just retry. It assumes that resolving a thenable means that
it is ok to clear it from the thenable cache.

We'll reuse the retryTimedOutBoundary logic separately.

* Register a callback to be fired when a boundary changes away from pending

It's now possible to switch from a pending state to either hydrating
or replacing the content.
2019-02-19 13:07:41 -08:00
Dan Abramov c506ded3b2 Don't discard render phase state updates with the eager reducer optimization (#14852)
* Add test cases for setState(fn) + render phase updates

* Update eager state and reducer for render phase updates

* Fix a newly firing warning
2019-02-19 18:40:10 +00:00
Brian Vaughn a31415011d Removed numeric key code 2019-02-19 08:59:27 -08:00
Brian Vaughn 3376daaa41 Merge pull request #2 from Jessidhia/fix-utf-encoding
Fix encoding of Unicode keys greater than U+00FF
2019-02-19 08:56:21 -08:00
Jessica 044e6ba9cd Pass options to scrollIntoView 2019-02-19 16:36:43 +09:00
Jessica 65d493cae9 Just use codepoints as it'll be copied into an Uint32Array anyway 2019-02-19 16:03:53 +09:00
Jessica 4ee74f7e6c Fix encoding of Unicode keys greater than U+00FF (greater than U+FFFF handled by surrogate pairs) 2019-02-19 15:52:24 +09:00
Jessica 28ea0a352e Scroll to newly selected component if it's out of view 2019-02-19 12:22:19 +09:00
Brian Vaughn a4212dcdce Support editable props, state, and context values 2019-02-17 13:07:39 -08:00
Brian Vaughn 6c226b0c80 Added link to now.sh preview to README 2019-02-16 09:46:10 -08:00
Brian Vaughn c4d6fdbfdb Fixed overlay position bug 2019-02-16 08:33:38 -08:00
Brian Vaughn 1d95098177 Implemented select-DOM-element button 2019-02-16 08:29:26 -08:00
Brian Vaughn 2fbacbff01 Tab bar resizes properly for narrow screens 2019-02-15 11:42:55 -08:00
Brian Vaughn 0e67969cb1 Prompt to include UMD build artifact links in GitHub release (#14864) 2019-02-15 10:48:20 -08:00
Brian Vaughn fad0842fd4 Release scripts documentation (#14863)
* Improve release script process documentation
* Improved pre-publish instructions/message based on feedback
* Added reminder to attach build artifacts to GitHub release
2019-02-15 10:00:43 -08:00
Brian Vaughn 0008bb00d7 Inspectable complex hook values 2019-02-14 21:55:09 -08:00
Brian Vaughn 47a5fd59cb Reduced tree padding (left) slightly to make larger trees easier to inspect 2019-02-14 15:13:43 -08:00
Brian Vaughn 04a0d24f0f Fixed a potential source of duplicate key 2019-02-14 15:06:38 -08:00
Brian Vaughn 3f40d38203 Fixed edge case mutation bugs in selected element and tree context 2019-02-14 14:36:29 -08:00
Brian Vaughn bf2f13d32a Removed some stale TODO comments 2019-02-14 13:37:40 -08:00
Brian Vaughn 9cfa25bdcc Tidied up Flow types for Bridge and Store 2019-02-14 13:32:30 -08:00
Brian Vaughn b167dd339b Style, theme, and button CSS cleanup 2019-02-14 13:20:24 -08:00
Brian Vaughn a07d9862ca Fixed edge-case display density bug 2019-02-14 12:46:27 -08:00
overlookmotel ab7a67b1dc Fix react-dom/server context leaks when render stream destroyed early (#14706)
* Fix react-dom/server context memory retention

* Test for pollution of later renders

* Inline loop

* More tests
2019-02-14 19:50:23 +00:00
Brian Vaughn 15c5396169 Re-added "Settings" panel to browser extension and (hopefully) fixed a lot of sources of error 2019-02-14 11:45:11 -08:00
Dan Abramov 3e55560438 Release 16.8.2 2019-02-14 19:13:15 +00:00
Brian Vaughn 5a301cd26e Tweaked the owner stack exit icon 2019-02-14 09:23:54 -08:00
Dan Abramov dfabb77a97 Include another change in 16.8.2 v16.8.2 2019-02-14 17:21:27 +00:00
Sunil Pai c555c008b6 Include component stack in 'act(...)' warning (#14855)
* add a component stack trace to the act() warning

* pass tests

* nit
2019-02-14 17:20:49 +00:00
Brian Vaughn 36e596ecd1 Changed dark theme to have more React blues 2019-02-14 09:17:29 -08:00
Brian Vaughn 94aab74253 Avoid NPE in Agent if renderer can't be found for an ID 2019-02-14 08:13:35 -08:00
Dan Abramov ff188d666b Add React 16.8.2 changelog (#14851) 2019-02-14 14:51:01 +00:00
Deniz Susman c4d8ef6430 Fix typo in code comment (#14836) 2019-02-13 20:49:37 -08:00
Brian Vaughn c229837f33 Temporarily disabled Settings panel 2019-02-13 11:36:43 -08:00
Brian Vaughn 79f57532b9 Split demo app into multiple roots and fixed a multi-root bug 2019-02-13 11:22:22 -08:00
Sebastian Markbåge 08e9554357 Statically enable suspense/partial hydration flag in www (#14842)
It doesn't hurt to have this always on since it is only when we use
Suspense that it matters. This saves some code/checks.
2019-02-13 10:55:13 -08:00
Dan Abramov 0e4135e8c2 Revert "[ShallowRenderer] Queue/rerender on dispatched action after render component with hooks (#14802)" (#14839)
This reverts commit 6d4038f0a6.
2019-02-13 16:52:14 +00:00
Brian Vaughn 4ea81337f3 Initial pass at adding Settings panel to browser extension 2019-02-13 10:59:49 -05:00
Rodrigo Ribeiro 6d4038f0a6 [ShallowRenderer] Queue/rerender on dispatched action after render component with hooks (#14802)
* [shallow-renderer] Rerender on dispatched action out of render
2019-02-13 15:59:02 +00:00
Brandon Dail fa6205d522 Special case crossOrigin for SVG image elements (#14832) 2019-02-12 20:13:17 -08:00
Brian Vaughn aed1713154 Added NOW config file for dev shell 2019-02-12 21:09:50 -05:00
Brian Vaughn 95b859209f Fixed NaN warning for pre-mount CSS prop read 2019-02-12 21:09:33 -05:00
Brian Vaughn d203ebf165 Added new tabs UI and theme/display-density preferences 2019-02-12 20:41:39 -05:00
Dan Abramov c6bee765ba Remove false positive warning and add TODOs about current being non-null (#14821)
* Failing test for false positive warning

* Add tests for forwardRef too

* Remove the warning and add TODOs
2019-02-13 00:00:10 +00:00
Dan Abramov 3ae94e1885 Fix ignored sync work in passive effects (#14799)
* Fix ignored sync work in passive effects

* Fix batching
2019-02-12 20:18:35 +00:00
Brian Vaughn 8e5a35b762 Misc cleanup and prep for dark mode CSS 2019-02-12 09:45:00 -05:00
Sebastian Markbåge f3a14951ab Partial Hydration (#14717)
* Basic partial hydration test

* Render comments around Suspense components

We need this to be able to identify how far to skip ahead if we're not
going to hydrate this subtree yet.

* Add DehydratedSuspenseComponent type of work

Will be used for Suspense boundaries that are left with their server
rendered content intact.

* Add comment node as hydratable instance type as placeholder for suspense

* Skip past nodes within the Suspense boundary

This lets us continue hydrating sibling nodes.

* A dehydrated suspense boundary comment should be considered a sibling

* Retry hydrating at offscreen pri or after ping if suspended

* Enter hydration state when retrying dehydrated suspense boundary

* Delete all children within a dehydrated suspense boundary when it's deleted

* Delete server rendered content when props change before hydration completes

* Make test internal

* Wrap in act

* Change SSR Fixture to use Partial Hydration

This requires the enableSuspenseServerRenderer flag to be manually enabled
for the build to work.

* Changes to any parent Context forces clearing dehydrated content

We mark dehydrated boundaries as having child work, since they might have
components that read from the changed context.

We check this in beginWork and if it does we treat it as if the input
has changed (same as if props changes).

* Wrap in feature flag

* Treat Suspense boundaries without fallbacks as if not-boundaries

These don't come into play for purposes of hydration.

* Fix clearing of nested suspense boundaries

* ping -> retry

Co-Authored-By: sebmarkbage <sebastian@calyptus.eu>

* Typo

Co-Authored-By: sebmarkbage <sebastian@calyptus.eu>

* Use didReceiveUpdate instead of manually comparing props

* Leave comment for why it's ok to ignore the timeout
2019-02-11 21:25:44 -08:00
Dan Abramov f24a0da6e0 Fix useImperativeHandle to have no deps by default (#14801)
* Fix useImperativeHandle to have no deps by default

* Save a byte?

* Nit: null
2019-02-11 18:42:28 +00:00
Dan Abramov 1fecba9230 Fix crash unmounting an empty Portal (#14820)
* Adds failing test for https://github.com/facebook/react/issues/14811

* Fix removeChild() crash when removing an empty Portal
2019-02-11 18:37:53 +00:00