You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Shopify App with app-bridge v.4, any relative links from Polaris components (Link, Button, etc) are opening in a new tab, and not using the proper shopify admin store URL.
Using the boilerplate Ruby shopify app from the app template (https://github.com/Shopify/shopify-app-template-ruby), I create a Polaris link like this: <Link url="/pagename">Click Me</Link> and then click the link.
Expected behavior
Clicking the polaris Link element above should change browser URL to: https://admin.shopify.com/store/mystore/apps/my-app/pagename (not opening new tab)
Actual behavior
Clicking the link opens a new tab, with URL: https://<cloudflare-tunnel-host>/pagename.
This URL is not using the shopify store URL at all -- it is just using the underlying Rails host name. It seems to be totally bypassing the React router.
This worked fine with App Bridge V3 --- since in the PolarisProvider.jsx class, it was using the AppBridge navigate() method. Now with AppBridge v4, that same class is now calling window.open(url) which ends up opening a new tab.
Steps to reproduce the problem
Create a new Shopify App (ruby) using the Shopify App Template for Ruby
Add a Polaris Link element to an internal app page (e.g. /pagename)
Click the link in the app UI
The text was updated successfully, but these errors were encountered:
Issue summary
Before opening this issue, I have:
shopify_app
version: 22.4.0log_level: :debug
in my configuration, if applicableUsing Shopify App with app-bridge v.4, any relative links from Polaris components (Link, Button, etc) are opening in a new tab, and not using the proper shopify admin store URL.
Using the boilerplate Ruby shopify app from the app template (https://github.com/Shopify/shopify-app-template-ruby), I create a Polaris link like this:
<Link url="/pagename">Click Me</Link>
and then click the link.Expected behavior
Clicking the polaris Link element above should change browser URL to:
https://admin.shopify.com/store/mystore/apps/my-app/pagename
(not opening new tab)Actual behavior
Clicking the link opens a new tab, with URL:
https://<cloudflare-tunnel-host>/pagename
.This URL is not using the shopify store URL at all -- it is just using the underlying Rails host name. It seems to be totally bypassing the React router.
This worked fine with App Bridge V3 --- since in the PolarisProvider.jsx class, it was using the AppBridge
navigate()
method. Now with AppBridge v4, that same class is now callingwindow.open(url)
which ends up opening a new tab.Steps to reproduce the problem
Link
element to an internal app page (e.g./pagename
)The text was updated successfully, but these errors were encountered: