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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Dashboard: Fix focusTrap import #17935

Merged
merged 1 commit into from
Dec 1, 2020
Merged

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Dec 1, 2020

Changes proposed in this Pull Request:

One of the build errors when attempting to upgrade the @automattic/calypso-build dependency to v6.3.0 (#16845) is that the focus-trap npm module doesn't have a default export symbol. (This is confirmed by its docs.)

I assume that we're relying on a Babel plugin to add those default exports (mostly for CommonJS backwards compatibility), and the new calypso-build version would drop it. However, it even seems like focus-trap's API has long changed, so the current approach probably doesn't really work anyway (and just fails silently, since it's wrapped in try...catch calls).

Some more context:

Jetpack product discussion

N/A

Does this pull request change what data or activity we track or use?

Nah.

Testing instructions:

I don't really know what this does 馃槵

Proposed changelog entry for your changes:

React Dashboard: Fix focusTrap import.

@ockham ockham added [Status] Needs Review To request a review from Crew. Label will be renamed soon. Admin Page React-powered dashboard under the Jetpack menu labels Dec 1, 2020
@ockham ockham self-assigned this Dec 1, 2020
@ockham ockham requested review from jeherve, brbrr, anomiex, a team and kraftbj December 1, 2020 13:36
@jetpackbot
Copy link

Scheduled Jetpack release: January 12, 2021.
Scheduled code freeze: January 4, 2021

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Generated by 馃毇 dangerJS against 2edf130

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This seems to test well for me. Good catch!

I don't really know what this does 馃槵

I tested this by going to Jetpack > Dashboard on a connected site, clicking on the link to manage the connection in the Connection section, and once the modal was opened I tried to click into the wp-admin navigation menu on the left. As long as the trap is active, your clicks there won't do anything.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Dec 1, 2020
@jeherve jeherve added this to the 9.3 milestone Dec 1, 2020
@kraftbj kraftbj merged commit a4175da into master Dec 1, 2020
@kraftbj kraftbj deleted the fix/focus-trap-import branch December 1, 2020 16:36
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Dec 1, 2020
@ockham
Copy link
Contributor Author

ockham commented Dec 1, 2020

Thanks @kraftbj for merging! I wasn't able to do so earlier b/c the PHP 8.0 lint (which is clearly unrelated) blocked it for me 馃槄

@kraftbj
Copy link
Contributor

kraftbj commented Dec 1, 2020

All good. PHP 8 shouldn't have been a blocking check, but in either case, we should have some more PHP 8 joy landed pretty soon (the prod code is fine, we think, but the testing infra needed a bit to work).

@anomiex
Copy link
Contributor

anomiex commented Dec 1, 2020

The PHP 8 linting should be blocking, IMO, since we're currently passing it and we don't want to regress. The problem wasn't actually in PHP 8 anyway, it's what we were discussing earlier at p1606835667387400-slack-CBG1CP4EN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants