-
Notifications
You must be signed in to change notification settings - Fork 120
Open CIAB booking products in web #16250
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
|
|
6e0b6e6 to
5e6f2a2
Compare
RafaelKayumov
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.
Pre-approving.
In my testing both native and web product form is presented for non-booking and booking products correspondingly. Left a couple of comments.
| func viewController(product: Product, | ||
| presentationStyle: ProductDetailNavigator.Presentation, | ||
| isReadOnly: Bool, | ||
| onDelete: (() -> Void)? = nil) -> UIViewController { |
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.
I can't see the onDelete being assigned upon init.
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.
Well observed, yeah, this is a bit of a stretch, but we only need this to implement the protocol. And since the native version uses the onDelete I had to expose it here as well.
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.
I've decided to split the native and web viewController creation even more to not have these unused parameters hanging around.
| } | ||
|
|
||
| @objc | ||
| private func dismissWebView() { |
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.
dismissWebView() doesn't seem to get called anywhere. Am I missing something?
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.
No you are not, I have removed the callback somewhere along the way. I'll need to readd it.
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.
Thanks for point this out @RafaelKayumov, this actually showed that I'm was not using the dismiss anywhere on the caller side. I've added a callback to ProductsViewController so that the list of products refreshes when the webview is closed or navigated back.
d6c4eed to
257d8eb
Compare

Closes WOOMOB-1319
Description
Open
bookingproduct types in the admin web instead of native navigation.Changes:
UIViewControllerfor opening the product details in native.UIViewControllerfor opening the product details in webview.Product.ProductDetailsFactory.productDetailsusage withProductDetailNavigator.shared.makeDestinationProductDetailNavigatorto always return a native viewcontroller.Steps to reproduce
You'll need to execute two test cases, as currently no test site is both CIAB-enabled and has the new web admin.
Validate the redirection logic.
bookingand non-booking products.bookingtype product.bookingtype product.Validate the admin url.
shouldOpenInWebinProductDetailNavigatorto always return true.bookingtype product.Testing information
Tested on iPhone 17 Pro simulator and device.
RELEASE-NOTES.txtif necessary.