Skip to content

feat: Add loading splash screen with LoadingBar component during app startup#1385

Open
MrDirkelz wants to merge 3 commits intomainfrom
1014-app-add-loading-splash-screen-while-vue-app-is-being-loaded
Open

feat: Add loading splash screen with LoadingBar component during app startup#1385
MrDirkelz wants to merge 3 commits intomainfrom
1014-app-add-loading-splash-screen-while-vue-app-is-being-loaded

Conversation

@MrDirkelz
Copy link
Copy Markdown
Collaborator

No description provided.

@MrDirkelz MrDirkelz linked an issue Mar 18, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@ivanslabbert ivanslabbert left a comment

Choose a reason for hiding this comment

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

update loading animation to be a "running slug", i.e. when the bar is filled from left to right, it starts emptying from left to right, and repeat.

@MrDirkelz
Copy link
Copy Markdown
Collaborator Author

Add query string paramater to singlecontent for SSG so splash does not appear

@MrDirkelz MrDirkelz force-pushed the 1014-app-add-loading-splash-screen-while-vue-app-is-being-loaded branch from ab59936 to 8adee24 Compare March 31, 2026 09:12
Copy link
Copy Markdown
Collaborator

@johan-bell johan-bell left a comment

Choose a reason for hiding this comment

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

Just left comments.

Comment thread app/src/globalConfig.ts
Comment on lines +434 to +439
/**
* True while the app's Startup function is still running. Used to display the loading splash screen.
*/
export const isAppLoading = ref(
!new URLSearchParams(window.location.search).has("nosplash"),
);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Isn't another to check that the app is loading ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Image

Nope

Comment thread app/src/main.ts
app.use(router);
app.use(i18n);
app.mount("#app");
isAppLoading.value = false;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please check that won't create sequencing issue ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This flag can't cause sequencing issues, it's just a notifier to the splash screen that is set before we init to true, then here reset to false, the init function is mostly asyncronous, so this won't run contrary to anything

Comment thread app/src/globalConfig.ts
}
isDarkTheme.value = document.documentElement.classList.contains("dark");
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need this ? Is there a specific reason ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The splash lives outside the scope of the loaded app (before vue was loaded)

@ivanslabbert ivanslabbert requested a review from ChrisTouo April 16, 2026 07:16
Comment thread app/index.html
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Check your prettier code ?

Copy link
Copy Markdown
Contributor

@ivanslabbert ivanslabbert left a comment

Choose a reason for hiding this comment

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

Add the URL query parameter needed to bypass the spash screen (needed for SSG). Remember to document it with the other URL query params

Comment thread app/src/globalConfig.ts
*/
export const isDarkTheme = ref(document.documentElement.classList.contains("dark"));

const systemThemeQuery = window.matchMedia("(prefers-color-scheme: dark)");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add a comment on why we need this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

APP: Add loading splash screen while Vue app is being loaded

4 participants