-
Notifications
You must be signed in to change notification settings - Fork 136
AI: Generate product sharing message part 1: UI #9224
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
# Conflicts: # build.gradle
|
You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code: |
# Conflicts: # WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt
Generated by 🚫 dangerJS |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## trunk #9224 +/- ##
============================================
- Coverage 44.31% 44.09% -0.22%
+ Complexity 4267 4251 -16
============================================
Files 856 857 +1
Lines 45170 45333 +163
Branches 5920 5945 +25
============================================
- Hits 20018 19991 -27
- Misses 23399 23593 +194
+ Partials 1753 1749 -4
☔ View full report in Codecov by Sentry. |
| ) | ||
| } | ||
|
|
||
| else -> { /* nothing to show for Loading state. */ } |
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.
hmm curious, why add a LoadingState in the view model if you are handling the "Loadin" using the viewState.isGenerating ??
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.
Yeah, I ended up removing it in the next PR 76480e7
At that point in the project I wasn't sure if the AI will automatically generate when the share menu item is tapped, hence the LoadingState was added.
|
Code looks good and UI looks good too! Great job @hafizrahman 🏆 . I liked you added the RTL previews too! I left I minor question, non-blocking though! PS: I took the liberty of resolving the |
Part of: #9216
Ref: pe5sF9-1AH-p2
Description
This PR deals with adding the navigation and UI for the new product sharing bottom sheet dialog, which now includes a feature to get sharing message generated with AI. It also hides this feature in a feature flag for now.
This is just a UI PR and there is no actual functionality yet. The code in the viewmodel is subject to change when the functionality is added in, so it's not necessary to focus on it too much.
The design is based on the following design for iOS:
In this PR, the three screen will look like below:
Testing instructions
To check the "Default" and "Generating" UI:
To check the "Regenerate" UI:
At the moment this is not shown in the app itself, but please check the
ProductSharingBottomSheetfile and check the included previews there, which include the "DefaultUIWithRegenerateButton" preview.