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

fixes to sharing modal and enable for English users #77053

Merged
merged 6 commits into from
May 22, 2023
Merged

Conversation

roo2
Copy link
Contributor

@roo2 roo2 commented May 18, 2023

I had some issues on deploying the sharing modal last time. p1684314937793019-slack-C025Q5RK2

This PR fixes those two issues and re-enables the sharing modal.
See #76267
Screen Shot 2023-05-18 at 2 22 32 pm

The SVG issue required inlining a copy of the social logos svg into the ETK

Testing instructions.

  • sandbox a test site
  • Apply to your sandbox with cd apps/editing-toolkit && yarn dev --sync
  • Publish a new post
  • verify that no request is made to an svg file named social-logos-d55401f99bb02ebd6cf4.svg or similar.
  • sandbox a p2 or private site.
  • publish a post and verify the modal is not shown
  • see instructions from SHARING - Add post publish sharing modal #76267

@roo2 roo2 requested a review from a team May 18, 2023 04:24
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 18, 2023
@github-actions
Copy link

github-actions bot commented May 18, 2023

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@@ -30,6 +32,9 @@ const SharingModal: React.FC = () => {
const { launchpadScreenOption } = window?.launchpadOptions || {};
const { isDismissed, updateIsDismissed } = useSharingModalDismissed( isDismissedDefault );
const { __ } = useI18n();
const localeSlug = useLocale();
const isEnglish = localeSlug?.startsWith( 'en' );
const isPrivateBlog = window?.wpcomGutenberg?.blogPublic === '-1';
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see how this will block on P2. If the P2 is public, I think it will still show.. is that ok?

Copy link
Contributor

@davemart-in davemart-in May 18, 2023

Choose a reason for hiding this comment

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

I suspect that is fine. I suspect the primary issue is to not show it on private blogs and P2s since you'd never really want to promote private posts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, if p2 is public the share modal pops up. Think that's ok but just wanted to double check;

Screenshot 2023-05-18 at 17 10 47

Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect the primary issue is to not show it on private blogs and P2s since you'd never really want to promote private posts.

Yeah, if p2 is public the share modal pops up. Think that's ok

I agree here as well. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, I didn't even think about P2s being public but I agree that the thing we care about is private blogs. A public P2 would probably want to share and if not they can dismiss it.

Copy link
Contributor

@eoigal eoigal left a comment

Choose a reason for hiding this comment

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

WFM. Nice job

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

Looks good and tests well on my end as well!

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit add/sharing-modal-fixed on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@roo2 roo2 merged commit a937c36 into trunk May 22, 2023
@roo2 roo2 deleted the add/sharing-modal-fixed branch May 22, 2023 00:23
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants