Commit Graph

13355 Commits

Author SHA1 Message Date
Dominic Gannaway
98390f11f6 Update useEvent implementation (#19271) 2020-07-07 14:44:56 +01:00
Dominic Gannaway
4eb9b1d2b4 Refactor createEventHandle signature (#19174) 2020-07-07 13:05:06 +01:00
Dominic Gannaway
97b96da295 Fix event replaying logic (#19269) 2020-07-07 02:28:55 +01:00
Ricky
91a2e8173f Decouple update priority tracking from Scheduler package (#19121)
* Initial currentLanePriority implementation

* Minor updates from review

* Fix typos and enable flag

* Fix feature flags and lint

* Fix simple event tests by switching to withSuspenseConfig

* Don't lower the priority of setPending in startTransition below InputContinuous

* Move currentUpdateLanePriority in commit root into the first effect block

* Refactor requestUpdateLane to log for priority mismatches

Also verifies that the update lane priority matches the scheduler lane priority before using it

* Fix four tests by adding ReactDOM.unstable_runWithPriority

* Fix partial hydration when using update lane priority

* Fix partial hydration when using update lane priority

* Rename feature flag and only log for now

* Move unstable_runWithPriority to ReactFiberReconciler

* Add unstable_runWithPriority to ReactNoopPersistent too

* Bug fixes and performance improvements

* Initial currentLanePriority implementation

* Minor updates from review

* Fix typos and enable flag

* Remove higherLanePriority from ReactDOMEventReplaying.js

* Change warning implementation and startTransition update lane priority

* Inject reconciler functions to avoid importing src/

* Fix feature flags and lint

* Fix simple event tests by switching to withSuspenseConfig

* Don't lower the priority of setPending in startTransition below InputContinuous

* Move currentUpdateLanePriority in commit root into the first effect block

* Refactor requestUpdateLane to log for priority mismatches

Also verifies that the update lane priority matches the scheduler lane priority before using it

* Fix four tests by adding ReactDOM.unstable_runWithPriority

* Fix partial hydration when using update lane priority

* Fix partial hydration when using update lane priority

* Rename feature flag and only log for now

* Move unstable_runWithPriority to ReactFiberReconciler

* Bug fixes and performance improvements

* Remove higherLanePriority from ReactDOMEventReplaying.js

* Change warning implementation and startTransition update lane priority

* Inject reconciler functions to avoid importing src/

* Fixes from bad rebase
2020-07-06 18:53:42 -04:00
Dominic Gannaway
c3e42a962b Fix master tests (#19267) 2020-07-06 17:36:19 -04:00
Dominic Gannaway
0c0aaeb6bc Handle test-cli failure case for CI (#19265) 2020-07-06 22:05:51 +01:00
Joe Lencioni
0f84b0f02b Fix ExhaustiveDeps ESLint rule throwing with optional chaining (#19260)
Certain code patterns using optional chaining syntax causes
eslint-plugin-react-hooks to throw an error.

We can avoid the throw by adding some guards. I didn't read through the
code to understand how it works, I just added a guard to every place
where it threw, so maybe there is a better fix closer to the root cause
than what I have here.

In my test case, I noticed that the optional chaining that was used in
the code was not included in the suggestions description or output,
but it seems like it should be. This might make a nice future
improvement on top of this fix, so I left a TODO comment to that effect.

Fixes #19243
2020-07-06 15:52:14 -04:00
Brian Vaughn
670c0376ea Enable createEventHandle API for wWW test builds (#19262) 2020-07-06 15:19:50 -04:00
Dominic Gannaway
26071abbe1 Refine event registration + event signatures (#19244)
* Refine event registration + event signatures

* Address feedback
2020-07-06 17:42:01 +01:00
Ittai Baratz
1cbaf48889 Add SSL support to React devtools standalone (#19191)
Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
2020-07-06 10:09:41 -04:00
Dominic Gannaway
65c137768a Fix Flow from #19239 (#19242) 2020-07-02 16:37:10 +01:00
Son Ki-Kyun
cd9046f815 Add some type detection (#19239) 2020-07-02 15:54:36 +01:00
Dan Abramov
b6df4417c7 Remove event config (#19237) 2020-07-02 00:26:29 +01:00
Dan Abramov
991c3b8193 Make event config an implementation detail of each plugin (#19236)
* Merge two variables with same purpose

* Replace dispatchConfig with _reactName on event object
2020-07-02 00:03:17 +01:00
Dan Abramov
b683c07ccc Remove TestUtils dependency on event registry (#19235) 2020-07-01 22:54:28 +01:00
Dan Abramov
9e7f5c02ca Make event plugin injection statically resolvable (#19234)
* Make plugins ESM

* Resolve extractEvents statically

* Resolve eventTypes statically

* Fix flow types and inconsistent naming

* Move injection into the plugin system itself

* Fix Flow
2020-07-01 22:11:05 +01:00
Dominic Gannaway
67eb6ff4a8 Add Flow to ModernChangeEventPlugin (#19232) 2020-07-01 21:49:03 +01:00
Dan Abramov
75b6921d64 Remove dead code from modern event system (#19233)
* Remove dead code from modern event system

* Remove SSR dependency on EventPluginRegistry
2020-07-01 21:04:14 +01:00
Dan Abramov
9fba65efa5 Enable modern event system and delete dead code (#19230) 2020-07-01 17:43:34 +01:00
Dan Abramov
e3f4eb7272 Fork legacy-events folder into react-dom and react-native (#19228) 2020-07-01 16:37:13 +01:00
Dominic Gannaway
cd0275dcb2 Fix responder logic in ReactDOMServerSelectiveHydration-test (#19227) 2020-07-01 16:28:49 +01:00
Dan Abramov
b231445f96 Move responder tests and remove dead code (#19226) 2020-07-01 16:20:49 +01:00
Dan Abramov
5707eeb2d2 Run ReactBrowserEventEmitter test on bundles (#19225)
* Run ReactBrowserEventEmitter test on bundles

* Rm bad tests
2020-07-01 16:01:46 +01:00
Dominic Gannaway
b2bac7311a Remove React Flare Keyboard responder (#19222) 2020-07-01 15:43:16 +01:00
Dan Abramov
f918b0eb41 Fix development mode hang when iframe is removed (#19220)
* Fix development mode hang when iframe is removed

* Also fix #16734
2020-07-01 15:33:29 +01:00
Dan Abramov
8bff8987e5 Don't bailout after Suspending in Legacy Mode (#19216)
* Add a failing test for legacy Suspense blocking context updates in memo

* Add more test case coverage for variations of #17356

* Don't bailout after Suspending in Legacy Mode

Co-authored-by: Tharuka Devendra <tsdevendra1@gmail.com>
2020-06-30 22:06:46 +01:00
Shailendra Gupta
f4097c1aef Added warning to <Context.Provider> in case no value prop is provided (#19054)
* added warning to context.provider in case no value prop

* update message

* updated message and pass undefined
2020-06-30 19:50:55 +01:00
Dan Abramov
47ff31a77a Revert "Add regression test for #18497 (#18538)" (#19215)
This reverts commit e9c1445ba0.
2020-06-30 13:38:31 +01:00
Vetrivel Chinnasamy
b621dab5d4 make link https (#19147) 2020-06-30 12:43:52 +01:00
jddxf
fa32cf299f Add regression tests where sync render causes later concurrent render to expire soon (#18608)
* Add a failing test for #17911

* Add more test cases where sync render causes later concurrent render to expire soon
2020-06-30 12:42:59 +01:00
Dan Abramov
1887c5d946 eslint-plugin-react-hooks@4.0.5 2020-06-30 12:16:49 +01:00
Fred Vollmer
b0533fe33c fix(eslint-plugin-react-hooks): Support optional chaining when accessing prototype method inside useCallback and useMemo #19061 (#19062)
* fix(eslint-plugin-react-hooks): Support optional chaining when accessing prototype method #19061

* run prettier

* Add fix for #19043
2020-06-30 12:14:00 +01:00
Sophie Alpert
e9c1445ba0 Add regression test for #18497 (#18538) 2020-06-30 12:09:05 +01:00
Brian Vaughn
9d9cf383c9 Fixed test script handling of unknown/additional args (#19209) 2020-06-29 15:36:45 -04:00
Dominic Gannaway
3c1a7ac87c Move TOP_BEFORE_BLUR to bubble phase (#19197) 2020-06-26 20:35:21 +01:00
Ricky
72bbcad160 Add new test cli (#19184)
* Add new test cli

* Remove --variant accidentally added to test-persist

* s/test/tests

* Updates from review

* Update package.json tests

* Missed a release channel in circle.yaml

* Update config.yml to use just run: with test commands

* Update release-channel options and add build dir checks

* Update test args to use the new release-channel options

* Fix error in circle config.yml

* Fix a wrong condition for the --variant check

* Fix a wrong condition for the --persistent check

* Prettier

* Require build check for devtool tests as well
2020-06-25 20:39:50 -04:00
Christoph Nakazawa
7d0e4150aa Fix react-runtime main field (#19193)
The "main" field in this package points to a non-existent file. This fixes it.
2020-06-25 12:17:42 -04:00
finico
ed94600fc6 Remove unnecessary tag end from CommitRanked view (#19195) 2020-06-25 12:10:47 -04:00
Chen Gang
ffe516f3bf use NoTimestamp instead of -1 (#19182) 2020-06-23 16:28:24 -04:00
Brian Vaughn
1425fcbb86 Re-enabled DebugTracing feature for old reconciler fork (#19161)
* Re-enabled DebugTracing feature for old reconciler fork

It was temporarily removed by @sebmarkbage via PR #18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values.

@sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.

* Force Code Sandbox CI to re-run
2020-06-23 12:16:23 -04:00
Brian Vaughn
0836f62a5b Updates the DevTools test script to make it easier to test other URLs. (#19179) 2020-06-23 11:48:35 -04:00
Brian Vaughn
1cfd332fd7 Shutdown DevTools Bridge synchronously when unmounting (#19180) 2020-06-23 11:48:04 -04:00
Jack Works
5b98656909 fix: use define property to overwrite console, close #19099 (#19123)
* fix: use define property to overwrite console, close #19099

* fix: lint error
2020-06-23 10:34:53 -04:00
Andrew Clark
6ba25b96df Bugfix: Legacy Mode + DevTools "force fallback" (#19164)
DevTools has a feature to force a Suspense boundary to show a fallback.
This feature causes us to skip the first render pass (where we render
the primary children) and go straight to rendering the fallback.

There's a Legacy Mode-only codepath that failed to take this scenario
into account, instead assuming that whenever a fallback is being
rendered, it was preceded by an attempt to render the primary children.

SuspenseList can also cause us to skip the first pass, but the relevant
branch is Legacy Mode-only, and SuspenseList is not supported in
Legacy Mode.

Fixes a test that I had temporarily disabled when upstreaming the Lanes
implementation in #19108.
2020-06-19 11:06:42 -07:00
Luna Ruan
d1d9054e09 Revert "Re-enabled DebugTracing feature for old reconciler fork (#19142)" (#19159)
This reverts commit cc7c1aece4.
2020-06-18 18:18:56 -07:00
YeonJuan
090c6ed751 [eslint-plugin-react-hooks]: handling sparse array when no-inline callback (#19145) 2020-06-17 12:29:02 -04:00
Brian Vaughn
cc7c1aece4 Re-enabled DebugTracing feature for old reconciler fork (#19142)
It was temporarily removed by @sebmarkbage via PR #18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values.

@sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
2020-06-16 15:16:15 -04:00
阿林
d4fc2c1457 Fix spelling (#19084) 2020-06-15 20:56:56 -04:00
Ricky
30b47103d4 Fix spelling errors and typos (#19138) 2020-06-15 19:59:44 -04:00
Rick Hanlon
655affa302 Clarifications
Co-authored-by: shengxinjing <316783812@qq.com>
2020-06-12 21:09:29 -04:00