Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Bug: react-shopify-app-route-propagator is using the soon to be deprecated iframe name #1150

Closed
vividviolet opened this issue Oct 25, 2019 · 5 comments

Comments

@vividviolet
Copy link
Member

vividviolet commented Oct 25, 2019

Overview

A bunch of apps are utilizing quilt/react-shopify-app-route-propagator to synchronize the app's url with the browser url. This package relies on the iframe name in order to skip the url synch when rendered in modal.

Iframe names are being deprecated as they are unreliable, especially on Mobile, which might not render an iframe at all. It also was always an unadvertised hack added in by 1P developers.

Fix

Use app.getState('context') to figure out whether the app is rendered in a modal

Consuming repo

https://github.com/Shopify/buy-button
https://github.com/Shopify/facebook-marketplace
many more apps: https://github.com/search?q=react-shopify-app-route-propagator&type=Code

@michenly
Copy link
Contributor

michenly commented Oct 28, 2019

@vividviolet I had chatted with @gf3 briefly before about moving both @shopify/react-shopify-app-route-propagator and @shopify/react-app-bridge-universal-provider, and this seems like a good time to do so.

I would like to suggest removing the @shopify/react-shopify-app-route-propagator package all together and move the implementation into @shopify/app-bridge-react.

@shopify/react-app-bridge-universal-provider is a bit more up to debate since it depends on @shopify/react-html

What do you think?

@vividviolet
Copy link
Member Author

Yes, we can take the opportunity to remove this package from quilt. Maybe putting in @shopify/app-bridge-react makes sense. The only thing to note is that we do not support hooks in app-bridge-react yet.

cc @gf3 @iainmcampbell

@gf3
Copy link

gf3 commented Oct 28, 2019

indeed, however we should 😅

@michenly
Copy link
Contributor

my gut feel is that even thought hook version was provided. No one is using it just yet 😬

@iainmcampbell
Copy link
Contributor

Trish moved route propagator to app bridge react in https://github.com/Shopify/app-bridge/issues/1303

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants