-
Notifications
You must be signed in to change notification settings - Fork 114
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
[Product Creation AI v2] View and Remove package image #13213
Conversation
|
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 works as described 👍
@Published var isShowingMediaPickerSourceSheet: Bool = false | ||
@Published var isShowingViewPhotoSheet: Bool = false |
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.
Super nit:
@Published var isShowingMediaPickerSourceSheet: Bool = false | |
@Published var isShowingViewPhotoSheet: Bool = false | |
@Published var isShowingMediaPickerSourceSheet = false | |
@Published var isShowingViewPhotoSheet = false |
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.
Update in 9e98a5b
@@ -50,20 +54,45 @@ final class ProductCreationAIStartingInfoViewModel: ObservableObject { | |||
} | |||
|
|||
func didTapRemovePhoto() { | |||
let previousState = imageState |
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.
❓ Should we keep a reference of the previous state in the class's scope? I wonder if it can get deallocated when this method is finished, causing an undefined behavior when tapping the Undo button.
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.
Started capturing the previousState
from inside the closure in 26a747a
let sut = ProductCreationAIStartingInfoViewModel(siteID: siteID) | ||
|
||
// When | ||
sut.didTapReadTextFromPhoto() |
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.
Do you mean didTapReplacePhoto
?
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.
Good catch. Fixed in d2f11ad
Thanks for the review, Huong! I am enabling auto-merge now. Please feel free to add comments, if any. I will address them in upcoming PRs. |
Closes: #13104
Description
Adds a way to view and remove the selected package photo for the product creation with AI flow.
Changes
Steps to reproduce
productCreationAIv2M1
feature flag+
button on top rightScreenshots
View.Remove.photo.mp4
RELEASE-NOTES.txt
if necessary.