Commit Graph
12494 Commits
Author SHA1 Message Date
Nicolas GallagherandGitHub 540b082c9f [react-interactions] Tap cancels on second pointerdown (#16936)
This patch causes onTapCancel to be called whenever a second pointer interacts
with the responder target.
2019-10-01 15:13:31 -07:00
Dominic GannawayandGitHub cac5f5b0de [react-interactions] Add allowModifiers flag to FocusList + FocusTable (#16971) 2019-10-01 17:59:52 +02:00
Rango YuanandDominic Gannaway 7f96b2bd5b Fix mouseenter handlers fired twice (#16928) 2019-10-01 14:03:14 +02:00
Andrew ClarkandGitHub be11c8d2ae Remove IIFE wrappers from dev invariant checks (#16963)
The error transform works by replacing calls to `invariant` with
an `if` statement.

Since we're replacing a call expression with a statement, Babel wraps
the new statement in an immediately-invoked function expression (IIFE).
This wrapper is unnecessary in practice because our `invariant` calls
are always part of their own expression statement.

In the production bundle, the function wrappers are removed by Closure.
But they remain in the development bundles.

This commit updates the transform to confirm that an `invariant` call
expression's parent node is an expression statement. (If not, it throws
a transform error.)

Then, it replaces the expression statement instead of the expression
itself, effectively removing the extraneous IIFE wrapper.
2019-09-30 11:14:51 -07:00
Brian Vaughn d78de8fc7f React DevTools v4.1.2 -> v.4.1.3 2019-09-30 09:33:23 -07:00
Brian Vaughn 4fd14dfee4 Updated DevTools CHANGELOG 2019-09-30 08:31:47 -07:00
David HuangandBrian Vaughn 374cd7c643 [DevTools] postMessage target origin needs to be '*' for local files (#16953) 2019-09-30 08:29:18 -07:00
Dominic GannawayandGitHub 04e32694e5 [react-interactions] Add tab handling to FocusList (#16958) 2019-09-30 17:13:35 +02:00
Dominic GannawayandGitHub 65384d22f8 [react-interactins] FocusTable tabScope handling+tabIndex control (#16922) 2019-09-30 11:41:20 +02:00
Kirankumar AmbatiandBrian Vaughn 3b469986ea chore: updated comment message (#16949) 2019-09-29 15:00:49 -07:00
Andrew Clark c7a1929dda Update local version numbers for 16.10.1 release 2019-09-28 21:41:42 -07:00
Andrew Clark 9789fbcd54 Changelog for v16.10.1 2019-09-28 11:24:19 -07:00
Sebastian MarkbågeandGitHub 19c7bce44b Allow Suspense Mismatch on the Client to Silently Proceed (#16943)
* Regression test: Suspense + hydration + legacy

* Allow Suspense Mismatch on the Client to Silently Proceed

This fixes but isn't actually the semantics that we want this case to have.
2019-09-28 10:43:53 -07:00
Sebastian MarkbågeandGitHub 3441db83f9 Remove enableUserBlockingEvents flag (#16882)
Seems like this worked out. We can clean up the flag now.
2019-09-27 19:46:56 -07:00
Sebastian MarkbågeandGitHub b073d10c69 [Selective Hydration] Increase priority for non-synchronous discrete events and retries (#16935)
* Increase retryTime for increased priority dehydrated boundaries

* Increaese the priority to user blocking for every next discrete boundary
2019-09-27 17:27:17 -07:00
Brian Vaughn 55f3051162 Fixed typo in DevTools CHANGELOG 2019-09-27 17:10:27 -07:00
Brian Vaughn 96d918e3b6 DevTools v4.1.1 -> v4.1.2 2019-09-27 17:03:17 -07:00
Brian VaughnandGitHub 7033ff7c77 Replaced === check with Object.is() to support values like NaN (#16934) 2019-09-27 16:54:53 -07:00
Nicolas GallagherandGitHub 6db52bfb76 [react-interactions] Fix virtual click heuristic (#16915) 2019-09-27 15:38:47 -07:00
Andrew Clark 3fcf88d02c Fix heading level in changelog 2019-09-27 13:37:36 -07:00
Andrew Clark b2184e036e Changelog for 16.10 2019-09-27 13:31:47 -07:00
Andrew Clark 96287996ae Update local version numbers for 16.10 release 2019-09-27 13:31:35 -07:00
Luna RuanandGitHub 998512980b expose isHydrating (#16909)
expose isHydrating for FB
2019-09-26 14:47:01 -07:00
Eli WhiteandGitHub aa1db09ab5 Add HostComponent type to ReactNative (#16898)
* Add HostComponent type to ReactNative

* Use type alias imports instead of wildcard

* Fix forgotten Object in measureLayout type
2019-09-26 14:42:18 -07:00
Andrew ClarkandGitHub 28cec7bc2c [bugfix] Fix false positive render phase update (#16907)
Need to reset the current "debug phase" inside the catch block.
Otherwise React thinks we're still in the render phase during the
subsequent event.
2019-09-26 12:47:48 -07:00
Brian Vaughn 5e3bbd711c DevTools v4.1.0 -> v4.1.1 2019-09-26 10:22:59 -07:00
Brian VaughnandGitHub df2e7d2219 DevTools shows unsupported renderer version dialog (#16897)
* DevTools shows unsupported renderer version dialog

* Optimistic CHANGELOG udpate
2019-09-26 08:41:46 -07:00
Brian Vaughn e82c7183a1 Updated DevTools CHANGELOG 2019-09-26 08:26:18 -07:00
Dominic GannawayandGitHub 3c688e2390 [react-interactions] Add wrapping support to FocusList/FocusTable (#16903) 2019-09-26 15:15:48 +02:00
David HuangandDan Abramov 37c82431dc Moving backend injection to the content script (#16900) 2019-09-26 14:03:07 +01:00
Sebastian MarkbågeandGitHub fc2a4ab273 Selective Hydration (#16880)
* Add Feature Flag for Selective Hydration

* Enable Synchronous Hydration of Discrete Events

* Resolve cyclic dependency
2019-09-25 15:26:27 -07:00
Dominic GannawayandGitHub 71a268b30b [react-interactions] FocusTable key press bound propgataion (#16895) 2019-09-25 21:12:39 +02:00
Brian VaughnandGitHub 911611fc1f Update useEditableValue hook to sync external value changes (#16878)
* Update useEditableValue to mirror value cahnges

Previously, the hook initialized local state (in useState) to mirror the prop/state value. Updates to the value were ignored though. (Once the state was initialized, it was never updated.) The new hook updates the local/editable state to mirror the external value unless there are already pending, local edits being made.

* Optimistic CHANGELOG update

* Added additional useEditableValue() unit test cases
2019-09-25 10:46:27 -07:00
Dominic GannawayandGitHub 3a0988a429 [devtools] Add support for React Scope symbol/number (#16893) 2019-09-25 19:03:37 +02:00
Dominic GannawayandGitHub f4fe860759 [react-interactions] Add more documentation for a11y components (#16894) 2019-09-25 19:01:15 +02:00
Sebastian MarkbågeandGitHub f7024c96d3 Include tag in begin/complete invariant (#16881) 2019-09-25 08:10:35 -07:00
Sebastian MarkbågeandGitHub c0da7be7d3 These flags are hard coded in our internal config (#16883)
By hard coding them here they can get properly DCE and don't have to be
sent to users. The internal config should only have dynamic flags.
2019-09-25 08:00:29 -07:00
Dominic GannawayandGitHub d72d53dc1a [react-interactions] Add Portal propagation configuration (#16889) 2019-09-25 16:56:51 +02:00
Dominic GannawayandGitHub 1b9a84a3ce [react-interactions] Add initial docs explaining React Scopes (#16892) 2019-09-25 14:57:47 +02:00
Joshua GrossandEli White 5780faf4e5 [React Native] Improve errors for invalid ViewConfig getter functions (#16879)
* [React Native] Improve logging for missing view configs and invalid view config getter functions

* [React Native] Improve logging for missing view configs and invalid view config getter functions
2019-09-24 17:46:21 -07:00
Dominic GannawayandGitHub 4a2d57b92b [react-interactions] TabFocus -> FocusManager (#16874) 2019-09-24 23:26:20 +02:00
Dominic GannawayandGitHub bd6a1aae5e [react-interactions] Make FocusList bundle (#16876) 2019-09-24 18:02:13 +02:00
Dominic GannawayandGitHub 3f5fee1897 [react-interactions] Add FocusList component (#16875) 2019-09-24 17:14:29 +02:00
Jessica FrancoandDan Abramov 8db3f52ec3 Warning system refactoring (part 1) (#16799)
* Rename lowPriorityWarning to lowPriorityWarningWithoutStack

This maintains parity with the other warning-like functions.

* Duplicate the toWarnDev tests to test toLowPriorityWarnDev

* Make a lowPriorityWarning version of warning.js

* Extract both variants in print-warning

Avoids parsing lowPriorityWarning.js itself as the way it forwards the
call to lowPriorityWarningWithoutStack is not analyzable.
2019-09-24 13:45:38 +01:00
Andrew ClarkandGitHub 5d76957f7a Idle updates should not be blocked by hidden work (#16871)
* Idle updates should not be blocked by hidden work

Use the special `Idle` expiration time for updates that are triggered at
Scheduler's `IdlePriority`, instead of `Never`.

The key difference between Idle and Never¹ is that Never work can be
committed in an inconsistent state without tearing the UI. The main
example is offscreen content, like a hidden subtree.

¹ "Never" isn't the best name. I originally called it that because it
"never" expires, but neither does Idle. Since it's mostly used for
offscreen subtrees, we could call it "Offscreen." However, it's also
used for dehydrated Suspense boundaries, which are inconsistent in the
sense that they haven't finished yet, but aren't visibly inconsistent
because the server rendered HTML matches what the hydrated tree would
look like.

* Reset as early as possible using local variable

* Updates in a hidden effect should be Idle

I had made them Never to avoid an extra render when a hidden effect
updates the hidden component -- if they are Idle, we have to render once
at Idle, which bails out on the hidden subtree, then again at Never to
actually process the update -- but the problem of needing an extra
render pass to bail out hidden updates already exists and we should fix
that properly instead of adding yet another special case.
2019-09-23 20:52:48 -07:00
Nicolas GallagherandGitHub b0d10af892 [react-interactions] Press with useRef instead of useState (#16870)
We only need to read and modify the value for the lifetime of the hook
2019-09-23 16:25:13 -07:00
Brian Vaughn 506e846933 DevTools CHANGELOG update 2019-09-23 12:58:58 -07:00
Brian VaughnandGitHub 06bda9938e Revert change to backend injection method from PR #16752 (#16864)
PR #16752 changed how we were injecting the backend script to be done by the content script in order to work around Trusted Type limitations with our previous approach. This may have caused a regression (see #16840) so I'm backing it out to verify.
2019-09-23 12:56:36 -07:00
Brian VaughnandGitHub 127c91c6b2 Fix DevTools v4.1 editable hook regression (#16867)
* Fixed a regression in hooks editor from a recent EditableValue change

* Fixed a reset/state bug in useEditableValue() hook and removed unnecessary useMemo()
2019-09-23 12:56:01 -07:00
Dominic GannawayandGitHub ab318992ed [react-interaction] Refactor a11y components more (#16866) 2019-09-23 21:30:49 +02:00