-
Notifications
You must be signed in to change notification settings - Fork 579
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
Add loading screen before the comments have been fully loaded #564
Comments
@Miigon Were you able to add the loading screen? I also have the same requirement. |
Well, I decided to migrate to giscus which provides a cool loader. |
I also did the same years ago. Giscus is more actively maintained and uses GitHub discussion instead of GitHub issue |
I added a loading spinner to utterances in my blog: https://github.com/FrostKiwi/treasurechest/blob/b890f015873df326c91a11df90b551680e95c32b/_includes/layout.html#L128 for instance on this article: https://blog.frost.kiwi/analytical-anti-aliasing It boils down to listening globally for a const spinner = document.querySelector('.spinner');
spinner.style.display = 'block';
window.addEventListener('message', (event) => {
if (event.origin.startsWith('https://utteranc.es') && event.data?.type === 'resize') {
spinner.style.display = 'none';
}
}); I have already comments with utterances, actually prefer the comments as issues and can't migrate to giscus. |
Is there a way to add a loading icon before the comments (and preferably also the script itself) have been loaded? Currently it just shows nothing, not even a white block, just 0 height nothingness.
My blog site has lots of readers who are from somewhere with slow connectivity to GitHub so loading the comments will take quite some time. I would like them to know that the comment section exists and it's just not fully loaded yet. Currently most of them don't notice the comment section at all because it's completely hidden before comments are loaded, which takes 5~10s sometimes.
I think it would be logical for a loading screen to be a part of utterances. If not, how could I add one myself if I were to do it that way?
The text was updated successfully, but these errors were encountered: