-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Simplify removing a self-hosted site #22487
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
Generated by 🚫 Danger |
This comment was marked as outdated.
This comment was marked as outdated.
|
| App Name | Jetpack | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22487-e1de90f | |
| Commit | e1de90f | |
| Direct Download | jetpack-prototype-build-pr22487-e1de90f.apk |
|
| App Name | WordPress | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22487-e1de90f | |
| Commit | e1de90f | |
| Direct Download | wordpress-prototype-build-pr22487-e1de90f.apk |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #22487 +/- ##
=======================================
Coverage 38.94% 38.95%
=======================================
Files 2189 2189
Lines 105364 105366 +2
Branches 14948 14948
=======================================
+ Hits 41039 41043 +4
+ Misses 60892 60890 -2
Partials 3433 3433 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Claude finished @nbradbury's task in 1m 13s —— View job Code Review Complete ✅I've reviewed the PR changes for simplifying the removal of self-hosted sites. Overall, the implementation is clean and well-tested. Here's my detailed feedback: ✅ Strengths
🔍 Issues and Suggestions1. Missing Test Coverage (Codecov Report)The Codecov report shows 50% patch coverage with 1 line missing in isSelfHostedSite = !siteModel.isUsingWpComRestApi // Line 30 - not coveredRecommendation: While this is initialization code in a data class, consider adding a simple test to verify the 2. Potential Accessibility ImprovementIn android:contentDescription="@string/remove_account"This is good! However, consider whether the string resource Recommendation: Consider if 3. Code Style: Companion Object PlacementAccording to However, I notice the companion object is quite substantial with a helper function. This is fine, but consider if the function could be a top-level function in the file instead, since it doesn't need access to the class. This is a minor style preference, not a requirement. 4. Confirmation Dialog UXThe confirmation dialog in
Since this PR makes removal more prominent via a visible X button (instead of hidden in long-press), users might accidentally tap it. Consider:
Example improvement: .setMessage(
getString(R.string.sure_to_remove_site, site.name ?: site.url)
)This is a UX enhancement suggestion, not a blocker. 5. Long Lines CheckAccording to
All other lines appear to be within the 120 character limit. ✅ 🔒 Security Considerations
No security concerns identified. ⚡ Performance Considerations
No performance concerns identified. 📝 Documentation
Minor suggestion: Consider adding a KDoc comment to 🎯 Overall AssessmentThis is a well-implemented PR that achieves its goal of making self-hosted site removal more discoverable. The code quality is high, and the addition of unit tests is commendable. Recommended Actions Before Merge:
Ready to merge once you've considered these optional improvements. Great work! 🚀 |
I added this in e1de90f. |
|
adalpari
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 is a great UX improvement!!! 👏
Looks a bit odd to have the "X" only for self-hosted sites without any context.
But given that the PR is just moving the action to a more visual position, that's a different (design) issue.





Fixes CMM-180
We've a had a long-standing issue to make it easier to remove a self-hosted site from the app. Previously you could only do it by long-pressing the site in the site picker and confirming its removal. This PR changes this to use a very visible x icon at the end of the site row.
To test
Go to the site picker, tap the x icon on a self-hosted site, and verify that it works as expected.