-
Notifications
You must be signed in to change notification settings - Fork 109
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
[Login] Allow login for WPCOM suspended sites #14257
base: trunk
Are you sure you want to change the base?
Conversation
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
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.
Nice work @selanthiraiyan, the logic works well.
There are just two points that needs addressing before approving the PR, the unit tests are failing, and the "Install jetpack" button is still shown in the app settings.
// Whether the site is suspended on WordPress.com and can't be connected using Jetpack | ||
// | ||
case wpcomSiteSuspended |
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.
Just a question for my learning, do we have any guidelines on where to use UserDefaults
vs something like GeneralAppSettings
in the app? in the custom fields project, I used GeneralAppSettings
, and it needed a lot of boilerplate to my liking, so I'm not sure if I should've used UserDefaults
instead 😅
@@ -60,6 +60,8 @@ final class DashboardViewModel: ObservableObject { | |||
|
|||
@Published private(set) var jetpackBannerVisibleFromAppSettings = false | |||
|
|||
@Published private(set) var isSiteEligibleToInstallJetpack = true |
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.
We need a similar logic for the app settings to hide the "Install Jetpack" button.
Closes: #14196
Closes: #14255
Closes: #14256
Description
Adds code to allow login for WPCOM suspended sites. This logic is added behind a configuration flag in the authenticator library.
The
enableSiteCredentialsLoginForWPCOMSuspendedSites
configuration here will be enabled later once the rest of the tasks are completed.Steps to reproduce
Prerequisites
wp-admin
pageLogin into a suspended site
enableSiteCredentialsLoginForWPCOMSuspendedSites
configuration hereWPCOM credentials login
JN site .org credentials login
Testing information
I tested the following scenarios.
enableSiteCredentialsLoginForWPCOMSuspendedSites
configuration is set as true. The Jetpack banner is hidden.Screenshots
Suspended site
enableSiteCredentialsLoginForWPCOMSuspendedSites
falseenableSiteCredentialsLoginForWPCOMSuspendedSites
trueDashboard - Jetpack banner of site without Jetpack when
enableSiteCredentialsLoginForWPCOMSuspendedSites
trueRELEASE-NOTES.txt
if necessary.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: