-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Navigation: Refactor mobile overlay breakpoints to JS (#57520)
* Navigation: Refactor mobile overlay breakpoints to JS * remove unused code * refactor to shared function * fix PHPCS * also get the editor working * move the 600 value to constants * add a comment to explain why we don't need the JS for the overlayMenu 'always' mode * Use matchMedia instead of window.resize * remove useEffects and use a hook for the media query * Remove the listener when the component is unmounted * use wp-init instead of wp-watch since we don't need to be reactive * Don't mutate the DOM in directives * Update packages/block-library/src/navigation/edit/index.js Co-authored-by: Dave Smith <getdavemail@gmail.com> * Update packages/block-library/src/navigation/edit/index.js Co-authored-by: Dave Smith <getdavemail@gmail.com> * Add px to the constant * rename to NAVIGATION_MOBILE_COLLAPSE * Add a comment to the navigation CSS * Update lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php Co-authored-by: Dave Smith <getdavemail@gmail.com> --------- Co-authored-by: Dave Smith <getdavemail@gmail.com>
- Loading branch information
Showing
6 changed files
with
82 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters