Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react-interactions] Remove deprecated Scope APIs + update Focus components #17859

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jan 17, 2020

This PR removes the deprecated Scope APIs that handled traversal. These APIs are no longer used internally, and instead now use React Context and the scope.getChildContextValues() API exclusively.

Unfortunately, I've decided to also remove the accessibility directory from the React repository for now, which includes the accessibility components. Many of the tests/docs/components were out of date compared to their latest versions, which were migrated to our internal FB repository last year. Keeping the components in sync proved to be very time-consuming because of several differences. Notably, our internal Jest tests for these components made usage of our internal testing infrastructure which is not available in open-source right now, plus there were usages of other bits of Facebook IP that I'd have to remove before syncing back over.

A more effecient long-term strategy will be to work with the partner teams involved and come up with a plan that involves moving these components back into open-source, probably under a different repository maybe, or maybe a different project relating to Facebook's accessibility work.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 17, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f0c9bac:

Sandbox Source
sad-water-tk31w Configuration

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 17, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cb9da2a:

Sandbox Source
icy-firefly-05yp9 Configuration

@sizebot
Copy link

sizebot commented Jan 17, 2020

Details of bundled changes.

Comparing: b6173e6...cb9da2a

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.3% -0.2% 617.37 KB 615.33 KB 131.43 KB 131.17 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 71.5 KB 71.5 KB 21.91 KB 21.9 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 37.83 KB 37.83 KB 9.81 KB 9.8 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.1% 11.66 KB 11.66 KB 3.6 KB 3.6 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 32.37 KB 32.37 KB 8.5 KB 8.49 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.1% 11.79 KB 11.79 KB 3.71 KB 3.71 KB NODE_PROD
react-test-renderer.development.js -0.3% -0.2% 612.63 KB 610.59 KB 130.25 KB 129.99 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 71.19 KB 71.19 KB 21.53 KB 21.52 KB NODE_PROD
ReactTestRenderer-dev.js -0.3% -0.2% 628.48 KB 626.4 KB 131.05 KB 130.8 KB FB_WWW_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.3% -0.2% 745.48 KB 743.4 KB 157.87 KB 157.62 KB RN_OSS_DEV
ReactFabric-dev.js -0.3% -0.2% 736.1 KB 734.02 KB 155.66 KB 155.41 KB RN_OSS_DEV
ReactNativeRenderer-dev.js -0.3% -0.2% 745.66 KB 743.58 KB 157.97 KB 157.71 KB RN_FB_DEV
ReactFabric-profiling.js 0.0% -0.0% 276.96 KB 276.96 KB 47.88 KB 47.88 KB RN_OSS_PROFILING
ReactNativeRenderer-prod.js 0.0% -0.0% 273.4 KB 273.4 KB 47.01 KB 47.01 KB RN_OSS_PROD
ReactFabric-dev.js -0.3% -0.2% 736.28 KB 734.2 KB 155.75 KB 155.49 KB RN_FB_DEV
ReactNativeRenderer-profiling.js 0.0% -0.0% 284.58 KB 284.58 KB 49.16 KB 49.16 KB RN_OSS_PROFILING
ReactFabric-prod.js 0.0% -0.0% 266.18 KB 266.18 KB 45.83 KB 45.83 KB RN_FB_PROD
ReactFabric-profiling.js 0.0% -0.0% 277.3 KB 277.3 KB 47.94 KB 47.94 KB RN_FB_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js -0.3% -0.2% 616.88 KB 614.81 KB 128.53 KB 128.27 KB FB_WWW_DEV
ReactART-prod.js -0.7% -0.6% 237.24 KB 235.52 KB 40.05 KB 39.82 KB FB_WWW_PROD
react-art.development.js -0.3% -0.2% 672.34 KB 670.29 KB 145.8 KB 145.55 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 106.83 KB 106.83 KB 32.5 KB 32.49 KB UMD_PROD
react-art.development.js -0.3% -0.2% 603.02 KB 600.97 KB 128.4 KB 128.15 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 71.78 KB 71.78 KB 21.64 KB 21.64 KB NODE_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% -0.0% 123.16 KB 123.16 KB 38.74 KB 38.74 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% -0.0% 137.73 KB 137.73 KB 36.6 KB 36.6 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.47 KB 20.47 KB 7.5 KB 7.5 KB UMD_PROD
react-dom-test-utils.development.js 0.0% -0.0% 54.5 KB 54.5 KB 15.32 KB 15.31 KB UMD_DEV
ReactDOMServer-prod.js 0.0% -0.0% 49.02 KB 49.02 KB 11.19 KB 11.19 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.88 KB 3.88 KB 1.55 KB 1.55 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 11.18 KB 11.18 KB 4.15 KB 4.15 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.21 KB 1.21 KB 711 B 709 B UMD_PROD
react-dom-test-utils.development.js 0.0% -0.0% 52.77 KB 52.77 KB 14.99 KB 14.99 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 3.71 KB 3.71 KB 1.5 KB 1.5 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.95 KB 10.95 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.05 KB 1.05 KB 642 B 640 B NODE_PROD
react-dom.development.js -0.2% -0.1% 951.01 KB 948.97 KB 214.93 KB 214.68 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.18 KB 119.18 KB 38.29 KB 38.29 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 122.92 KB 122.92 KB 39.52 KB 39.51 KB UMD_PROFILING
react-dom.development.js -0.2% -0.1% 945.07 KB 943.03 KB 213.22 KB 212.96 KB NODE_DEV
react-dom-server.node.development.js 0.0% -0.0% 134.77 KB 134.77 KB 35.81 KB 35.81 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 119.28 KB 119.28 KB 37.61 KB 37.61 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% -0.0% 20.8 KB 20.8 KB 7.63 KB 7.63 KB NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 133.66 KB 133.66 KB 35.58 KB 35.58 KB NODE_DEV
ReactDOM-dev.js -0.2% -0.1% 972.9 KB 970.82 KB 216.19 KB 215.93 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.39 KB 20.39 KB 7.47 KB 7.47 KB NODE_PROD
ReactDOM-prod.js -0.4% -0.3% 394.67 KB 392.95 KB 72.22 KB 71.97 KB FB_WWW_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.91 KB 60.91 KB 16.07 KB 16.07 KB UMD_DEV
ReactDOM-profiling.js -0.4% -0.3% 405.96 KB 404.25 KB 74.37 KB 74.12 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.23 KB 10.23 KB 3.48 KB 3.47 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.61 KB 60.61 KB 16 KB 15.99 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.2% 4.42 KB 4.42 KB 1.65 KB 1.65 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 9.97 KB 9.97 KB 3.37 KB 3.37 KB NODE_PROD
ReactDOMServer-dev.js 0.0% -0.0% 139.4 KB 139.4 KB 35.43 KB 35.43 KB FB_WWW_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.3% 1.21 KB 1.21 KB 698 B 696 B NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-persistent.development.js -0.3% -0.2% 601.47 KB 599.42 KB 126.46 KB 126.2 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% -0.0% 19.27 KB 19.27 KB 6.33 KB 6.33 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% -0.0% 72.09 KB 72.09 KB 21.24 KB 21.24 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.2% 2.86 KB 2.86 KB 1.24 KB 1.24 KB NODE_PROD
react-reconciler.development.js -0.3% -0.2% 604.02 KB 601.97 KB 127.56 KB 127.31 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 74.79 KB 74.79 KB 21.91 KB 21.91 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against cb9da2a

