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

Update site sharing menu visibility #14979

Merged
merged 5 commits into from
Jul 2, 2021

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Jul 2, 2021

Fixes #14944

This PR updates "My Site" -> "Sharing" menu visibility for Jetpack sites as well as for other conditions taken from the iOS app in the FluxC PR: wordpress-mobile/WordPress-FluxC-Android#2047

To test

It should be sufficient to see if FluxC PR includes important tests for the "Sharing" menu support.
I've also tested important conditions manually using the below steps (you may randomly pick a scenario and see it works as expected):

PS: Tested using WordPress app build variant for non Jetpack sites

Jetpack Site

  1. Login with a wpcom account having a site with a jetpack complete plan e.g. pressable-jetpack-complete on Calypso as well in the app.

  2. Go to Jetpack -> Settings -> Sharing on Calypso

    Screenshot 2021-07-02 at 9 37 40 AM
  3. Based on the enabled state of "Publicize connections" and "Sharing buttons" on Calypso, check that sharing menu is shown/hidden appropriately on the "My Site" tab in the app.

    Publicize connections Sharing buttons Sharing Menu Visibility
    Enabled Disabled Shown
    Disabled Enabled Shown
    Disabled Disabled Hidden
    Enabled Enabled Shown

WpCom site (with publish_posts capabilities)

  • Login with a wpcom account in the app having a site having publish_posts capabilities (admin/ editor/ author user roles)
  • Switch to the site using the site picker.
  • Notice that My Site -> Sharing menu is shown.

WpCom Site (no publish_posts, manage_options capabilities)

  • Login with a wpcom account in the app having a site with you added as a contributor (Contributor can write and edit their own posts but can't publish them).
  • Switch to the site using the site picker.
  • Notice that My Site -> Sharing menu is hidden.

Self-hosted non Jetpack site

  • Login using a Jurassic ninja self-hosted in the app.
  • Notice that My Site -> Sharing menu is hidden.

Self-hosted Jetpack site

  • Login using a Jurassic ninja self-hosted in the app.

  • Install Jetpack and connect to wpcom account.

  • Notice that My Site -> Sharing menu is hidden for the site.

  • Enable "Sharing buttons" Jetpack module for the site on Tools -> Sharing Buttons in Calypso.

    Screenshot 2021-07-02 at 10 18 29 AM
  • Refresh sites using site picker in the app, re-select the site.

  • Notice that the My Site -> Sharing menu is now shown for the site.

Merge Instructions

  • Review corresponding FluxC PR
  • Merge the FluxC PR to develop, create a tag, update it in the WPAndroid build.gradle - I'll address it after the PR is approved
  • Remove Not Ready for Merge label
  • Merge this PR

Regression Notes

  1. Potential unintended areas of impact
    Sharing menu visibility for wpcom sites.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Tested "Sharing" menu visibility for different types of sites/ Jetpack active modules/ user roles manually.

  3. What automated tests I added (or what prevented me from doing so)
    Added tests in the FluxC PR.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@ashiagr ashiagr requested a review from a team July 2, 2021 05:33
@ashiagr ashiagr self-assigned this Jul 2, 2021
@ashiagr ashiagr requested review from zwarm and removed request for a team July 2, 2021 05:33
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 2, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 2, 2021

You can test the changes on this Pull Request by downloading the APKs:

@zwarm zwarm self-assigned this Jul 2, 2021
@ashiagr ashiagr added this to the 17.8 milestone Jul 2, 2021
Copy link
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

Excellent work. Thanks @ashiagr . All tests pass. I sure do miss not having a PTR on the My Site view. 🚀

@ashiagr ashiagr merged commit 7c64af2 into develop Jul 2, 2021
@ashiagr ashiagr deleted the issue/14944-sharing-menu-visibility branch July 2, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jetpack: Hide Sharing Menu Item for Disabled Sharing Buttons Module
2 participants