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

Hide Jetpack upsells when site is black-flagged #12788

Merged

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Oct 16, 2024

Closes: #12782

Depends on #12780

Description

This PR adds the following changes:

  • Updates the LoginActivity to track when a site is suspended (blak-flagged).
  • Hides the Jetpack benefits banner in the dashboard.
  • Hides the Jetpack icon in the performance card.
  • Hides the Jetpack installation option from the app settings.

Steps to reproduce

  1. DM me to share with a suspended website (or the steps to create one)
  2. Open the app and sign in to the website.

Testing information

  • Check the dashboard and confirm that the Jetpack banner and icon are hidden.
  • Check the app settings, and confirm the Jetpack installation option is not shown.

The tests that have been performed

^

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@hichamboushaba hichamboushaba added type: enhancement A request for an enhancement. feature: login Related to any part of the log in or sign in flow, or authentication. status: do not merge Dependent on another PR, ready for review but not ready for merge. labels Oct 16, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 16, 2024

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is assigned to the milestone 20.8. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 16, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitc0d7adb
Direct Downloadwoocommerce-wear-prototype-build-pr12788-c0d7adb.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 16, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitc0d7adb
Direct Downloadwoocommerce-prototype-build-pr12788-c0d7adb.apk

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.

Project coverage is 40.80%. Comparing base (84c967a) to head (c0d7adb).
Report is 16 commits behind head on trunk.

Files with missing lines Patch % Lines
...rc/main/kotlin/com/woocommerce/android/AppPrefs.kt 0.00% 4 Missing ⚠️
.../kotlin/com/woocommerce/android/AppPrefsWrapper.kt 0.00% 1 Missing ⚠️
...commerce/android/ui/prefs/MainSettingsPresenter.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #12788   +/-   ##
=========================================
  Coverage     40.80%   40.80%           
- Complexity     5750     5753    +3     
=========================================
  Files          1237     1237           
  Lines         69827    69833    +6     
  Branches       9698     9699    +1     
=========================================
+ Hits          28493    28498    +5     
+ Misses        38707    38706    -1     
- Partials       2627     2629    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hichamboushaba hichamboushaba marked this pull request as ready for review October 16, 2024 12:06
@hichamboushaba hichamboushaba force-pushed the issue/12782-hide-jetpack-for-black-flagged-websites branch from e667523 to 8a8d8fd Compare October 17, 2024 08:26
@hichamboushaba hichamboushaba added this to the 20.8 milestone Oct 17, 2024
@JorgeMucientes JorgeMucientes self-assigned this Oct 17, 2024
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

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

Nice work @hichamboushaba, works well 👍🏼

@JorgeMucientes JorgeMucientes modified the milestones: 20.8, 20.9 Oct 18, 2024
Base automatically changed from issue/12779-login-to-black-flagged-websites to trunk October 18, 2024 09:13
@hichamboushaba hichamboushaba modified the milestones: 20.9, 20.8 Oct 18, 2024
…websites

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/AppPrefs.kt
#	WooCommerce/src/main/kotlin/com/woocommerce/android/AppPrefsWrapper.kt
@hichamboushaba hichamboushaba removed the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Oct 18, 2024
@hichamboushaba hichamboushaba merged commit 8800830 into trunk Oct 18, 2024
16 checks passed
@hichamboushaba hichamboushaba deleted the issue/12782-hide-jetpack-for-black-flagged-websites branch October 18, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication. type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide Jeptack upselling points from the app when using a black-flagged website.
5 participants