-
Notifications
You must be signed in to change notification settings - Fork 806
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
Payments Block: Remove upgrade nudges when used in Premium Content block #17702
Payments Block: Remove upgrade nudges when used in Premium Content block #17702
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
This is an automated check which relies on |
This disclaimer is being moved to the sidebar in #17696 so that should clean up this visual issue. 👍 |
Yes this won't hide the global upgrade nudge UI, just any placeholders local to the block that ask you to upgrade. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert a premium content block
This must be a stupid question, but how do I go about doing that? I can't seem to see a Premium Content block on my WordPress.com simple sites.
Maybe this would be an opportunity to move away from the custom upgrade nudge of the Payments block, and switch to using the standard upgrade nudges like all the other blocks have? This is documented in #14893. That may allow us to fix that issue for all parent/child blocks at once, directly in the upgrade banner logic in extensions/extended-blocks/paid-blocks/
.
What do you think?
@jeherve I believe there are issues with the way Premium Content manages this, it's not in Jetpack so it has duplicated and forked a lot of the nudge and restriction code. It shows on some of my free sites, but not all. What we plan to do is move this block into Jetpack in the coming weeks so we can remove all the duplicated code and unify it with the Jetpack implementation. Okay to move forward with merging this and addressing that as a followup? |
@apeatling This is great news, thanks a lot for taking this on! 🎉 One request, could y'all maybe add an issue to your team's board to add some basic e2e test coverage for that block in order to guard against regressions like the one we're hoping to fix with Automattic/wp-calypso#47467? There's some precedent of e2e tests for paid blocks in JP already, and e2e tests are run against the latest GB plugin version, so the basic infrastructure should be in place already. |
cad2723
to
deffcd4
Compare
@jeherve Good to merge this one? |
deffcd4
to
08248ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good after a rebase to address unrelated test failures.
…pgrade nudge code.
08248ba
to
aefc05d
Compare
@jeherve Thanks, rebased. just need another approval here to merge. |
r219427-wpcom |
Changes proposed in this Pull Request:
Remove all native upgrade nudges inside the Payments block when used within the Premium Content block. This stops the duplication of nudges when used together. This also helps us when using these blocks in patterns so the canvas is cleaner.
Partially fixes Automattic/wp-calypso#46923
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Proposed changelog entry for your changes: