-
Notifications
You must be signed in to change notification settings - Fork 846
Social Review Prompt: Ensure it is still shown with Jetpack Active #31456
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
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.
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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. Jetpack plugin:
Social plugin:
|
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
jeherve
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.
It seems the tests are failing at the moment:
https://github.com/Automattic/jetpack/actions/runs/5327939776/jobs/9651984469?pr=31456
Yes, I didn't manage to solve the conflicts properly and it was some package version problem. I think it should be ok now, if you'd like to take another look @jeherve? |
jboland88
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.
This tested well and LGTM, nice solution.
I had one nitpick about registering the scripts with unique handle names, but it's not a blocker.
|
|
||
| Assets::register_script( | ||
| 'jetpack-social-editor', | ||
| 'jetpack-blocks-editor', |
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.
Nitpick: I assume this name jetpack-blocks-editor is the same as the main blocks editor script so that the extra data can be appended without needing to differentiate which one was loaded. AFAIK, it's good to have these handles be unique. I think it works in this case, but could be good to use a different handle.
It took me a while to remember that we check to see if Jetpack is loaded above, so I was confused how the name was the same with no conflict at first :)
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.
Yeah it's so the inline script will get attached to the editor script whether we're loading the Social version or the Jetpack one.
Perhaps I can change the handle that we add the inline script to based on whether Jetpack is enabled.
projects/js-packages/publicize-components/src/components/post-publish-review-prompt/index.js
Show resolved
Hide resolved
jboland88
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.
Thanks for the update,
I did not re-run the full test plan with the latest change, but I specifically tested to make sure that the additional properties for the review request were added to the initial state for social in the editor with and without the Jetpack plugin active 👍
LGTM!
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.
Proposed changes:
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.
Other information:
Jetpack product discussion
1198218726984184-as-1204393860935466/f
Does this pull request change what data or activity we track or use?
No.
Testing instructions: