Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
86 stars 9 forks source link

Renaming POS Link label results in "Unknown Tile" error on Shopify POS smart grid #205

Closed derrickrc closed 1 year ago

derrickrc commented 1 year ago

Currently if an app developer renames a POS Link tile, then it breaks the tile resulting in "Unknown tile" forcing merchants to re-add it to the smart grid. This can be incredibly disruptive for merchants.

PXL_20230515_233801870

derrickrc commented 1 year ago

@henrytao-me @vctrchu just checking in - we are nearing the launch of our first POS UI Extension and want to be able to rename one of our existing POS Link tiles to better distinguish the tiles without breaking functionality. Are you able to help with this issue? Thank you.

pkhanal commented 1 year ago

Added to the backlog.

vctrchu commented 1 year ago

@derrickrc Currently taking a look. and will report back with details when I find anything.

david-mccullars commented 1 year ago

Resolving this will require two steps:

Step 1 - Backend migration

Backend needs to migrate pinning POS Links from the version identifier to the registration identifier. (When a label is changed, new extension versions are created, and the old one is deleted. By using the registration identifier we will effectively pin to the latest version.)

Once this is done the "Unknown Tile" error will be resolved. However, the tile will continue to show the old label until either POS is restarted or another tile modification occurs (e.g. adding a new tile).

Step 2 - POS update

POS needs to update compareSmartGridTiles to more intelligently detect when a POS link has changed to force a re-render of the Home screen.

Bonus Step

As a bonus step, we need to apply the same backend migration to Smart Grid V2. This does not affect merchants today but is necessary for the future.