-
Notifications
You must be signed in to change notification settings - Fork 846
Make Social Previews a gated feature on WPCom #16724
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
Conversation
|
Thank you for the great PR description! When this PR is ready for review, please apply the E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16724 Scheduled Jetpack release: September 1, 2020. |
Co-authored-by: Damián Suárez <[email protected]>
Co-authored-by: Damián Suárez <[email protected]>
3fa252d to
6e1b5f6
Compare
marekhrabe
left a comment
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.
|
As discussed in p1596637160315500-slack-CJS75TX3R, let's make sure we document this implementation (why |
|
Thanks all. Will merge tomorrow morning UTC. I'll also follow up with #16728. |
|
Caution: This PR has changes that must be merged to WordPress.com |
Merging as this is being blocked by |
|
r211736-wpcom |
…feature on WPCom (#16724) * Add basic scaffold for premium nudge * Add documentation to code. * Remove testing check and use check for avaiabiliity * Update extensions/blocks/social-previews/editor.js Co-authored-by: Damián Suárez <[email protected]> * Update extensions/blocks/social-previews/editor.js Co-authored-by: Damián Suárez <[email protected]> * Remove testing comment * Normalize to a single button and onClick action Co-authored-by: Damián Suárez <[email protected]>


Builds on #16633 to address the need to make Social Previews a paid feature on WordPress.com.
This PR will address the frontend aspect of this by creating a new "Gutenberg Plugin"
social-previews-upgrade-nudge(note this is not a WordPress Plugin in the traditional sense - see here) which will be registered only when thesocial-previewsfeature is not available on the current plan.It will show the exact same UI as the main
social-previewsPlugin but include an upgrade prompt instead of a link to display the "Preview" modal.Note: the reason this is required is because
registerJetpackPluginchecks whether thesocial-previewsfeature is available on the current plan. If it is not available then thesocial-previewsGutenberg Plugin is never registered. Therefore in order to show our "Upgrade Nudge" we need to circumvent this check and ensure that our Plugin is always registered to the Jetpack sidebar, even if the current Plan does not support thesocial-previewsfeature.As a complementary note, recall that Social Previews is to be:
This ensures it meets the WP Plugin guidelines as the Social Previews feature doesn't meet the definition of SaaS.
Fixes #16616
Changes proposed in this Pull Request:
social-previewsPlugin bar the inclusion of an "Upgrade Nudge".social-previewsextension is not available on the current Plan.Jetpack product discussion
See
84-gh-dotcom-manage.Does this pull request change what data or activity we track or use?
No
Testing instructions:
Same setup as #16633 .
Note: a followup PR will work to allow you to switch between Plans to view the different variations of the extension. But for the purposes of this incremental PR we are having to manually flip a variable in the code to force show the version with the upgrade nudge.
extensions/blocks/social-previews/editor.jssetextensionAvailableOnPlan = falseand rebuild usingyarn build-extensions.Proposed changelog entry for your changes:
social-previewsPlugin bar the inclusion of an "Upgrade Nudge".