feat: swap in Overlay Menu block to replace template parts#438
Open
laurelfulford wants to merge 2 commits intotrunkfrom
Open
feat: swap in Overlay Menu block to replace template parts#438laurelfulford wants to merge 2 commits intotrunkfrom
laurelfulford wants to merge 2 commits intotrunkfrom
Conversation
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the theme’s custom mobile/drawer menu template parts and JS/CSS menu system with the Newspack Overlay Menu block, updating header patterns accordingly.
Changes:
- Remove legacy mobile/drawer menu JS modules and drawer SCSS, and stop importing them from the front-end entry points.
- Replace
mobile-menu/drawer-menupattern usage in header patterns withnewspack/overlay-menublocks. - Delete now-unused menu pattern/template-part files and update internal documentation notes.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scss/style.scss | Stops importing drawer overlay styles. |
| src/scss/overlays/_drawer.scss | Removes legacy drawer toggle styling. |
| src/js/front-end/main.js | Removes legacy menu initializers from the front-end bundle. |
| src/js/front-end/menus/mobile.js | Deletes legacy mobile menu initializer. |
| src/js/front-end/menus/drawer.js | Deletes legacy drawer menu initializer. |
| patterns/header/header-mobile-style-1.php | Replaces mobile-menu template-part with Overlay Menu block. |
| patterns/header/header-mobile-style-2.php | Replaces mobile-menu template-part with Overlay Menu block. |
| patterns/header/header-mobile-style-3.php | Replaces mobile-menu template-part with Overlay Menu block. |
| patterns/header/header-mobile-style-4.php | Replaces mobile-menu template-part with Overlay Menu block. |
| patterns/header/header-mobile-style-5.php | Replaces mobile-menu template-part with Overlay Menu block (right slide). |
| patterns/header/header-mobile-style-6.php | Replaces mobile-menu template-part with Overlay Menu block (right slide). |
| patterns/header/header-desktop-style-2.php | Replaces drawer menu pattern with Overlay Menu block. |
| patterns/header/header-desktop-style-3.php | Replaces drawer menu pattern with Overlay Menu block. |
| patterns/header/header-desktop-style-4.php | Replaces drawer menu pattern with Overlay Menu block. |
| patterns/drawer-menu.php | Deletes legacy drawer menu pattern. |
| parts/mobile-menu.html | Deletes legacy mobile menu template part. |
| parts/mobile-contents.html | Deletes legacy mobile menu contents template part. |
| parts/drawer-contents.html | Deletes legacy drawer contents template part. |
| AGENTS.md | Removes documentation describing the legacy dual menu systems. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
This PR removes the mobile menu and drawer template parts, and replaces them with the Overlay Menu block.
It should be tested along with Automattic/newspack-plugin#4642, which fixes a bug in the Overlay Menu Block that only seems to crop up when you're switching between template parts.
Closes NPPD-1397
How to test the changes in this Pull Request:
npm run build.Other information: