Closed charles-tyler closed 1 year ago
Hi Charles! Thanks for the bug report.
I tried to reproduce this and was unable to. Could you share some more information about the problem you're seeing? In particular:
ResourcePicker
with?ResourcePicker
?We are initializing it with the following;
We open with our own component for the Resource picker using:
const openProductPicker = () => {
return getResourcePicker({
app,
selectMultiple: 10,
showDraft: false,
showArchived: false,
initialSelectionIds: getInitialSelectionIds(),
handlePayloadData: handleResourcePickerData
})
}
Component getResourcePicker
import { ResourcePicker } from "@shopify/app-bridge/actions"
const getResourcePicker = ({
app,
pickCollection = false,
showHidden = true,
showVariants = true,
showDraft = true,
showArchived = true,
showDraftBadge = false,
showArchivedBadge = false,
selectMultiple = 10,
initialSelectionIds = [],
handlePayloadData = () => {}
}) => {
const productPicker = ResourcePicker.create(app, {
resourceType: pickCollection? ResourcePicker.ResourceType.Collection: ResourcePicker.ResourceType.Product,
options: {
showHidden,
showVariants,
showDraft,
showArchived,
showDraftBadge,
showArchivedBadge,
selectMultiple,
initialSelectionIds
},
})
productPicker.dispatch(ResourcePicker.Action.OPEN)
productPicker.subscribe(ResourcePicker.Action.SELECT, handlePayloadData)
}
export default getResourcePicker
I'm not able to reproduce this bug, either in our internal testing app or in EasyScan on my shop. See video:
https://user-images.githubusercontent.com/5873610/222210730-e02330b8-1fa2-4c65-87ba-83e50827077c.MP4
Can you share what shop you're using for testing? I can try to reproduce the bug there.
@charles-tyler determined that the issue happens specifically when selecting every variant of a product, and I was able to reproduce that case.
Looking at a fix now.
@charles-tyler We have a fix up but missed the release candidate cut off time this week. Can you filter duplicate variantIds from your end as a temporary workaround please? 🙇
Reopening to verify once it's in the mobile build next week.
@charles-tyler This should now be fixed in the latest version of the app, v9.102
. Please reopen the issue if you're still having trouble.
Describe the bug
Product resource picker returning duplicate product information on iOS.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Expected one item to be returned, however in a recent iOS Shopify app update two items are returned.
Not present in the POS app.
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@3.7.0
@shopify/app-bridge-react
@3.7.0
@shopify/polaris
@6.2.0
Platform
9.100.0