Skip to content
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

Display a soft "Loading..." mask until page is ready #4629

Merged
merged 4 commits into from
Jul 10, 2018

Conversation

sharkykh
Copy link
Contributor

@sharkykh sharkykh commented Jul 7, 2018

Fixes #4618.

2018-07-07_21-05-45

Also fixes all the other pages that are not ready when the Vue cloak (v-cloak) is lowered,
Help & Info for example.

I've also tested what happens if there was a javascript error on the page, and the mask was still lowered.
Just in case, I added the handler to manually remove the mask.

@sharkykh sharkykh added this to the 0.2.7 milestone Jul 7, 2018
Copy link
Collaborator

@OmgImAlexis OmgImAlexis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like the way you added this.

@sharkykh
Copy link
Contributor Author

sharkykh commented Jul 8, 2018

@OmgImAlexis
Thanks.

This PR should be merged regardless of our Slack discussion about the setTimeout (for the first mutations not showing up).
We still have to wait for the getConfig action to finish before showing the page.

P.S.

I had a different idea which I couldn't get to work as I wanted it to, unfortunately.
code
2018-07-08_18-54-10

@medariox
Copy link
Contributor

medariox commented Jul 8, 2018

I must say the one with the logo is pretty awesome! But I'm fine with either way 👍

@p0psicles p0psicles merged commit ef96dba into develop Jul 10, 2018
@@ -62,7 +62,12 @@
% endif
<%include file="/partials/alerts.mako"/>
<div id="content-row" class="row">
<div id="content-col" class="${'col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1' if not app.LAYOUT_WIDE else 'col-lg-12 col-md-12'} col-sm-12 col-xs-12">
<div v-if="globalLoading" class="text-center ${'col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1' if not app.LAYOUT_WIDE else 'col-lg-12 col-md-12'} col-sm-12 col-xs-12">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe incorporate this as a separate component?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could try,
but I don't think it's worth the effort because we don't plan on keeping it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep it? You always need to load data right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be much less noticeable when it's a true single page application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants