Skip to content

Code Quality: fix browser deprecation warning #762

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Apr 8, 2025

This PR suppresses browser warning logs that occur in WP 6.8. I made changes based on the field guide from the following three perspectives:

1. Updates to user-interface components in WordPress 6.8 - Default 36px sizes are now deprecated

Add __next40pxDefaultSize to the form component that is causing the deprecation warning. This means the height of the component will change from 36px to 40px. Example:

Before After
image image

2. Updates to user-interface components in WordPress 6.8 - Stabilized Navigator

Use Navigatior.BackButton instead of __experimentalNavigatorToParentButton. For backward compatibility, check whether Navigatior.BackButton is undefined, and if it is, use the conventional component.

3. Data: A helpful performance warning for developers in the ‘useSelect’ hook

Refactored one of the useSelect hooks, which is not used properly. The useSelect Hook itself should not be asynchronous.

@t-hamano t-hamano requested a review from a team April 8, 2025 02:36
@t-hamano t-hamano marked this pull request as ready for review April 8, 2025 02:36
@t-hamano t-hamano self-assigned this Apr 8, 2025
@t-hamano t-hamano force-pushed the fix/browser-deprecated-warning branch 2 times, most recently from b37d0bc to 7bf0332 Compare April 8, 2025 04:32
@t-hamano t-hamano force-pushed the fix/browser-deprecated-warning branch from 7bf0332 to e58be19 Compare April 10, 2025 09:40
Copy link
Contributor

@pbking pbking left a comment

Choose a reason for hiding this comment

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

lgtm

@t-hamano t-hamano merged commit 13da0d2 into trunk Apr 15, 2025
2 checks passed
@t-hamano t-hamano deleted the fix/browser-deprecated-warning branch April 15, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants