-
Notifications
You must be signed in to change notification settings - Fork 4
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
Indicate when the proxied page is loading #155
Comments
I think the browser might actually still show a spinner on the tab when the third-party site is loading in an iframe, so this may be a non-issue. I think very likely we should just close this @robertknight |
From some quick testing on my Mac with https://publicvia.hypothes.is/https://www.bbc.co.uk/sport/football/56852632, it seems that Chrome, Firefox and Safari have different behavior in this regard. Chrome and Firefox show the tab in a loading state while the iframe is loading. In Safari on the other hand the loading indicator disappears as soon as the main tab is loaded and the user just sees a blank white space while the iframe content loads. |
This can be implemented by extending the code added for #154. The proxied content sends a |
It would be ideal if we could use the browser's native UI for this in Safari. Unfortunately there is no such API at present (maybe in future). |
In Safari there is no indicator that anything is loading once the main frame has loaded, the user just sees a blank white space where the iframe is. To provide a better experience add a loading spinner in the center of the page above the iframe in all browsers. This is shown until the iframe reports the document metadata to the parent frame for the first time, corresponding to the `DOMContentLoaded` event having been received in the iframe. This is also when the tab title gets set. The loading spinner HTML and SVG have been taken from the `annotation.html.jinja2`, `bouncer.css` and `hypothesis-icon.svg` files in the hypothesis/bouncer repository. All of the resources have been inlined here, which optimizes loading a little, but we could quite easily move them to external resources in future for maintainability. Fixes hypothesis/viahtml#155
In Safari there is no indicator that anything is loading once the main frame has loaded, the user just sees a blank white space where the iframe is. To provide a better experience add a loading spinner in the center of the page above the iframe in all browsers. This is shown until the iframe reports the document metadata to the parent frame for the first time, corresponding to the `DOMContentLoaded` event having been received in the iframe. This is also when the tab title gets set. The loading spinner HTML and SVG have been taken from the `annotation.html.jinja2`, `bouncer.css` and `hypothesis-icon.svg` files in the hypothesis/bouncer repository. All of the resources have been inlined here, which optimizes loading a little, but we could quite easily move them to external resources in future for maintainability. Fixes hypothesis/viahtml#155
When Via HTML is loading a third-party page in an iframe it should display some sort of "loading" placeholder in place of the iframe while the third-party page is still loading. See: hypothesis/via#443 (review)
The text was updated successfully, but these errors were encountered: