-
Notifications
You must be signed in to change notification settings - Fork 132
Add a way to clear parent category #11428
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
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #11428 +/- ##
============================================
- Coverage 40.84% 40.84% -0.01%
Complexity 5215 5215
============================================
Files 1070 1070
Lines 62771 62773 +2
Branches 8571 8571
============================================
Hits 25639 25639
- Misses 34825 34827 +2
Partials 2307 2307 ☔ View full report in Codecov by Sentry. |
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 @0nko, works well
if (parentCategoryName != null) { | ||
binding.productCategoryParent.setHtmlText(parentCategoryName) | ||
} else { | ||
binding.productCategoryParent.setHtmlText("") | ||
} |
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.
very minor np, we could shorten this with something like:
binding.productCategoryParent.setHtmlText(parentCategoryName.orEmpty())
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.
Oh yeah, good call 👍
Implements #11427.
After fixing a parent category crash, I realized there's no way to clear the parent category once it's been set. This PR adds a button to do that.
Screen_recording_20240501_182608.webm
To test:
Clear parent category
button