@sizebot
Copy link

sizebot commented Jan 17, 2020

Details of bundled changes.

Comparing: b6173e6...cb9da2a

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-dev.js -0.3% -0.2% 736.09 KB 734.01 KB 155.66 KB 155.4 KB RN_OSS_DEV
ReactNativeRenderer-dev.js -0.3% -0.2% 745.47 KB 743.39 KB 157.87 KB 157.61 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% -0.0% 276.95 KB 276.95 KB 47.87 KB 47.87 KB RN_OSS_PROFILING
ReactNativeRenderer-prod.js 0.0% -0.0% 273.39 KB 273.39 KB 47.01 KB 47 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% -0.0% 284.56 KB 284.56 KB 49.15 KB 49.15 KB RN_OSS_PROFILING

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-persistent.production.min.js 0.0% -0.0% 72.08 KB 72.08 KB 21.23 KB 21.23 KB NODE_PROD
react-reconciler.development.js -0.3% -0.2% 604.01 KB 601.96 KB 127.56 KB 127.31 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 72.06 KB 72.06 KB 21.23 KB 21.23 KB NODE_PROD
react-reconciler-reflection.development.js 0.0% -0.0% 19.25 KB 19.25 KB 6.33 KB 6.33 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.2% 2.85 KB 2.85 KB 1.24 KB 1.23 KB NODE_PROD
react-reconciler-persistent.development.js -0.3% -0.2% 601.45 KB 599.41 KB 126.45 KB 126.19 KB NODE_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.94 KB 19.94 KB 7.4 KB 7.39 KB NODE_PROD
react-dom-test-utils.development.js 0.0% -0.0% 52.76 KB 52.76 KB 14.99 KB 14.99 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 115.35 KB 115.35 KB 37.18 KB 37.17 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.59 KB 60.59 KB 15.99 KB 15.99 KB NODE_DEV
react-dom.profiling.min.js 0.0% -0.0% 118.98 KB 118.98 KB 38.36 KB 38.36 KB UMD_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 9.96 KB 9.96 KB 3.37 KB 3.36 KB NODE_PROD
react-dom.development.js -0.2% -0.1% 945.05 KB 943.01 KB 213.19 KB 212.94 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 115.41 KB 115.41 KB 36.54 KB 36.54 KB NODE_PROD
react-dom.profiling.min.js 0.0% -0.0% 119.18 KB 119.18 KB 37.66 KB 37.66 KB NODE_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 3.87 KB 3.87 KB 1.54 KB 1.54 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.2 KB 1.2 KB 703 B 701 B UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 137.71 KB 137.71 KB 36.6 KB 36.6 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.01 KB 20.01 KB 7.41 KB 7.41 KB UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 3.7 KB 3.7 KB 1.5 KB 1.49 KB NODE_DEV
react-dom-test-utils.development.js 0.0% -0.0% 54.48 KB 54.48 KB 15.31 KB 15.31 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.04 KB 1.04 KB 634 B 633 B NODE_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 11.17 KB 11.17 KB 4.14 KB 4.14 KB UMD_PROD
react-dom-server.browser.development.js 0.0% -0.0% 133.64 KB 133.64 KB 35.58 KB 35.57 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.94 KB 10.94 KB 4.08 KB 4.08 KB NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.2% 4.4 KB 4.4 KB 1.64 KB 1.64 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.89 KB 60.89 KB 16.07 KB 16.06 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.2 KB 1.2 KB 689 B 688 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.22 KB 10.22 KB 3.47 KB 3.46 KB UMD_PROD
react-dom-server.node.development.js 0.0% -0.0% 134.75 KB 134.75 KB 35.81 KB 35.81 KB NODE_DEV
react-dom.development.js -0.2% -0.1% 950.99 KB 948.95 KB 214.91 KB 214.66 KB UMD_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 20.34 KB 20.34 KB 7.55 KB 7.55 KB NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.production.min.js 0.0% -0.0% 104.33 KB 104.33 KB 31.8 KB 31.79 KB UMD_PROD
react-art.development.js -0.3% -0.2% 672.31 KB 670.27 KB 145.8 KB 145.55 KB UMD_DEV
react-art.development.js -0.3% -0.2% 602.99 KB 600.95 KB 128.39 KB 128.14 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 69.33 KB 69.33 KB 20.96 KB 20.96 KB NODE_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer-shallow.development.js 0.0% -0.0% 37.81 KB 37.81 KB 9.8 KB 9.8 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.64 KB 11.64 KB 3.59 KB 3.59 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 32.35 KB 32.35 KB 8.49 KB 8.49 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.1% 11.78 KB 11.78 KB 3.7 KB 3.7 KB NODE_PROD
react-test-renderer.development.js -0.3% -0.2% 617.34 KB 615.3 KB 131.42 KB 131.16 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 71.48 KB 71.48 KB 21.89 KB 21.89 KB UMD_PROD
react-test-renderer.development.js -0.3% -0.2% 612.61 KB 610.57 KB 130.24 KB 129.98 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 71.17 KB 71.17 KB 21.51 KB 21.5 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against cb9da2a

@trueadm trueadm merged commit 9e075d1 into facebook:master Jan 17, 2020
@trueadm trueadm deleted the remove-scope-apis branch January 17, 2020 12:16
@JanJakes
Copy link

JanJakes commented Jan 5, 2021

Unfortunately, I've decided to also remove the accessibility directory from the React repository for now

About a year later, I'd like to ask if there's any plan or progress to bring these back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants