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] Add optional searchNodes to Scope.queryAllNodes #17293

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 6, 2019

The experimental React Scopes API has a method available when using a ref called queryAllNodes. Previously, this expected only a scope query function, but now with this PR, can additionally take an optional array of DOM nodes that will also be included in the host component search in a scope. This was an internal request, so that we can easily merge different scope queries together, and the existing focused elements without causing bugs in the UI.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 6, 2019

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 43f64f4:

Sandbox Source
stoic-varahamihira-gvji1 Configuration

@sizebot
Copy link

sizebot commented Nov 6, 2019

Size changes (experimental)

Details of bundled changes.

Comparing: 3452706...43f64f4

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js 0.0% +0.1% 616.86 KB 617.12 KB 128.14 KB 128.22 KB FB_WWW_DEV
ReactART-prod.js 🔺+0.1% 🔺+0.2% 235.88 KB 236.23 KB 39.62 KB 39.71 KB FB_WWW_PROD
react-art.development.js 0.0% 0.0% 672.69 KB 672.91 KB 145.83 KB 145.9 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 106.73 KB 106.73 KB 32.35 KB 32.35 KB UMD_PROD
react-art.development.js 0.0% 0.0% 603.35 KB 603.58 KB 128.46 KB 128.52 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 71.73 KB 71.73 KB 21.48 KB 21.48 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.54 KB 123.54 KB 38.79 KB 38.79 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% -0.0% 140.2 KB 140.2 KB 36.81 KB 36.81 KB UMD_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% -0.2% 4.45 KB 4.45 KB 1.8 KB 1.79 KB UMD_DEV
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.4% 1.33 KB 1.33 KB 771 B 768 B UMD_PROD
react-dom-test-utils.development.js 0.0% -0.0% 56.1 KB 56.1 KB 15.52 KB 15.52 KB UMD_DEV
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-unstable-flight-client.development.js 0.0% -0.1% 4.84 KB 4.84 KB 1.6 KB 1.6 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.4% 1.21 KB 1.21 KB 712 B 709 B UMD_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.2% 1.79 KB 1.79 KB 876 B 874 B UMD_PROD
ReactDOMServer-dev.js 0.0% -0.0% 139.57 KB 139.57 KB 35.4 KB 35.4 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 54.37 KB 54.37 KB 15.19 KB 15.18 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.71 KB 3.71 KB 1.51 KB 1.5 KB NODE_DEV
react-dom-unstable-flight-client.development.js 0.0% -0.1% 4.67 KB 4.67 KB 1.55 KB 1.55 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.5% 1.05 KB 1.05 KB 643 B 640 B NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.2% 1.63 KB 1.63 KB 803 B 801 B NODE_PROD
react-dom.development.js 0.0% 0.0% 951.53 KB 951.75 KB 215.12 KB 215.18 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.57 KB 119.57 KB 38.35 KB 38.35 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 123.25 KB 123.25 KB 39.45 KB 39.45 KB UMD_PROFILING
react-dom.development.js 0.0% 0.0% 945.63 KB 945.85 KB 213.54 KB 213.61 KB NODE_DEV
react-dom-unstable-flight-server.node.development.js 0.0% -0.1% 4.51 KB 4.51 KB 1.79 KB 1.78 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 119.74 KB 119.74 KB 37.74 KB 37.73 KB NODE_PROD
react-dom-unstable-flight-server.node.production.min.js 0.0% -0.3% 1.2 KB 1.2 KB 723 B 721 B NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 136.13 KB 136.13 KB 35.81 KB 35.81 KB NODE_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% -0.1% 4.25 KB 4.25 KB 1.74 KB 1.74 KB NODE_DEV
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.3% 1.13 KB 1.13 KB 689 B 687 B NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.14 KB 60.14 KB 15.8 KB 15.8 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.73 KB 10.73 KB 3.67 KB 3.67 KB UMD_PROD
ReactDOM-dev.js 0.0% 0.0% 973.96 KB 974.21 KB 216.11 KB 216.19 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.1% 🔺+0.1% 402.03 KB 402.38 KB 73.02 KB 73.11 KB FB_WWW_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 59.82 KB 59.82 KB 15.67 KB 15.66 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.97 KB 3.97 KB 1.53 KB 1.53 KB NODE_DEV
ReactDOM-profiling.js +0.1% +0.1% 402.87 KB 403.21 KB 73.57 KB 73.67 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.48 KB 10.48 KB 3.58 KB 3.57 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.3% 1.12 KB 1.12 KB 677 B 675 B NODE_PROD

Generated by 🚫 dangerJS against 43f64f4

@sizebot
Copy link

sizebot commented Nov 6, 2019

Size changes (stable)

No significant bundle size changes to report.

Generated by 🚫 dangerJS against 43f64f4

Copy link

@tatermelon tatermelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This is just what I need! Thank you :D

@trueadm trueadm merged commit ce4b3e9 into facebook:master Nov 6, 2019
@trueadm trueadm deleted the react-scope-query-include branch November 6, 2019 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants