profile
viewpoint
Dominic Gannaway trueadm @facebook London, United Kingdom Currently an engineer on the React core team at @Facebook. Author of @infernojs and t7. Enjoys coding + being a Dad.

infernojs/inferno 14188

:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

nightwolfz/inferno-starter 143

Inferno+Mobx starter project

infernojs/babel-plugin-inferno 68

Transforms JSX to InfernoJS vNodes

infernojs/inferno-typescript-example 56

An example of using TypeScript with Inferno

infernojs/inferno-motion 39

A spring that solves your animation problems.

joshburgess/inferno-game-kit 14

A fork of react-game-kit using Inferno instead of React. 255kb → 65kb, -40% CPU time, -25% memory

bvaughn/react 11

A declarative, efficient, and flexible JavaScript library for building user interfaces.

gaearon/prepack 7

Prepack is a partial evaluator for JavaScript. Prepack rewrites a JavaScript bundle, resulting in JavaScript code that executes more efficiently.

trueadm/awesome-javascript 6

:turtle: A collection of awesome browser-side JavaScript libraries, resources and shiny things.

push eventtrueadm/react

Dominic Gannaway

commit sha c9c8d138dae1d2fdc45413cb2d00dca272f28e24

Add modern event plugin system WIP WIP Fix Fix Fix Fix

view details

push time in an hour

push eventtrueadm/react

Sebastian Markbåge

commit sha 09348798a912c8682e57c35842aa7a007e13fdb9

Codemod to import * as React from "react"; (#18102) * import * as React from "react"; This is the correct way to import React from an ES module since the ES module will not have a default export. Only named exports. * import * as ReactDOM from "react-dom"

view details

Sebastian Markbåge

commit sha be76966f6b23e158f3c163061dcc266a294fddc1

Code mod import * as React from 'react' in react-window (#18105)

view details

adasq

commit sha 501a78881e356bae2bc66be3d25966e87f5aa757

runAllPassiveEffectDestroysBeforeCreates's feature flag description typo fixed (#18115)

view details

Sebastian Markbåge

commit sha ccab49473897aacae43bb4d55c1061065892403c

Move type DOMContainer to HostConfig (#18112) Exports from ReactDOM represents React's public API. This include types exported by React. At some point we'll start building Flow types from these files. The duplicate name between DOMContainer and Container seems confusing too since it was used in the same files even though they're the same.

view details

Haseeb Furkhan Mohammed

commit sha 0e49074f7a5ba3981ffd28387c8b7f891c7bad24

Cross platform support to run yarn test:edge for Microsoft Edge dev tools extension (#18108) * Test automation for edge dev tools extension * Linter changes * Load extension automatically. * Fixed path in `test` command Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>

view details

Moji Izadmehr

commit sha bf13d3e3c6632acad4e7fce1bc93df336cb57acc

[eslint-plugin-react-hooks] Fix cyclic caching for loops containing a… (#16853) * [eslint-plugin-react-hooks] Fix cyclic caching for loops containing a condition * [eslint-plugin-react-hooks] prettier write * [eslint-plugin-react-hooks] Fix set for tests * Update packages/eslint-plugin-react-hooks/src/RulesOfHooks.js Co-Authored-By: Luke Kang <kidkkr@icloud.com> Co-authored-by: Luke Kang <kidkkr@icloud.com>

view details

Dominic Gannaway

commit sha a29a273c17d069f3bc89c8a71dc90da4dafe544e

[react-interactions] Ensure blur to window disengages press (#18125)

view details

Dominic Gannaway

commit sha 8d7535e540c036a40754acb53d51f1fdcc8dc6d8

Add @nolint to FB bundle headers (#18126)

view details

Sebastian Markbåge

commit sha 60016c448bb7d19fc989acd05dda5aca2e124381

Export React as Named Exports instead of CommonJS (#18106) * Add options for forked entry points We currently fork .fb.js entry points. This adds a few more options. .modern.fb.js - experimental FB builds .classic.fb.js - stable FB builds .fb.js - if no other FB build, use this for FB builds .experimental.js - experimental builds .stable.js - stable builds .js - used if no other override exists This will be used to have different ES exports for different builds. * Switch React to named exports * Export named exports from the export point itself We need to re-export the Flow exported types so we can use them in our code. We don't want to use the Flow types from upstream since it doesn't have the non-public APIs that we have. This should be able to use export * but I don't know why it doesn't work. This actually enables Flow typing of React which was just "any" before. This exposed some Flow errors that needs fixing. * Create forks for the react entrypoint None of our builds expose all exports and they all differ in at least one way, so we need four forks. * Set esModule flag to false We don't want to emit the esModule compatibility flag on our CommonJS output. For now we treat our named exports as if they're CommonJS. This is a potentially breaking change for scheduler (but all those apis are unstable), react-is and use-subscription. However, it seems unlikely that anyone would rely on this since these only have named exports. * Remove unused Feature Flags * Let jest observe the stable fork for stable tests This lets it do the negative test by ensuring that the right tests fail. However, this in turn will make other tests that are not behind __EXPERIMENTAL__ fail. So I need to do that next. * Put all tests that depend on exports behind __EXPERIMENTAL__ Since there's no way to override the exports using feature flags in .intern.js anymore we can't use these APIs in stable. The tradeoff here is that we can either enable the negative tests on "stable" that means experimental are expected to fail, or we can disable tests on stable. This is unfortunate since some of these APIs now run on a "stable" config at FB instead of the experimental. * Switch ReactDOM to named exports Same strategy as React. I moved the ReactDOMFB runtime injection to classic.fb.js Since we only fork the entrypoint, the `/testing` entrypoint needs to be forked too to re-export the same things plus `act`. This is a bit unfortunate. If it becomes a pattern we can consider forking in the module resolution deeply. fix flow * Fix ReactDOM Flow Types Now that ReactDOM is Flow type checked we need to fix up its types. * Configure jest to use stable entry for ReactDOM in non-experimental * Remove additional FeatureFlags that are no longer needed These are only flagging the exports and no implementation details so we can control them fully through the export overrides.

view details

Steve Harrison

commit sha f3ecd56beacd4a2849a1bac4faab5d41b7ad758b

Fixed a spelling mistake in a comment. (#18119)

view details

Sebastian Markbåge

commit sha 8e13e770e39a6fc634a87b5d5144ec1e54000a0c

Remove /testing entry point from 'react' package (#18137) We're not actually building this entry point. I can't think of a reason we'd need to fork the isomorphic one. We don't really fork it for anything since it's so generic to work with all renderers. Since /profiling doesn't have this, it might confuse the story if we made people alias two things for testing but not profiling.

view details

Dominic Gannaway

commit sha 3b4e9426ca3353479ce50f5e4617cf1a6b6e2054

Add modern event plugin system WIP WIP Fix Fix Fix

view details

push time in an hour

push eventtrueadm/react

Sebastian Markbåge

commit sha 09348798a912c8682e57c35842aa7a007e13fdb9

Codemod to import * as React from "react"; (#18102) * import * as React from "react"; This is the correct way to import React from an ES module since the ES module will not have a default export. Only named exports. * import * as ReactDOM from "react-dom"

view details

Sebastian Markbåge

commit sha be76966f6b23e158f3c163061dcc266a294fddc1

Code mod import * as React from 'react' in react-window (#18105)

view details

adasq

commit sha 501a78881e356bae2bc66be3d25966e87f5aa757

runAllPassiveEffectDestroysBeforeCreates's feature flag description typo fixed (#18115)

view details

Sebastian Markbåge

commit sha ccab49473897aacae43bb4d55c1061065892403c

Move type DOMContainer to HostConfig (#18112) Exports from ReactDOM represents React's public API. This include types exported by React. At some point we'll start building Flow types from these files. The duplicate name between DOMContainer and Container seems confusing too since it was used in the same files even though they're the same.

view details

Haseeb Furkhan Mohammed

commit sha 0e49074f7a5ba3981ffd28387c8b7f891c7bad24

Cross platform support to run yarn test:edge for Microsoft Edge dev tools extension (#18108) * Test automation for edge dev tools extension * Linter changes * Load extension automatically. * Fixed path in `test` command Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>

view details

Moji Izadmehr

commit sha bf13d3e3c6632acad4e7fce1bc93df336cb57acc

[eslint-plugin-react-hooks] Fix cyclic caching for loops containing a… (#16853) * [eslint-plugin-react-hooks] Fix cyclic caching for loops containing a condition * [eslint-plugin-react-hooks] prettier write * [eslint-plugin-react-hooks] Fix set for tests * Update packages/eslint-plugin-react-hooks/src/RulesOfHooks.js Co-Authored-By: Luke Kang <kidkkr@icloud.com> Co-authored-by: Luke Kang <kidkkr@icloud.com>

view details

Dominic Gannaway

commit sha a29a273c17d069f3bc89c8a71dc90da4dafe544e

[react-interactions] Ensure blur to window disengages press (#18125)

view details

Dominic Gannaway

commit sha 8d7535e540c036a40754acb53d51f1fdcc8dc6d8

Add @nolint to FB bundle headers (#18126)

view details

Sebastian Markbåge

commit sha 60016c448bb7d19fc989acd05dda5aca2e124381

Export React as Named Exports instead of CommonJS (#18106) * Add options for forked entry points We currently fork .fb.js entry points. This adds a few more options. .modern.fb.js - experimental FB builds .classic.fb.js - stable FB builds .fb.js - if no other FB build, use this for FB builds .experimental.js - experimental builds .stable.js - stable builds .js - used if no other override exists This will be used to have different ES exports for different builds. * Switch React to named exports * Export named exports from the export point itself We need to re-export the Flow exported types so we can use them in our code. We don't want to use the Flow types from upstream since it doesn't have the non-public APIs that we have. This should be able to use export * but I don't know why it doesn't work. This actually enables Flow typing of React which was just "any" before. This exposed some Flow errors that needs fixing. * Create forks for the react entrypoint None of our builds expose all exports and they all differ in at least one way, so we need four forks. * Set esModule flag to false We don't want to emit the esModule compatibility flag on our CommonJS output. For now we treat our named exports as if they're CommonJS. This is a potentially breaking change for scheduler (but all those apis are unstable), react-is and use-subscription. However, it seems unlikely that anyone would rely on this since these only have named exports. * Remove unused Feature Flags * Let jest observe the stable fork for stable tests This lets it do the negative test by ensuring that the right tests fail. However, this in turn will make other tests that are not behind __EXPERIMENTAL__ fail. So I need to do that next. * Put all tests that depend on exports behind __EXPERIMENTAL__ Since there's no way to override the exports using feature flags in .intern.js anymore we can't use these APIs in stable. The tradeoff here is that we can either enable the negative tests on "stable" that means experimental are expected to fail, or we can disable tests on stable. This is unfortunate since some of these APIs now run on a "stable" config at FB instead of the experimental. * Switch ReactDOM to named exports Same strategy as React. I moved the ReactDOMFB runtime injection to classic.fb.js Since we only fork the entrypoint, the `/testing` entrypoint needs to be forked too to re-export the same things plus `act`. This is a bit unfortunate. If it becomes a pattern we can consider forking in the module resolution deeply. fix flow * Fix ReactDOM Flow Types Now that ReactDOM is Flow type checked we need to fix up its types. * Configure jest to use stable entry for ReactDOM in non-experimental * Remove additional FeatureFlags that are no longer needed These are only flagging the exports and no implementation details so we can control them fully through the export overrides.

view details

Steve Harrison

commit sha f3ecd56beacd4a2849a1bac4faab5d41b7ad758b

Fixed a spelling mistake in a comment. (#18119)

view details

Sebastian Markbåge

commit sha 8e13e770e39a6fc634a87b5d5144ec1e54000a0c

Remove /testing entry point from 'react' package (#18137) We're not actually building this entry point. I can't think of a reason we'd need to fork the isomorphic one. We don't really fork it for anything since it's so generic to work with all renderers. Since /profiling doesn't have this, it might confuse the story if we made people alias two things for testing but not profiling.

view details

push time in an hour

delete branch trueadm/react

delete branch : press-alert-fix

delete time in 21 hours

pull request commentfacebook/react

[react-interactions] Ensure blur to window disengages press

@necolas Definitely. The should both be ported to those responders at some point too.

trueadm

comment created time in 21 hours

delete branch trueadm/react

delete branch : no-lint-bundles

delete time in a day

push eventfacebook/react

Dominic Gannaway

commit sha 8d7535e540c036a40754acb53d51f1fdcc8dc6d8

Add @nolint to FB bundle headers (#18126)

view details

push time in a day

PR merged facebook/react

Reviewers
Add @nolint to FB bundle headers CLA Signed React Core Team

Let's add the @nolint header to the FB/RN bundles so that we don't run eslint on the bundles.

+9 -0

3 comments

1 changed file

trueadm

pr closed time in a day

push eventtrueadm/react

Dominic Gannaway

commit sha e24d36fae073f2c9570f264d5ccb36618977d96b

Add @nolint to FB bundle headers notlint lol

view details

push time in a day

PR opened facebook/react

Reviewers
Add @nolint to FB bundle headers

Let's add the @nolint header to the FB/RN bundles so that we don't run eslint on the bundles.

+9 -0

0 comment

1 changed file

pr created time in a day

create barnchtrueadm/react

branch : no-lint-bundles

created branch time in a day

push eventfacebook/react

Dominic Gannaway

commit sha a29a273c17d069f3bc89c8a71dc90da4dafe544e

[react-interactions] Ensure blur to window disengages press (#18125)

view details

push time in a day

PR merged facebook/react

Reviewers
[react-interactions] Ensure blur to window disengages press CLA Signed React Core Team

This PR fixes an issue that was found internally. Specifically, if you engage a press and then a browser dialog opens, we should ensure that the press disengages. Otherwise, without this change the press with remain engaged. Also added a regression test to ensure we keep this behavior in the future.

+40 -0

3 comments

2 changed files

trueadm

pr closed time in a day

push eventtrueadm/react

Dominic Gannaway

commit sha 54c96b963c9f2a4bdff1e85225988b83a521e4ab

[react-interactions] Ensure blur to window disengages press Cleanup

view details

push time in a day

PR opened facebook/react

Reviewers
[react-interactions] Ensure blur to window disengages press

This PR fixes an issue that was found internally. Specifically, if you engage a press and then a browser dialog opens, we should ensure that the press disengages. Otherwise, without this change the press with remain engaged. Also added a regression test to pick it up.

+34 -0

0 comment

2 changed files

pr created time in a day

create barnchtrueadm/react

branch : press-alert-fix

created branch time in a day

push eventtrueadm/react

Dominic Gannaway

commit sha ac36656f71307522495bdb0e509eead6e814f419

Add modern event plugin system WIP WIP Fix Fix Fix

view details

push time in 5 days

push eventtrueadm/react

Dominic Gannaway

commit sha cae7707230d55d0600d9c501c2d12630801edb7e

Add modern event plugin system WIP WIP Fix Fix

view details

push time in 5 days

push eventtrueadm/react

Dominic Gannaway

commit sha 2df32f23f829cc232c55befad32f0fa7fcc4387f

Add modern event plugin system WIP WIP Fix

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 65bbda7f169394005252b46a5992ece5a2ffadad

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details.

view details

Sebastian Markbåge

commit sha 2c4221ce8bc5765bfddc4b32af4af602077a4a3e

Change string refs in function component message (#18031) This should refer to string refs specifically. The forwardRef part doesn't make any sense in this case. I think this was just an oversight.

view details

Brian Vaughn

commit sha 78e816032c8af962343abbf384e06f3e9bae9269

Don't warn about unmounted updates if pending passive unmount (#18096) I recently landed a change to the timing of passive effect cleanup functions during unmount (see #17925). This change defers flushing of passive effects for unmounted components until later (whenever we next flush pending passive effects). Since this change increases the likelihood of a (not actionable) state update warning for unmounted components, I've suppressed that warning for Fibers that have scheduled passive effect unmounts pending.

view details

Dominic Gannaway

commit sha ad69a3ada383b0592b5e2f45a1136105f379e8cc

Add modern event plugin system WIP WIP

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 2c4221ce8bc5765bfddc4b32af4af602077a4a3e

Change string refs in function component message (#18031) This should refer to string refs specifically. The forwardRef part doesn't make any sense in this case. I think this was just an oversight.

view details

Brian Vaughn

commit sha 78e816032c8af962343abbf384e06f3e9bae9269

Don't warn about unmounted updates if pending passive unmount (#18096) I recently landed a change to the timing of passive effect cleanup functions during unmount (see #17925). This change defers flushing of passive effects for unmounted components until later (whenever we next flush pending passive effects). Since this change increases the likelihood of a (not actionable) state update warning for unmounted components, I've suppressed that warning for Fibers that have scheduled passive effect unmounts pending.

view details

push time in 5 days

push eventtrueadm/react

Dominic Gannaway

commit sha e13f41c94c8ccf0024ce20b44bf726d55162fab3

Add modern event plugin system WIP

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 65bbda7f169394005252b46a5992ece5a2ffadad

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details.

view details

Sebastian Markbåge

commit sha a57382cd28c3c0e70781b8dcbad02278f84b6b58

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details. Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI Add test cases and revise traversal Fix Refactor twak Rename Address traversal of comment nodes Fix Fix WIP

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 88e225dfeab7c515ceb4d51fddb6be85b26203ab

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details. Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI Add test cases and revise traversal Fix Refactor twak Rename Address traversal of comment nodes Fix Fix WIP

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 754b8b401bdde4b1583ca5d95c03aaa802fdda37

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details. Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI Add test cases and revise traversal Fix Refactor twak Rename Address traversal of comment nodes Fix Fix

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 15c39c15bd0b1684613c0ed044b43ec923e636d4

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details. Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI Add test cases and revise traversal Fix Refactor twak Rename Address traversal of comment nodes Fix

view details

push time in 5 days

push eventtrueadm/react

Sebastian Markbåge

commit sha 664213e678bf89139b9bb4e3055590f9a6d50352

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details. Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI Add test cases and revise traversal Fix Refactor twak Rename Address traversal of comment nodes

view details

push time in 5 days

push eventtrueadm/react

Sunil Pai

commit sha b789060dca314f052d856cab509569cf41020cd5

Feature Flag for React.jsx` "spreading a key to jsx" warning (#18074) Adds a feature flag for when React.jsx warns you about spreading a key into jsx. It's false for all builds, except as a dynamic flag for fb/www. I also included the component name in the warning.

view details

Kunuk Nykjær

commit sha abfbae02a4dcb56ef0040401e7822007a9d61d5b

Update Rollup version to 1.19.4 and fix breaking changes (#15037) * update rollup versioni * ignore Rollup warnings for known warning codes * add lecacy support from elas7 * rollup 1.5 * upd to ver 1.6.0 * don't throw error * use return instead of throw error * upd code in comment * fix getters test * rollup 1.7 * rollup 1.7.3 * remove comments * use rollup 1.7.4 * update yarn.lock for new rollup version * rollup version 1.9.0 * rollback to version 1.7.4 * add globalThis to eslintrc.umd * rollup 1.9.0 * upd rollup plugin versions to satisfied latest versions * add result.json update * rollup 1.9.3 * rollup 1.10.0 * ver 1.10.1 * rollup 1.11.3 * rollup ver 1.12.3 * rollup 1.13.1 * rollup 1.14.6 * rollup 1.15.6 * rollup 1.16.2 * upd tests * prettier * Rollup 1.16.3 * upd * should throw when finding getters with a different syntax from the ones generated by Rollup * add more one test * rollup-plugin-prettier updated changed stuff, revert them * don't upd all the Rollup plugins * rollup-plugin-babel 3.0.7 * upd rollup plugin versions * upd rollup-plugin-commonjs * bracket spacing * rollup 1.16.6 * rollup 1.16.7 * rename test description * rollup 1.18.0 * use externalLiveBindings: false * rollup 1.19.3 * remove remove-getters * simplify CIRCULAR_DEPENDENCY warning * simplify if logic in sizes-plugin * rollup 1.19.4 * update output for small optimizations * remove globalThis * remove results.json file * re-add globalThis

view details

Andrew Clark

commit sha 5de5b61507d44c158fc0223728c5834fbd224ec5

Bugfix: `memo` drops lower pri updates on bail out (#18091) Fixes a bug where lower priority updates on a components wrapped with `memo` are sometimes left dangling in the queue without ever being processed, if they are preceded by a higher priority bailout. Cause ----- The pending update priority field is cleared at the beginning of `beginWork`. If there is remaining work at a lower priority level, it's expected that it will be accumulated on the work-in-progress fiber during the begin phase. There's an exception where this assumption doesn't hold: SimpleMemoComponent contains a bailout that occurs *before* the component is evaluated and the update queues are processed, which means we don't accumulate the next priority level. When we complete the fiber, the work loop is left to believe that there's no remaining work. Mitigation ---------- Since this only happens in a single case, a late bailout in SimpleMemoComponent, I've mitigated the bug in that code path by restoring the original update priority from the current fiber. This same case does not apply to MemoComponent, because MemoComponent fibers do not contain hooks or update queues; rather, they wrap around an inner fiber that may contain those. However, I've added a test case for MemoComponent to protect against a possible future regression. Possible next steps ------------------- We should consider moving the update priority assignment in `beginWork` out of the common path and into each branch, to avoid similar bugs in the future.

view details

Dan Abramov

commit sha 8b596e00a4fffd6bb5e6990f4dd59e40e80a5ea0

Remove unused arguments in the reconciler (#18092)

view details

Sebastian Markbåge

commit sha 65bbda7f169394005252b46a5992ece5a2ffadad

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details.

view details

Dominic Gannaway

commit sha f862c08ccae066de2dd450d912f086feec991213

Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI

view details

Dominic Gannaway

commit sha 974e6c05178149652c00a31fdb9b806ad881a5a2

Add test cases and revise traversal Fix Refactor twak Rename

view details

push time in 5 days

push eventtrueadm/react

Sunil Pai

commit sha b789060dca314f052d856cab509569cf41020cd5

Feature Flag for React.jsx` "spreading a key to jsx" warning (#18074) Adds a feature flag for when React.jsx warns you about spreading a key into jsx. It's false for all builds, except as a dynamic flag for fb/www. I also included the component name in the warning.

view details

Kunuk Nykjær

commit sha abfbae02a4dcb56ef0040401e7822007a9d61d5b

Update Rollup version to 1.19.4 and fix breaking changes (#15037) * update rollup versioni * ignore Rollup warnings for known warning codes * add lecacy support from elas7 * rollup 1.5 * upd to ver 1.6.0 * don't throw error * use return instead of throw error * upd code in comment * fix getters test * rollup 1.7 * rollup 1.7.3 * remove comments * use rollup 1.7.4 * update yarn.lock for new rollup version * rollup version 1.9.0 * rollback to version 1.7.4 * add globalThis to eslintrc.umd * rollup 1.9.0 * upd rollup plugin versions to satisfied latest versions * add result.json update * rollup 1.9.3 * rollup 1.10.0 * ver 1.10.1 * rollup 1.11.3 * rollup ver 1.12.3 * rollup 1.13.1 * rollup 1.14.6 * rollup 1.15.6 * rollup 1.16.2 * upd tests * prettier * Rollup 1.16.3 * upd * should throw when finding getters with a different syntax from the ones generated by Rollup * add more one test * rollup-plugin-prettier updated changed stuff, revert them * don't upd all the Rollup plugins * rollup-plugin-babel 3.0.7 * upd rollup plugin versions * upd rollup-plugin-commonjs * bracket spacing * rollup 1.16.6 * rollup 1.16.7 * rename test description * rollup 1.18.0 * use externalLiveBindings: false * rollup 1.19.3 * remove remove-getters * simplify CIRCULAR_DEPENDENCY warning * simplify if logic in sizes-plugin * rollup 1.19.4 * update output for small optimizations * remove globalThis * remove results.json file * re-add globalThis

view details

Andrew Clark

commit sha 5de5b61507d44c158fc0223728c5834fbd224ec5

Bugfix: `memo` drops lower pri updates on bail out (#18091) Fixes a bug where lower priority updates on a components wrapped with `memo` are sometimes left dangling in the queue without ever being processed, if they are preceded by a higher priority bailout. Cause ----- The pending update priority field is cleared at the beginning of `beginWork`. If there is remaining work at a lower priority level, it's expected that it will be accumulated on the work-in-progress fiber during the begin phase. There's an exception where this assumption doesn't hold: SimpleMemoComponent contains a bailout that occurs *before* the component is evaluated and the update queues are processed, which means we don't accumulate the next priority level. When we complete the fiber, the work loop is left to believe that there's no remaining work. Mitigation ---------- Since this only happens in a single case, a late bailout in SimpleMemoComponent, I've mitigated the bug in that code path by restoring the original update priority from the current fiber. This same case does not apply to MemoComponent, because MemoComponent fibers do not contain hooks or update queues; rather, they wrap around an inner fiber that may contain those. However, I've added a test case for MemoComponent to protect against a possible future regression. Possible next steps ------------------- We should consider moving the update priority assignment in `beginWork` out of the common path and into each branch, to avoid similar bugs in the future.

view details

Dan Abramov

commit sha 8b596e00a4fffd6bb5e6990f4dd59e40e80a5ea0

Remove unused arguments in the reconciler (#18092)

view details

Sebastian Markbåge

commit sha 65bbda7f169394005252b46a5992ece5a2ffadad

Rename Chunks API to Blocks (#18086) Sounds like this is the name we're going with. This also helps us distinguish it from other "chunking" implementation details.

view details

push time in 5 days

push eventtrueadm/react

Dominic Gannaway

commit sha cc64d1bd752da5fdd491c8cc93c5706dd10cde92

Add test cases and revise traversal Fix Refactor twak Rename

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha d358b2d7afa077693bad9db2efc928c0ef9ae08c

Add test cases and revise traversal Fix Refactor twak

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha 2734e9fd5c3676e7e1d5661c84e960316a886e0f

Add test cases and revise traversal Fix Refactor

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha 4bd5fd20beeaa5eff4324dd68095b83eada9db53

Add test cases and revise traversal Fix

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha baa9d231e1ce7983dfdf914c1ca38dced6bf49b2

Add test cases and revise traversal

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha 8582b99d49169e317040f7ef9ad13ba5d51f8975

Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI FXI

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha 77859e1d48c9053f4eab7741ce3b4bd8227451a3

Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes FXI

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha e51c46e7d8b7156aba18666bd78bb5bf7bae276a

Add Modern Event System fork Fix FIX FIX Refine comment Support handling of listening to comment nodes Update error codes

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha e1e268d37052dd593b2e375e7f3ee089e4749b48

Support handling of listening to comment nodes

view details

push time in 6 days

push eventtrueadm/react

Dominic Gannaway

commit sha 7ee484b3ccf91a99d0468e225f84f823e81c54b2

Refine comment

view details

push time in 6 days

Pull request review commentfacebook/react

Add modern event plugin system fork that uses roots

 describe('ReactDOMEventListener', () => {         // The first call schedules a render of '1' into the 'Child'.         // However, we're batching so it isn't flushed yet.         expect(mock.mock.calls[0][0]).toBe('Child');-        // The first call schedules a render of '2' into the 'Child'.-        // We're still batching so it isn't flushed yet either.-        expect(mock.mock.calls[1][0]).toBe('Child');+        if (ReactFeatureFlags.enableModernEventSystem) {+          // As we have two roots, it means we have two event listeners.+          // This also means we enter the event batching phase twice,+          // flushing the child to be 1.+          // TODO: can we improve on this? microtasks seem to problematic+          // (I tried that). We don't have any good way of knowing if+          // another event will occur because another event handler+          // might invoke stopPropagation() along the way. This means+          // we over-flush.

I spoke in depth to @sebmarkbage last nigtht about this and we settled on the fact we'll just have to put up with over-flushing till we can get around to tuning this in the future with some capability in the scheduler (which might require platform features being added).

Batched mode is still definitely a thing in concurrent mode though, and it's still something you'd ideally like to be automatic for the user when calling events.

trueadm

comment created time in 6 days

PR opened facebook/react

Reviewers
Add modern event plugin system fork that uses roots

This PR adds a fork of the existing event plugin system. The fork is behind the flag enableModernEventSystem. The modern event system differs from the legacy event system in that it attaches events to the root DOM node rather than the document DOM node.

To make this alteration simpler, there is a fork of the different event systems. The old legacy event system that attaches event listeners to the document is in its own module. The modern event system has its own module and the code paths for these should clearly be defined through the codebase. Switching the enableModernEventSystem to true should yield the same results in the tests (they should all pass as expected).

The key differences are the underlying implementation, which is reflected in some of the tests that have been forked/changed/skipped to respect the difference in event system implementation. Tests that previously passed becuase of the expectation that React listened to all events across the document no longer hold true, thus why they've been forked.

I'll be doing extensive testing with this build internally to find any issues that might arise. Going forward, I plan on making the flag GKed internally, so we can further find and squash issues as they arise.

+1032 -143

0 comment

9 changed files

pr created time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 121ad878324f0452058733900a75982400e3c6f4

Add Modern Event System fork Fix FIX FIX

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha e3c6b932a39325537da727e0db1ab85810f48383

Add Modern Event System fork Fix FIX

view details

push time in 7 days

push eventtrueadm/react

Brian Vaughn

commit sha 7e770dae93e1a934b905d8678c7ce368ed86ef0b

Profiler tooltip tweaks (#18082) * Moved Profiler views into Profiler folder * Tweaked Profiler tooltip CSS styles * Tweaked Tooltip positioning code

view details

Eli White

commit sha 085d02133e9e3b24ae548d89e4003899bf85022c

[Native] Migrate focus/blur to call TextInputState with the host component (#18068)

view details

Andrew Clark

commit sha ea6ed3dbbd32515e2d4d9783c358beceeadd4b1d

Warn for update on different component in render (#17099) This warning already exists for class components, but not for functions. It does not apply to render phase updates to the same component, which have special semantics that we do support.

view details

Dominic Gannaway

commit sha 3f85d53ca6f2af8a711daae6322e6bdda862f660

Further pre-requisite changes to plugin event system (#18083)

view details

Dominic Gannaway

commit sha a84629f68ed4be7330f466727102df0a7e2c7f9d

Add Modern Event System fork Fix

view details

push time in 7 days

push eventtrueadm/react

Brian Vaughn

commit sha 7e770dae93e1a934b905d8678c7ce368ed86ef0b

Profiler tooltip tweaks (#18082) * Moved Profiler views into Profiler folder * Tweaked Profiler tooltip CSS styles * Tweaked Tooltip positioning code

view details

Eli White

commit sha 085d02133e9e3b24ae548d89e4003899bf85022c

[Native] Migrate focus/blur to call TextInputState with the host component (#18068)

view details

Andrew Clark

commit sha ea6ed3dbbd32515e2d4d9783c358beceeadd4b1d

Warn for update on different component in render (#17099) This warning already exists for class components, but not for functions. It does not apply to render phase updates to the same component, which have special semantics that we do support.

view details

Dominic Gannaway

commit sha 3f85d53ca6f2af8a711daae6322e6bdda862f660

Further pre-requisite changes to plugin event system (#18083)

view details

push time in 7 days

push eventfacebook/react

Dominic Gannaway

commit sha 3f85d53ca6f2af8a711daae6322e6bdda862f660

Further pre-requisite changes to plugin event system (#18083)

view details

push time in 7 days

delete branch trueadm/react

delete branch : react-roots-phase3

delete time in 7 days

PR merged facebook/react

Reviewers
Further pre-requisite changes to plugin event system CLA Signed React Core Team

This PR contains the following changes:

  • Adds some changes requested in comments from follow ups in https://github.com/facebook/react/pull/18075, specifcally repositioning the argument container.
  • Adds support for SelectEventPlugin.js to take an eventual container
  • Rename dispatchEventForPluginEventSystem to dispatchEventForLegacyPluginEventSystem
  • Tweaked SyntheticEvent types
  • Refactored some logic in event replaying to allow for both container and document to be passed through, enabling further code paths for the modern event system
+48 -39

3 comments

7 changed files

trueadm

pr closed time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 8405460eb8ff73cba520e6f2b765c756495f54d7

Further pre-requisite changes to plugin event system fix fix Fix Fix

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 647f623036f1a13519643f8b3a354104d40b8550

Further pre-requisite changes to plugin event system fix fix Fix

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha d4876e62ae0aac75fb49012b8f68b80475f8949b

Further pre-requisite changes to plugin event system fix fix

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 6c8bbdf4b2a8286e70f5310158adceb7c3327d0c

Further pre-requisite changes to plugin event system fix

view details

push time in 7 days

PR opened facebook/react

Reviewers
Further pre-requisite changes to plugin event system

This PR contains the following changes:

  • Adds some changes requested in comments from follow ups in https://github.com/facebook/react/pull/18075
  • Adds support for SelectEventPlugin.js to take an eventual container
  • Rename dispatchEventFoPluginEventSystem to dispatchEventForLegacyPluginEventSystem
+40 -30

0 comment

4 changed files

pr created time in 7 days

create barnchtrueadm/react

branch : react-roots-phase3

created branch time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha f15b525422bd3799ba4ae38bae15f4dff657020f

Add Modern Event System fork Fix

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 1dcdf45a2a33b4838537179222b26e7c3b8f8f49

Add Modern Event System fork

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 1c33707960bee57c2df40b7442fd139644277174

WIP WIP Fix WIP WIP WIP FIX Fix WIP Fix events

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha d85f57d285346141190af0f576df4472c73d1a1d

WIP WIP Fix WIP WIP WIP FIX Fix WIP

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha b6c94d636cb33a265671b864b97870da38d97207

Add guard around FocusWithin responder root events (#18080)

view details

Dominic Gannaway

commit sha 480e2b8de94c9df01eecd7b97d1ae9e7080ea310

WIP WIP Fix WIP WIP WIP FIX Fix

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha b6c94d636cb33a265671b864b97870da38d97207

Add guard around FocusWithin responder root events (#18080)

view details

push time in 7 days

Pull request review commentfacebook/react

Add container to event listener signature

 export function attemptToDispatchEvent(   topLevelType: DOMTopLevelEventType,   eventSystemFlags: EventSystemFlags,   nativeEvent: AnyNativeEvent,+  container: Document | Element | Node,

Flow can catch it, and it did, because I've hacked this file abount so much in the last few days and it's saved my ass a bunch :)

I can refine the order in a follow up though, you're right, consistency helps here.

trueadm

comment created time in 7 days

delete branch trueadm/react

delete branch : validate-blur

delete time in 7 days

Pull request review commentfacebook/react

Add guard around FocusWithin responder root events

 type FocusState = {   isFocused: boolean,   isFocusVisible: boolean,   pointerType: PointerType,-  ...+  addedRootEvents?: boolean,

We don't use it in the Focus responder, only the FocusWithin responder. I didn't want to add more code to the state of that responder, so I opted to keep it optional for now. Breaking all the call-sites down by alternative state would make this a far more complex PR.

trueadm

comment created time in 7 days

PR opened facebook/react

Reviewers
Add guard around FocusWithin responder root events

We've run into an interesting problem internally that is likely due to a strange set of events from the recent onBeforeBlur change, causing addRootEventTypes to try and add the same event before removing it. This change should guard the change to prevent the invariant from occuring in these cases.

I'll try and make a repro test tomorrow and see if there's an alternative way to fix this.

+10 -3

0 comment

1 changed file

pr created time in 7 days

create barnchtrueadm/react

branch : validate-blur

created branch time in 7 days

push eventtrueadm/react

Sunil Pai

commit sha a8643e905e39f041cda80b498dc06018b27f6554

add no-restricted-globals to eslint config (#18076) Our current lint config assumes a browser environment, which means it won't warn you if you use a variable like `name` without declaring it earlier. This imports the same list as the one used by create-react-app, and enables it against our codebase.

view details

Dominic Gannaway

commit sha 2512c309e34f0207d29c19392d144edab719f347

Remove Flare bundles from build (#18077)

view details

Moji Izadmehr

commit sha 44e5f5e6451cf192af5dee3aa1f3a87119fc231e

Add fiber summary tooltip to devtools profiling (#18048) * Add tooltip component * Separate logic of ProfilerWhatChanged to a component * Add hovered Fiber info tooltip component * Add flame graph chart tooltip * Add commit ranked list tooltip * Fix flow issues * Minor improvement in filter * Fix flickering issue * Resolved issues on useCallbacks and mouse event listeners * Fix lints * Remove unnecessary useCallback

view details

Dan Abramov

commit sha a12dd52a4a5f19d990694810db86cc30e98308ae

Don't build some packages for WWW (#18078)

view details

Dominic Gannaway

commit sha 1000f6135efba4f8d8ebffedeb7b472f532a8475

Add container to event listener signature (#18075)

view details

Dominic Gannaway

commit sha f697d24e18af78f4c733e4de842b7566c08188be

WIP WIP Fix WIP WIP WIP FIX

view details

push time in 7 days

push eventtrueadm/react

Sunil Pai

commit sha a8643e905e39f041cda80b498dc06018b27f6554

add no-restricted-globals to eslint config (#18076) Our current lint config assumes a browser environment, which means it won't warn you if you use a variable like `name` without declaring it earlier. This imports the same list as the one used by create-react-app, and enables it against our codebase.

view details

Dominic Gannaway

commit sha 2512c309e34f0207d29c19392d144edab719f347

Remove Flare bundles from build (#18077)

view details

Moji Izadmehr

commit sha 44e5f5e6451cf192af5dee3aa1f3a87119fc231e

Add fiber summary tooltip to devtools profiling (#18048) * Add tooltip component * Separate logic of ProfilerWhatChanged to a component * Add hovered Fiber info tooltip component * Add flame graph chart tooltip * Add commit ranked list tooltip * Fix flow issues * Minor improvement in filter * Fix flickering issue * Resolved issues on useCallbacks and mouse event listeners * Fix lints * Remove unnecessary useCallback

view details

Dan Abramov

commit sha a12dd52a4a5f19d990694810db86cc30e98308ae

Don't build some packages for WWW (#18078)

view details

Dominic Gannaway

commit sha 1000f6135efba4f8d8ebffedeb7b472f532a8475

Add container to event listener signature (#18075)

view details

push time in 7 days

delete branch trueadm/react

delete branch : roots-phase2

delete time in 7 days

push eventfacebook/react

Dominic Gannaway

commit sha 1000f6135efba4f8d8ebffedeb7b472f532a8475

Add container to event listener signature (#18075)

view details

push time in 7 days

PR merged facebook/react

Reviewers
Add container to event listener signature CLA Signed React Core Team

Note: This PR is a pre-requisite for the modern root event system.

For the new event system that uses root containers to register nodes. For this to work, we need a sane way of knowing what the container is, so we can properly find ancestors.

We could use nativeEvent.currentTarget but that seems fragile, as the currentTarget can change when the event bubbles, or might not be there if we bypass native events entirely (if we ever decided to add onBeforeBlur to the plugin event system).

Instead, we can bind the container to the dispatch function, as we do with other arguments. This then allows us to know the container correctly in all cases. Furthermore, we pass this to the event replaying logic so it can properly replay the event with the correct container.

+68 -15

3 comments

5 changed files

trueadm

pr closed time in 7 days

push eventfacebook/react

Dominic Gannaway

commit sha 2512c309e34f0207d29c19392d144edab719f347

Remove Flare bundles from build (#18077)

view details

push time in 7 days

delete branch trueadm/react

delete branch : remove-responders

delete time in 7 days

PR merged facebook/react

Reviewers
Remove Flare bundles from build CLA Signed React Core Team

These Flare responders are not used internally anywhere, so we should remove them both from the build and internally.

+0 -49

5 comments

1 changed file

trueadm

pr closed time in 7 days

pull request commentfacebook/react

Remove Flare bundles from build

@gaearon For now we can keep the code as it's handy for catching any possible accidental regressions to Flare, whilst I change parts of the event system via tests.

trueadm

comment created time in 7 days

PR opened facebook/react

Reviewers
Remove Flare bundles from build

These Flare responders are not used internally anywhere, so we should remove them both from the build and internally.

+0 -49

0 comment

1 changed file

pr created time in 7 days

create barnchtrueadm/react

branch : remove-responders

created branch time in 7 days

push eventtrueadm/react

Haseeb Furkhan Mohammed

commit sha d5ddc16a3398c33d70489cee87f5176c85f3c9f5

React developer tools extension for Microsoft Edge (#18041) * Port Chrome extension to Microsoft Edge

view details

Brian Vaughn

commit sha 90be006da8e231279151e7b1518bb64c62e26851

Updated Yarn lockfile

view details

Ryota Murakami

commit sha 48c4867d745bbf91ae73892545960c0979c2dbf7

Update issue templates to directly link to relevant sources (#18039) GitHub supports linking to off-site sources for certain types of issue.

view details

Dominic Gannaway

commit sha 1a6d8179b6dd427fdf7ee50d5ac45ae5a40979eb

[react-interactions] Ensure onBeforeBlur fires for hideInstance (#18064)

view details

Andrew Clark

commit sha 56d8a73affad624ee4d48f1685e0a92adce0bd9c

[www] Disable Scheduler `timeout` w/ dynamic flag (#18069) Before attempting to land an expiration times refactor, I want to see if this particular change will impact performance (either positively or negatively). I will test this with a GK.

view details

Brian Vaughn

commit sha 691096c95d1019f57e0da2c9a060c5e094b7c586

Split recent passive effects changes into 2 flags (#18030) * Split recent passive effects changes into 2 flags Separate flags can now be used to opt passive effects into: 1) Deferring destroy functions on unmount to subsequent passive effects flush 2) Running all destroy functions (for all fibers) before create functions This allows us to test the less risky feature (2) separately from the more risky one. * deferPassiveEffectCleanupDuringUnmount is ignored unless runAllPassiveEffectDestroysBeforeCreates is true

view details

Brian Vaughn

commit sha 14afeb1033e25942e63787750388972916f20a39

Added missing feature flag

view details

Andrew Clark

commit sha 4d9f8500651c5d1e19d8ec9a2359d5476a53814b

Re-throw errors thrown by the renderer at the root in the complete phase (#18029) * Re-throw errors thrown by the renderer at the root React treats errors thrown at the root as a fatal because there's no parent component that can capture it. (This is distinct from an "uncaught error" that isn't wrapped in an error boundary, because in that case we can fall back to deleting the whole tree -- not great, but at least the error is contained to a single root, and React is left in a consistent state.) It turns out we didn't have a test case for this path. The only way it can happen is if the renderer's host config throws. We had similar test cases for host components, but none for the host root. This adds a new test case and fixes a bug where React would keep retrying the root because the `workInProgress` pointer was not advanced to the next fiber. (Which in this case is `null`, since it's the root.) We could consider in the future trying to gracefully exit from certain types of root errors without leaving React in an inconsistent state. For example, we should be able to gracefully exit from errors thrown in the begin phase. For now, I'm treating it like an internal invariant and immediately exiting. * Add comment

view details

Dominic Gannaway

commit sha 4912ba31e3dcc8d08f5b16ae38b38d74da85ea21

Add modern event system flag + rename legacy plugin module (#18073)

view details

Dominic Gannaway

commit sha 7f373d10b1813934720a2c990a1afdbe92e5923d

WIP WIP Fix WIP WIP WIP FIX

view details

push time in 7 days

push eventtrueadm/react

Haseeb Furkhan Mohammed

commit sha d5ddc16a3398c33d70489cee87f5176c85f3c9f5

React developer tools extension for Microsoft Edge (#18041) * Port Chrome extension to Microsoft Edge

view details

Brian Vaughn

commit sha 90be006da8e231279151e7b1518bb64c62e26851

Updated Yarn lockfile

view details

Ryota Murakami

commit sha 48c4867d745bbf91ae73892545960c0979c2dbf7

Update issue templates to directly link to relevant sources (#18039) GitHub supports linking to off-site sources for certain types of issue.

view details

Dominic Gannaway

commit sha 1a6d8179b6dd427fdf7ee50d5ac45ae5a40979eb

[react-interactions] Ensure onBeforeBlur fires for hideInstance (#18064)

view details

Andrew Clark

commit sha 56d8a73affad624ee4d48f1685e0a92adce0bd9c

[www] Disable Scheduler `timeout` w/ dynamic flag (#18069) Before attempting to land an expiration times refactor, I want to see if this particular change will impact performance (either positively or negatively). I will test this with a GK.

view details

Brian Vaughn

commit sha 691096c95d1019f57e0da2c9a060c5e094b7c586

Split recent passive effects changes into 2 flags (#18030) * Split recent passive effects changes into 2 flags Separate flags can now be used to opt passive effects into: 1) Deferring destroy functions on unmount to subsequent passive effects flush 2) Running all destroy functions (for all fibers) before create functions This allows us to test the less risky feature (2) separately from the more risky one. * deferPassiveEffectCleanupDuringUnmount is ignored unless runAllPassiveEffectDestroysBeforeCreates is true

view details

Brian Vaughn

commit sha 14afeb1033e25942e63787750388972916f20a39

Added missing feature flag

view details

Andrew Clark

commit sha 4d9f8500651c5d1e19d8ec9a2359d5476a53814b

Re-throw errors thrown by the renderer at the root in the complete phase (#18029) * Re-throw errors thrown by the renderer at the root React treats errors thrown at the root as a fatal because there's no parent component that can capture it. (This is distinct from an "uncaught error" that isn't wrapped in an error boundary, because in that case we can fall back to deleting the whole tree -- not great, but at least the error is contained to a single root, and React is left in a consistent state.) It turns out we didn't have a test case for this path. The only way it can happen is if the renderer's host config throws. We had similar test cases for host components, but none for the host root. This adds a new test case and fixes a bug where React would keep retrying the root because the `workInProgress` pointer was not advanced to the next fiber. (Which in this case is `null`, since it's the root.) We could consider in the future trying to gracefully exit from certain types of root errors without leaving React in an inconsistent state. For example, we should be able to gracefully exit from errors thrown in the begin phase. For now, I'm treating it like an internal invariant and immediately exiting. * Add comment

view details

Dominic Gannaway

commit sha 4912ba31e3dcc8d08f5b16ae38b38d74da85ea21

Add modern event system flag + rename legacy plugin module (#18073)

view details

push time in 7 days

delete branch trueadm/react

delete branch : roots-phase1

delete time in 7 days

push eventfacebook/react

Dominic Gannaway

commit sha 4912ba31e3dcc8d08f5b16ae38b38d74da85ea21

Add modern event system flag + rename legacy plugin module (#18073)

view details

push time in 7 days

PR merged facebook/react

Reviewers
Add modern event system flag + rename legacy plugin module CLA Signed React Core Team

This PR does four things:

  • Cleans up ReactBrowserEventEmitter-test.internal.js a bit
  • Re-labels listenToEvent to legacyListenToEvent
  • Renames the module DOMEventPluginSystem to DOMLegacyEventPluginSystem
  • Adds the enableModernEventSystem flag
+26 -14

3 comments

15 changed files

trueadm

pr closed time in 7 days

Pull request review commentfacebook/react

Add modern event system flag + rename legacy plugin module

 describe('ReactBrowserEventEmitter', () => {     React = require('react');     ReactDOM = require('react-dom');     ReactDOMComponentTree = require('../client/ReactDOMComponentTree');-    DOMEventPluginSystem = require('../events/DOMEventPluginSystem');+    listenToEvent = require('../events/DOMLegacyEventPluginSystem')

@threepointone The ReactBrowserEventEmitter-test.internal.js change is because I fork that file in the follow up that uses the flag. Also, I'd rather add the flag in this PR as it feels more churny having another PR that adds it but doesn't use it (lots of file changes makes the diff harder to review).

trueadm

comment created time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 539baead25edad416a0771ffef471aa1012df1d8

Add container to event listener signature WIP

view details

push time in 7 days

PR opened facebook/react

Reviewers
Add container to event listener signature

For the new event system that uses root containers to register nodes, we need a sane way of knowing what the container is, so we can properly find ancestors. We could use nativeEvent.currentTarget but that seems fragile, as the currentTarget can change when the event finishes, or might not be there if we bypass native events entirely (if we ever decided to add onBeforeBlur to the plugin event system).

This is one of the many pre-requisites for the modern root event system.

+67 -14

0 comment

4 changed files

pr created time in 7 days

create barnchtrueadm/react

branch : roots-phase2

created branch time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha e408749c31fd6242cfc93c6166de36d58042b5e4

Add modern event system flag + rename legacy plugin module Add module

view details

push time in 7 days

PR opened facebook/react

Reviewers
Add modern event system flag + rename legacy plugin module

This PR does three things:

  • Cleans up ReactBrowserEventEmitter-test.internal.js a bit
  • Re-labels listenToEvent to legacyListenToEvent
  • Renames the module DOMEventPluginSystem to DOMLegacyEventPluginSystem
  • Adds the enableModernEventSystem flag
+25 -394

0 comment

15 changed files

pr created time in 7 days

create barnchtrueadm/react

branch : roots-phase1

created branch time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha e3be7c6c09e6f4e814da07bb4caf06b46638f2a2

WIP WIP Fix WIP WIP WIP

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha ff25f4c682d823c3b6f7e2272bcb513a0b3ef683

WIP WIP Fix WIP WIP

view details

push time in 7 days

push eventtrueadm/react

Dominic Gannaway

commit sha 59e15ec6c1541497422f45a2e85264cabcbffca8

WIP WIP Fix WIP

view details

push time in 8 days

push eventtrueadm/react

Dominic Gannaway

commit sha 0034077e036086a178d0fcfa0daf6e3f6d42d162

WIP WIP Fix

view details

push time in 8 days

push eventtrueadm/react

Dominic Gannaway

commit sha a20fcd850d54aa424db31bc91f0b59ce382c5a6d

WIP WIP

view details

push time in 8 days

push eventfacebook/react

Dominic Gannaway

commit sha 1a6d8179b6dd427fdf7ee50d5ac45ae5a40979eb

[react-interactions] Ensure onBeforeBlur fires for hideInstance (#18064)

view details

push time in 8 days

delete branch trueadm/react

delete branch : onbeforeblur-hideinstance

delete time in 8 days

PR merged facebook/react

Reviewers
[react-interactions] Ensure onBeforeBlur fires for hideInstance CLA Signed React Core Team

As part of the React Flare system, we have the notion of a React specific event called onBeforeBlur. This is meant to triggered just before a managed node of React gets removed or hidden from the UI. We already support the case where this fires before we removed the node, but we didn't have a codepath or support for when this can occur during Suspense. During Suspense, we display: none the content when showing the fallback, which means that the React Flare focus systems fail to know of the fact that blur is about to be triggered, which is required to properly handle focus management logic. This PR adds that code path in, so onBeforeBlur correctly fires during Suspense too.

On a separate node, we should move this logic and other existing onBeforeBlur logic out of the Flare flag sometime and make it its own core feature at some point.

+96 -10

3 comments

2 changed files

trueadm

pr closed time in 8 days

Pull request review commentfacebook/react

[react-interactions] Ensure onBeforeBlur fires for hideInstance

 describe.each(table)('FocusWithin responder', hasPointerEvents => {         expect.objectContaining({isTargetAttached: false}),       );     });++    it.experimental(

Yeah, I thought that. It's best if this code moved out of Flare soon.

trueadm

comment created time in 8 days

push eventtrueadm/react

Dominic Gannaway

commit sha c13297b243a6664c188b766f712d18c2f595c9b7

fix typo

view details

push time in 8 days

create barnchtrueadm/react

branch : react-events-roots

created branch time in 8 days

Pull request review commentfacebook/react

[react-interactions] Ensure onBeforeBlur fires for hideInstance

 export function clearSuspenseBoundaryFromContainer(   retryIfBlockedOn(container); } +function instanceContainsElem(instance: Instance, element: HTMLElement) {+  let fiber = getClosestInstanceFromNode(element);+  while (fiber !== null) {+    if (fiber.tag === HostComponent && fiber.stateNode === element) {+      return true;+    }+    fiber = fiber.return;+  }+  return false;+}+ export function hideInstance(instance: Instance): void {+  // Ensure we trigger `onBeforeBlur` if the active focused elment+  // is ether the instance of a child of the instance. We need+  // to traverse the Fiber tree here rather than use node.contains()+  // as the child node might be inside a Portal.+  if (enableDeprecatedFlareAPI && selectionInformation) {+    const focusedElem = selectionInformation.focusedElem;+    if (focusedElem !== null && instanceContainsElem(instance, focusedElem)) {+      dispatchBeforeDetachedBlur(((focusedElem: any): HTMLElement));

We will eventually.

trueadm

comment created time in 8 days

more