Show the share CTA in product form navigation bar #9789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #9788
Why
Right now the share product CTA is buried inside the ellipsis menu. We can show it beside the ellipsis menu in the product form, and then hide it when there is more than one button like when the Save/Update CTA is shown after the merchant makes some changes.
How
I decided to show the share CTA on the leading edge of the existing CTA in the navigation bar, because the more/ellipsis menu can stay the same while the share CTA changes to Save/Update CTA after some unsaved changes.
The share CTA is added to
ProductFormViewModel.actionButtonswhen there is up to 1 existing action and the product can be shared. InProductFormViewController, the share CTA is then shown in the navigation bar that calls the same share function as from the more menu. A new event propertysource:product_form|more_menuwas added toproduct_detail_share_button_tappedto see which source is the most effective.Testing instructions
Publishto publish the product --> after the product is saved remotely, a share CTA should be shownproduct_detail_share_button_tappedevent should be tracked withsource: product_formand a share sheet should be shownproduct_detail_share_button_tappedevent should be tracked withsource: more_menuand a share sheet should be shownScreenshots
RELEASE-NOTES.txtif necessary.