Open darrynten opened 3 months ago
We are looking into this
Hi @jzazove
I am also facing the same problem when loading some path like /my/new/page
. My app is in react from when I am opening the modal with /my/new/page
route which is also another react app but I have configured it with nginx so that it work with same domain. If I open /my/new/page
direct in browser then it works fine, but when I open it in modal, it keeps showing the spinner. However, I can confirm that all the resources and api calls went successful with expected data.
Hi @jzazove , Facing the same issue as well. My modal basically full of static content but I still see a spinner for for the first 5 seconds.
@GoodJavaJobs I found the solution. We need to include the following in the modal page as well. That will stop the loading on when page gets loaded in modal.
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>
We need to include the following in the modal page as well
@hareshstilyoapps that applies when using the src
attribute.
This issue is about static content already rendered in the modal.
This issue seems to be getting worse.
Now, when showing the ui-modal
with static content the entire "parent" page (current browser url) is re-requested at the time of opening the modal, and a spinner shows for a long time until the exact same document that initiated the call has finished downloading again.
The modal is also now losing styles while waiting for the parent page to finish sending its stylesheet again, showing default browser styles for elements in the modal until the stylesheet has finished downloading.
@darrynten We released a fix for modal custom content, including:
Can you let us know how it goes? Thanks.
Note that: we will preload the modal in a different release.
@henrytao-me In terms of addressing the new issues discovered yesterday, yes, both of those are resolved now.
We look forward to the preloading functionality.
The modal provides such a poor user experience. You have to wait a few seconds for the modal to open basic, already available content, when no src attribute is passed. Not sure how this isn't getting a higher priority?
Any news on this?
Noticed another issue with this, kind of related.
Font-sizes within the modal are huge when using Polaris components. That's because it's using the same breakpoints as the embedded app page, and the modal is small.
It is effectively treating the modal iframe as mobile device size, and applying the large text that Polaris does for mobile, which doesn't match the font-size of the content behind the modal at all, when on desktop.
Not easy to override either as Polaris components use rem sizing which refer back to the size at the HTML document level.
@fabregas4 the mobile-styles issue is already tracked https://github.com/Shopify/shopify-app-bridge/issues/275
I've started getting the following message when opening modals that contain only static content:
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
and
app-bridge.js:1 The modal src is missing App Bridge CDN script tag.
The time it takes to open a modal containing a single <p>
tag is now also somehow longer than when I first opened this issue.
Same issue, any updates?
Same issue, any update on this issue?
I believe I found a temporary solution, is to use Modal from polaris and not from app bridge
this link demonstrates how to use banners inside a modal, and it's using it through polaris.
It worked with me and I think it'll work with type of content other than banner
https://polaris.shopify.com/components/feedback-indicators/banner?example=banner-in-a-modal
@steveroseik I think that's the right answer for the moment unfortunately, despite the Polaris Modal being deprecated. I just implemented it and it works really nice. Hopefully the team get the app bridge Modal working a lot better soon. At least they say they are working on it (https://github.com/Shopify/polaris/issues/11460).
I've started getting the following message when opening modals that contain only static content:
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
and
app-bridge.js:1 The modal src is missing App Bridge CDN script tag.
The time it takes to open a modal containing a single
<p>
tag is now also somehow longer than when I first opened this issue.
Hey @darrynten – thank you for your attention to modals & for raising the issues to us – we are actively working on your feedback (along with others) & appreciate all the details you've provided
Looking at the above post, there are a few things to address:
in terms of the time it takes a modal to render, that's our top priority right now – we're currently working on it (cc @fabregas4)
Any updates on this?
Describe the bug
The
ui-modal
is showing a loading spinner for static contents (i.e. when not using thesrc
attribute)To Reproduce
Steps to reproduce the behaviour:
ui-modal
component to an app with just a single<p>
tag and aui-title-bar
component.show()
on the modal<p>
tag is renderedExpected behaviour
A loading spinner should only ever be shown if the
src
attribute is used when loading remote content as static content is already available when theshow()
method is called.Static content should be rendered immediately like it is with the
Modal
action from v3.Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@cdn
Platform
Additional context
Adding a
variant
to the modal does not make a difference