Skip to content

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

Merged
trueadm merged 1 commit into
react:masterfrom
trueadm:remove-scope-apis
Jan 17, 2020
Merged

[react-interactions] Remove deprecated Scope APIs + update Focus components#17859
trueadm merged 1 commit into
react:masterfrom
trueadm:remove-scope-apis

Conversation

@trueadm

Copy link
Copy Markdown
Contributor

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-botfacebook-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
Copy Markdown

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:

SandboxSource
sad-water-tk31wConfiguration

@codesandbox-ci

codesandbox-ciBot commented Jan 17, 2020

Copy link
Copy Markdown

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:

SandboxSource
icy-firefly-05yp9Configuration

@sizebot

sizebot commented Jan 17, 2020

Copy link
Copy Markdown
Details of bundled changes.

Comparing: b6173e6...cb9da2a

react-test-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-test-renderer.development.js-0.3%-0.2%617.37 KB615.33 KB131.43 KB131.17 KBUMD_DEV
react-test-renderer.production.min.js0.0%-0.0%71.5 KB71.5 KB21.91 KB21.9 KBUMD_PROD
react-test-renderer-shallow.development.js0.0%-0.0%37.83 KB37.83 KB9.81 KB9.8 KBUMD_DEV
react-test-renderer-shallow.production.min.js0.0%-0.1%11.66 KB11.66 KB3.6 KB3.6 KBUMD_PROD
react-test-renderer-shallow.development.js0.0%-0.0%32.37 KB32.37 KB8.5 KB8.49 KBNODE_DEV
react-test-renderer-shallow.production.min.js0.0%-0.1%11.79 KB11.79 KB3.71 KB3.71 KBNODE_PROD
react-test-renderer.development.js-0.3%-0.2%612.63 KB610.59 KB130.25 KB129.99 KBNODE_DEV
react-test-renderer.production.min.js0.0%-0.0%71.19 KB71.19 KB21.53 KB21.52 KBNODE_PROD
ReactTestRenderer-dev.js-0.3%-0.2%628.48 KB626.4 KB131.05 KB130.8 KBFB_WWW_DEV

react-native-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactNativeRenderer-dev.js-0.3%-0.2%745.48 KB743.4 KB157.87 KB157.62 KBRN_OSS_DEV
ReactFabric-dev.js-0.3%-0.2%736.1 KB734.02 KB155.66 KB155.41 KBRN_OSS_DEV
ReactNativeRenderer-dev.js-0.3%-0.2%745.66 KB743.58 KB157.97 KB157.71 KBRN_FB_DEV
ReactFabric-profiling.js0.0%-0.0%276.96 KB276.96 KB47.88 KB47.88 KBRN_OSS_PROFILING
ReactNativeRenderer-prod.js0.0%-0.0%273.4 KB273.4 KB47.01 KB47.01 KBRN_OSS_PROD
ReactFabric-dev.js-0.3%-0.2%736.28 KB734.2 KB155.75 KB155.49 KBRN_FB_DEV
ReactNativeRenderer-profiling.js0.0%-0.0%284.58 KB284.58 KB49.16 KB49.16 KBRN_OSS_PROFILING
ReactFabric-prod.js0.0%-0.0%266.18 KB266.18 KB45.83 KB45.83 KBRN_FB_PROD
ReactFabric-profiling.js0.0%-0.0%277.3 KB277.3 KB47.94 KB47.94 KBRN_FB_PROFILING

react-art

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactART-dev.js-0.3%-0.2%616.88 KB614.81 KB128.53 KB128.27 KBFB_WWW_DEV
ReactART-prod.js-0.7%-0.6%237.24 KB235.52 KB40.05 KB39.82 KBFB_WWW_PROD
react-art.development.js-0.3%-0.2%672.34 KB670.29 KB145.8 KB145.55 KBUMD_DEV
react-art.production.min.js0.0%-0.0%106.83 KB106.83 KB32.5 KB32.49 KBUMD_PROD
react-art.development.js-0.3%-0.2%603.02 KB600.97 KB128.4 KB128.15 KBNODE_DEV
react-art.production.min.js0.0%-0.0%71.78 KB71.78 KB21.64 KB21.64 KBNODE_PROD

react-dom

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-dom.profiling.min.js0.0%-0.0%123.16 KB123.16 KB38.74 KB38.74 KBNODE_PROFILING
react-dom-server.browser.development.js0.0%-0.0%137.73 KB137.73 KB36.6 KB36.6 KBUMD_DEV
react-dom-server.browser.production.min.js0.0%-0.0%20.47 KB20.47 KB7.5 KB7.5 KBUMD_PROD
react-dom-test-utils.development.js0.0%-0.0%54.5 KB54.5 KB15.32 KB15.31 KBUMD_DEV
ReactDOMServer-prod.js0.0%-0.0%49.02 KB49.02 KB11.19 KB11.19 KBFB_WWW_PROD
react-dom-unstable-fizz.browser.development.js0.0%-0.1%3.88 KB3.88 KB1.55 KB1.55 KBUMD_DEV
react-dom-test-utils.production.min.js0.0%-0.0%11.18 KB11.18 KB4.15 KB4.15 KBUMD_PROD
react-dom-unstable-fizz.browser.production.min.js0.0%-0.3%1.21 KB1.21 KB711 B709 BUMD_PROD
react-dom-test-utils.development.js0.0%-0.0%52.77 KB52.77 KB14.99 KB14.99 KBNODE_DEV
react-dom-unstable-fizz.browser.development.js0.0%-0.2%3.71 KB3.71 KB1.5 KB1.5 KBNODE_DEV
react-dom-test-utils.production.min.js0.0%-0.0%10.95 KB10.95 KB4.09 KB4.09 KBNODE_PROD
react-dom-unstable-fizz.browser.production.min.js0.0%-0.3%1.05 KB1.05 KB642 B640 BNODE_PROD
react-dom.development.js-0.2%-0.1%951.01 KB948.97 KB214.93 KB214.68 KBUMD_DEV
react-dom.production.min.js0.0%-0.0%119.18 KB119.18 KB38.29 KB38.29 KBUMD_PROD
react-dom.profiling.min.js0.0%-0.0%122.92 KB122.92 KB39.52 KB39.51 KBUMD_PROFILING
react-dom.development.js-0.2%-0.1%945.07 KB943.03 KB213.22 KB212.96 KBNODE_DEV
react-dom-server.node.development.js0.0%-0.0%134.77 KB134.77 KB35.81 KB35.81 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%119.28 KB119.28 KB37.61 KB37.61 KBNODE_PROD
react-dom-server.node.production.min.js0.0%-0.0%20.8 KB20.8 KB7.63 KB7.63 KBNODE_PROD
react-dom-server.browser.development.js0.0%-0.0%133.66 KB133.66 KB35.58 KB35.58 KBNODE_DEV
ReactDOM-dev.js-0.2%-0.1%972.9 KB970.82 KB216.19 KB215.93 KBFB_WWW_DEV
react-dom-server.browser.production.min.js0.0%-0.0%20.39 KB20.39 KB7.47 KB7.47 KBNODE_PROD
ReactDOM-prod.js-0.4%-0.3%394.67 KB392.95 KB72.22 KB71.97 KBFB_WWW_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%60.91 KB60.91 KB16.07 KB16.07 KBUMD_DEV
ReactDOM-profiling.js-0.4%-0.3%405.96 KB404.25 KB74.37 KB74.12 KBFB_WWW_PROFILING
react-dom-unstable-native-dependencies.production.min.js0.0%-0.1%10.23 KB10.23 KB3.48 KB3.47 KBUMD_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%60.61 KB60.61 KB16 KB15.99 KBNODE_DEV
react-dom-unstable-fizz.node.development.js0.0%-0.2%4.42 KB4.42 KB1.65 KB1.65 KBNODE_DEV
react-dom-unstable-native-dependencies.production.min.js0.0%-0.1%9.97 KB9.97 KB3.37 KB3.37 KBNODE_PROD
ReactDOMServer-dev.js0.0%-0.0%139.4 KB139.4 KB35.43 KB35.43 KBFB_WWW_DEV
react-dom-unstable-fizz.node.production.min.js0.0%-0.3%1.21 KB1.21 KB698 B696 BNODE_PROD

react-reconciler

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-reconciler-persistent.development.js-0.3%-0.2%601.47 KB599.42 KB126.46 KB126.2 KBNODE_DEV
react-reconciler-reflection.development.js0.0%-0.0%19.27 KB19.27 KB6.33 KB6.33 KBNODE_DEV
react-reconciler-persistent.production.min.js0.0%-0.0%72.09 KB72.09 KB21.24 KB21.24 KBNODE_PROD
react-reconciler-reflection.production.min.js0.0%-0.2%2.86 KB2.86 KB1.24 KB1.24 KBNODE_PROD
react-reconciler.development.js-0.3%-0.2%604.02 KB601.97 KB127.56 KB127.31 KBNODE_DEV
react-reconciler.production.min.js0.0%-0.0%74.79 KB74.79 KB21.91 KB21.91 KBNODE_PROD

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

Size changes (experimental)

Generated by 🚫 dangerJS against cb9da2a

@sizebot

sizebot commented Jan 17, 2020

Copy link
Copy Markdown
Details of bundled changes.

Comparing: b6173e6...cb9da2a

react-native-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactFabric-dev.js-0.3%-0.2%736.09 KB734.01 KB155.66 KB155.4 KBRN_OSS_DEV
ReactNativeRenderer-dev.js-0.3%-0.2%745.47 KB743.39 KB157.87 KB157.61 KBRN_OSS_DEV
ReactFabric-profiling.js0.0%-0.0%276.95 KB276.95 KB47.87 KB47.87 KBRN_OSS_PROFILING
ReactNativeRenderer-prod.js0.0%-0.0%273.39 KB273.39 KB47.01 KB47 KBRN_OSS_PROD
ReactNativeRenderer-profiling.js0.0%-0.0%284.56 KB284.56 KB49.15 KB49.15 KBRN_OSS_PROFILING

react-reconciler

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-reconciler-persistent.production.min.js0.0%-0.0%72.08 KB72.08 KB21.23 KB21.23 KBNODE_PROD
react-reconciler.development.js-0.3%-0.2%604.01 KB601.96 KB127.56 KB127.31 KBNODE_DEV
react-reconciler.production.min.js0.0%-0.0%72.06 KB72.06 KB21.23 KB21.23 KBNODE_PROD
react-reconciler-reflection.development.js0.0%-0.0%19.25 KB19.25 KB6.33 KB6.33 KBNODE_DEV
react-reconciler-reflection.production.min.js0.0%-0.2%2.85 KB2.85 KB1.24 KB1.23 KBNODE_PROD
react-reconciler-persistent.development.js-0.3%-0.2%601.45 KB599.41 KB126.45 KB126.19 KBNODE_DEV

