-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui-modal
is showing a loading spinner for static content
#314
Comments
We are looking into this |
Hi @jzazove I am also facing the same problem when loading some path like |
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.
|
@hareshstilyoapps that applies when using the This issue is about static content already rendered in the modal. |
This issue seems to be getting worse. Now, when showing the 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 #275 |
I've started getting the following message when opening modals that contain only static content:
and
The time it takes to open a modal containing a single |
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 (Shopify/polaris#11460). |
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? |
Any update on this ? |
There is no longer spinners in the modals. |
@jzazove This is really great. Thank you for these improvements! |
@jzazove Thanks! Seems to be working well. The only thing I'm noticing as lacking vs the Polaris Modal, now that I've switched it over, is the ability to set loading state on the buttons. On the Polaris Modal, you could do the below and the primary button would display a loading spinner while you're submitting and checking for server-side errors.
The doesn't seem to be an equivalent way to do this using the TitleBar buttons within the app bridge Modal. If there's an easy solution please let me know, otherwise I can raise as a separate issue. |
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 differenceThe text was updated successfully, but these errors were encountered: