-
Notifications
You must be signed in to change notification settings - Fork 136
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
Issue/11323 new product image picker #12610
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class ProductImagePickerFragment : BaseFragment() { |
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.
Thought of adding this new fragment in products.images
package, but i think that would be more confusing as there's already ProductImagesFragment
and related classes to handle product images. While this feature might be handy in the future, currently it is very specific to the Blaze feature. For those reasons, I'm keeping it inside the blaze
package.
📲 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 #12610 +/- ##
============================================
- Coverage 40.61% 40.59% -0.02%
+ Complexity 5682 5681 -1
============================================
Files 1229 1230 +1
Lines 69124 69155 +31
Branches 9574 9576 +2
============================================
- Hits 28076 28075 -1
- Misses 38466 38497 +31
- Partials 2582 2583 +1 ☔ View full report in Codecov by Sentry. |
|
||
@Composable | ||
fun ProductImagePickerScreen( | ||
viewState: ProductImagePickerViewModel.ViewState, |
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 referenced
ProductImagePickerViewModel
here, but it can be removed since we importedcom.woocommerce.android.ui.blaze.creation.ad.ProductImagePickerViewModel.ViewState
. I suggest removingimport com.woocommerce.android.ui.blaze.creation.ad.ProductImagePickerViewModel.ViewState
and also referencingProductImagePickerViewModel
inProductImageGrid
for consistency. - Also we can remove
Product.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/blaze/creation/ad/ProductImageScreen.kt
Outdated
Show resolved
Hide resolved
.../src/main/kotlin/com/woocommerce/android/ui/blaze/creation/ad/ProductImagePickerViewModel.kt
Show resolved
Hide resolved
Hey @irfano thanks for the feedback!! I've addressed the import issues. A bit differently, though, I left the fully qualified names so it's easier to check what type of object it's being issued. For example, instead of As per the talkback service, good catch. However, I'm not sure how useful would it be to add the "photo taken on $date" in this case. I mean, it doesn't seem like the date is very relevant data in this context to help identify which picture is being selec4ed. I've added a short content description to improve the experience a bit. Let me know if there's anything else that should be addressed before this PR can be approved :) |
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.
It's better now. Thank you for changes. LGTM! 👍🏻
Closes: #11323
Description
Adds a new product image picker within Blaze campaign creation flow.
Choose existing product photo
This PR doesn't add any unit tests because there's barely any logic. It is mostly a simple UI and handling navigation.
Testing information
Edit Ad
>Change image
>Choose existing product photo
Repeat the above steps and select a product with multiple images.
Images/gif
PickProductImage.mp4
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: