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

fix: hide cpt from menu #1365

Merged
merged 1 commit into from
Nov 18, 2024
Merged

fix: hide cpt from menu #1365

merged 1 commit into from
Nov 18, 2024

Conversation

miguelpeixe
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

This is a fix for Automattic/newspack-plugin#3549.

Popups post type is already not shown in the menu, but without the explicit flag, WP will override (more specifically here) the parent_file filter we're using to activate a custom menu when creating a new prompt:

image

How to test the changes in this Pull Request:

  1. Checkout on feat(ia): audience campaigns newspack-plugin#3549 and while on trunk, navigate to create a new segment (/wp-admin/post-new.php?post_type=newspack_popups_cpt)
  2. Confirm no menu items are active
  3. Checkout this branch, refresh the page and confirm the "Audience -> Campaigns" menu is active

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

Not strictly related but similar, so I'll mention here: when in the "create new segment" screen, the tabs lose focus as well.

Uploading Screenshot 2024-11-15 at 3.16.58 PM.png…

@miguelpeixe
Copy link
Member Author

Thanks, @dkoo! It seems like this is the current behavior in trunk as well, I'll see if we can fix this without having to change too much of the existing tabbed navigation structure.

@miguelpeixe miguelpeixe merged commit 6ec34ee into trunk Nov 18, 2024
8 checks passed
Copy link

Hey @miguelpeixe, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

@miguelpeixe miguelpeixe deleted the fix/cpt-show-in-menu branch November 18, 2024 12:37
@miguelpeixe
Copy link
Member Author

@dkoo, fixed the Segments tab in Automattic/newspack-plugin@7e515b6

matticbot pushed a commit that referenced this pull request Nov 29, 2024
## [3.1.5-alpha.1](v3.1.4...v3.1.5-alpha.1) (2024-11-29)

### Bug Fixes

* hide cpt from menu ([#1365](#1365)) ([6ec34ee](6ec34ee))
* prevent issue with double-scrollbars in really specific circumstances ([#1370](#1370)) ([c35772f](c35772f))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.5-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Dec 9, 2024
## [3.1.5](v3.1.4...v3.1.5) (2024-12-09)

### Bug Fixes

* hide cpt from menu ([#1365](#1365)) ([6ec34ee](6ec34ee))
* prevent issue with double-scrollbars in really specific circumstances ([#1370](#1370)) ([c35772f](c35772f))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants