Skip to content

Social: Fix upgrade nudges not showing - #30101

Merged
spsiddarthan merged 2 commits into
trunkfrom
fix/upgrade-nudges-not-showing
Apr 14, 2023
Merged

spsiddarthan merged 2 commits into
trunkfrom
fix/upgrade-nudges-not-showing

Conversation

@spsiddarthan

@spsiddarthan spsiddarthan commented Apr 14, 2023 •

Copy link
Copy Markdown
Contributor

Jetpack Social's paid features are broken on the trunk branch currently. When you don't have a paid plan, the upgrade nudges don't show up. Along with that, the initial state of the plugin isn't set up correctly. This was inadvertently introduced in #29910 through this bit of code https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/social/src/class-jetpack-social.php#L361-L372, which overrides the initial state in https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/social/src/class-jetpack-social.php#L316.

This is the PR which originally added the review prompts. But this line sets the state for the Social plugin only if the Jetpack plugin is not active which leads to #29910 being created, I presume. That accidentally stomped over the plugin's initial state.

I am not entirely sure how to go about fixing the review prompts when both the plugins are active, requires a bit of thinking I would reckon, but to restore the plugin to a working state I have the code that enqueues the review prompt-related script. I wonder if we can revert #29910 to reinstate the user reviews at least in the case where only the social plugin is active.

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Remove any paid plans on your test site and boot up your Jetpack Site on trunk. You won't see the upgrade nudge for Jetpack Social in the sidebar.

Screenshot 2023-04-14 at 16 53 48

  • Switch to this branch and you will see that the nudge shows up.

@spsiddarthan spsiddarthan self-assigned this Apr 14, 2023
@github-actions github-actions Bot added the [Plugin] Social Issues about the Jetpack Social plugin label Apr 14, 2023
@github-actions

github-actions Bot commented Apr 14, 2023 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Social plugin:

  • Next scheduled release: May 2, 2023.
  • Scheduled code freeze: April 24, 2023.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Apr 14, 2023
@spsiddarthan
spsiddarthan requested review from a team and jboland88 April 14, 2023 11:26
@spsiddarthan spsiddarthan added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Apr 14, 2023
@spsiddarthan
spsiddarthan merged commit 8fb86c1 into trunk Apr 14, 2023
@spsiddarthan
spsiddarthan deleted the fix/upgrade-nudges-not-showing branch April 14, 2023 11:54
@github-actions github-actions Bot added this to the social/1.9.1 milestone Apr 14, 2023
pablinos added a commit that referenced this pull request Jun 20, 2023
We had to revert #29910 in #30101 because the review prompt state was
stamping on the rest of the initial state object that's used by
Social/Publicize.

This change adds the Post Publish panel with the review prompt to the
publicize-components package and merges the required state in the Social
plugin, so that if both plugins are active the review prompt is still
shown in Jetpack.
pablinos added a commit that referenced this pull request Jun 21, 2023
…31456)

* Social Review Prompt: Ensure it is still shown with Jetpack Active

We had to revert #29910 in #30101 because the review prompt state was
stamping on the rest of the initial state object that's used by
Social/Publicize.

This change adds the Post Publish panel with the review prompt to the
publicize-components package and merges the required state in the Social
plugin, so that if both plugins are active the review prompt is still
shown in Jetpack.

* Fix the package versions

* Add the @wordpress/edit-post dependency

* Fix package versions

* Fix package version

* Update the script handle
@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Social Issues about the Jetpack Social plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants