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 DOM: Add support for hidden="until-found" #24741

Closed
wants to merge 4 commits into from

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jun 16, 2022

Summary

Closes #24740

Adds support for the experimental hidden="until-found" as well as the correspondig TODO onBeforeMatch event handler.

Keep in mind that these new browser APIs are only implemented in Chrome and Edge at the moment. Safari and Firefox have no support for this API yet (see hidden browser compatibility table.

I haven't checked if we can polyfill the API or maybe we shouldn't even do that? Otherwise landing this would take more time and block experimentation in UIs targetting Chromium exclusively

How did you test this change?

Comment on lines 4830 to 4930
| `hidden=(empty string)`| (initial)| `<boolean: false>` |
| `hidden=(empty string)`| (changed)| `<boolean: true>` |
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Similar issue as #24730: Should this be behind a flag?

@sizebot
Copy link

sizebot commented Jun 16, 2022

Comparing: 4cd788a...eb16b74

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 131.79 kB 131.79 kB = 42.40 kB 42.40 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 137.06 kB 137.06 kB = 44.00 kB 44.00 kB
facebook-www/ReactDOM-prod.classic.js = 457.17 kB 457.17 kB = 83.22 kB 83.22 kB
facebook-www/ReactDOM-prod.modern.js = 442.41 kB 442.41 kB = 80.94 kB 80.94 kB
facebook-www/ReactDOMForked-prod.classic.js = 457.94 kB 457.94 kB = 83.33 kB 83.33 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against eb16b74

@eps1lon eps1lon marked this pull request as ready for review June 16, 2022 18:07
@eps1lon eps1lon force-pushed the fix/hidden-until-found branch 2 times, most recently from 4550628 to ea40625 Compare February 11, 2023 11:37
@react-sizebot
Copy link

react-sizebot commented Feb 11, 2023

Comparing: 01ab35a...a7cc853

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js +0.06% 176.89 kB 176.99 kB +0.03% 55.14 kB 55.15 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.02% 179.00 kB 179.04 kB +0.01% 55.80 kB 55.81 kB
facebook-www/ReactDOM-prod.classic.js +0.03% 594.04 kB 594.22 kB +0.01% 104.94 kB 104.95 kB
facebook-www/ReactDOM-prod.modern.js +0.03% 577.33 kB 577.51 kB = 101.96 kB 101.97 kB
test_utils/ReactAllWarnings.js Deleted 66.40 kB 0.00 kB Deleted 16.26 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 66.40 kB 0.00 kB Deleted 16.26 kB 0.00 kB

Generated by 🚫 dangerJS against a7cc853

@eps1lon
Copy link
Collaborator Author

eps1lon commented Feb 28, 2024

We'll also need to look into support for beforematch events and we need to decide if we're ok with experimental APIs that are only supported by a single browser.

Copy link

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Jun 10, 2024
@eps1lon eps1lon removed Resolution: Stale Automatically closed due to inactivity labels Jun 10, 2024
Copy link

github-actions bot commented Sep 8, 2024

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Sep 8, 2024
Copy link

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@github-actions github-actions bot closed this Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: hidden attribute does not accept string values
4 participants