react-dom

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-dom-server.browser.production.min.js0.0%-0.0%19.94 KB19.94 KB7.4 KB7.39 KBNODE_PROD
react-dom-test-utils.development.js0.0%-0.0%52.76 KB52.76 KB14.99 KB14.99 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%115.35 KB115.35 KB37.18 KB37.17 KBUMD_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%60.59 KB60.59 KB15.99 KB15.99 KBNODE_DEV
react-dom.profiling.min.js0.0%-0.0%118.98 KB118.98 KB38.36 KB38.36 KBUMD_PROFILING
react-dom-unstable-native-dependencies.production.min.js0.0%-0.1%9.96 KB9.96 KB3.37 KB3.36 KBNODE_PROD
react-dom.development.js-0.2%-0.1%945.05 KB943.01 KB213.19 KB212.94 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%115.41 KB115.41 KB36.54 KB36.54 KBNODE_PROD
react-dom.profiling.min.js0.0%-0.0%119.18 KB119.18 KB37.66 KB37.66 KBNODE_PROFILING
react-dom-unstable-fizz.browser.development.js0.0%-0.2%3.87 KB3.87 KB1.54 KB1.54 KBUMD_DEV
react-dom-unstable-fizz.browser.production.min.js0.0%-0.3%1.2 KB1.2 KB703 B701 BUMD_PROD
react-dom-server.browser.development.js0.0%-0.0%137.71 KB137.71 KB36.6 KB36.6 KBUMD_DEV
react-dom-server.browser.production.min.js0.0%-0.0%20.01 KB20.01 KB7.41 KB7.41 KBUMD_PROD
react-dom-unstable-fizz.browser.development.js0.0%-0.2%3.7 KB3.7 KB1.5 KB1.49 KBNODE_DEV
react-dom-test-utils.development.js0.0%-0.0%54.48 KB54.48 KB15.31 KB15.31 KBUMD_DEV
react-dom-unstable-fizz.browser.production.min.js0.0%-0.2%1.04 KB1.04 KB634 B633 BNODE_PROD
react-dom-test-utils.production.min.js0.0%-0.0%11.17 KB11.17 KB4.14 KB4.14 KBUMD_PROD
react-dom-server.browser.development.js0.0%-0.0%133.64 KB133.64 KB35.58 KB35.57 KBNODE_DEV
react-dom-test-utils.production.min.js0.0%-0.0%10.94 KB10.94 KB4.08 KB4.08 KBNODE_PROD
react-dom-unstable-fizz.node.development.js0.0%-0.2%4.4 KB4.4 KB1.64 KB1.64 KBNODE_DEV
react-dom-unstable-native-dependencies.development.js0.0%-0.0%60.89 KB60.89 KB16.07 KB16.06 KBUMD_DEV
react-dom-unstable-fizz.node.production.min.js0.0%-0.1%1.2 KB1.2 KB689 B688 BNODE_PROD
react-dom-unstable-native-dependencies.production.min.js0.0%-0.1%10.22 KB10.22 KB3.47 KB3.46 KBUMD_PROD
react-dom-server.node.development.js0.0%-0.0%134.75 KB134.75 KB35.81 KB35.81 KBNODE_DEV
react-dom.development.js-0.2%-0.1%950.99 KB948.95 KB214.91 KB214.66 KBUMD_DEV
react-dom-server.node.production.min.js0.0%-0.0%20.34 KB20.34 KB7.55 KB7.55 KBNODE_PROD

react-art

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-art.production.min.js0.0%-0.0%104.33 KB104.33 KB31.8 KB31.79 KBUMD_PROD
react-art.development.js-0.3%-0.2%672.31 KB670.27 KB145.8 KB145.55 KBUMD_DEV
react-art.development.js-0.3%-0.2%602.99 KB600.95 KB128.39 KB128.14 KBNODE_DEV
react-art.production.min.js0.0%-0.0%69.33 KB69.33 KB20.96 KB20.96 KBNODE_PROD

react-test-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-test-renderer-shallow.development.js0.0%-0.0%37.81 KB37.81 KB9.8 KB9.8 KBUMD_DEV
react-test-renderer-shallow.production.min.js0.0%-0.0%11.64 KB11.64 KB3.59 KB3.59 KBUMD_PROD
react-test-renderer-shallow.development.js0.0%-0.0%32.35 KB32.35 KB8.49 KB8.49 KBNODE_DEV
react-test-renderer-shallow.production.min.js0.0%-0.1%11.78 KB11.78 KB3.7 KB3.7 KBNODE_PROD
react-test-renderer.development.js-0.3%-0.2%617.34 KB615.3 KB131.42 KB131.16 KBUMD_DEV
react-test-renderer.production.min.js0.0%-0.0%71.48 KB71.48 KB21.89 KB21.89 KBUMD_PROD
react-test-renderer.development.js-0.3%-0.2%612.61 KB610.57 KB130.24 KB129.98 KBNODE_DEV
react-test-renderer.production.min.js0.0%-0.0%71.17 KB71.17 KB21.51 KB21.5 KBNODE_PROD

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

Size changes (stable)

Generated by 🚫 dangerJS against cb9da2a

@trueadm
trueadm merged commit 9e075d1 into react:masterJan 17, 2020
@trueadm
trueadm deleted the remove-scope-apis branch January 17, 2020 12:16
@JanJakes

JanJakes commented Jan 5, 2021

Copy link
Copy Markdown

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.

mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedReact Core TeamOpened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@trueadm@sizebot@JanJakes@threepointone@facebook-github-bot