-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat!(?): Do not remove loader unless explicitly required #699
Conversation
209362b
to
4ffe146
Compare
@MartinZikmund I don't think there are, though we must ensure that the loader actually removes itself when not using uno.ui. |
@jeromelaban Is there any way to check if the app is Uno.UI-based? Alternatively it could be a flag in the manifest like "shouldRemoveLoader" that would be |
@MartinZikmund I've added the PR validation to see the result.. The new behavior has to be opt-in only, and it may be disabled when some flag has been set (optionally by Uno.UI). |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-river-0087b630f-699.eastus2.1.azurestaticapps.net |
It seems to work in the sample. The change applies only in case the HTML contains the loader inside of |
@jeromelaban is this mergeable? |
I think it is! |
…RootVisual` background (#11864) In tandem with unoplatform/Uno.Wasm.Bootstrap#699 this should ensure no flickering of white color will show up on Android, iOS, macOS and WASM. This does not help on Skia yet unfortunately, as there is no splash screen yet.
This change undoes the Persistent background changes made in #692, because it turns out they are not the crux of the problem.
When the WASM app loads, after the bootstrapper is done, it currently removes the loader (
.uno-loader
) and then the app itself is initialized. This takes a few hundreds of milliseconds after which Uno itself creates its own "loader" (#uno-loading
). Unfortunately, those milliseconds are a problem - as they mean that a plain white background will flash there which is very jarring.This PR changes the default behavior of the bootstrapper to keep the
.uno-loader
in place even after initialization is done until some child is actually added touno-body
. This means that it will stay displayed while the actual app is loading, and when it indeed adds its#uno-loading
element it should remove bootstrapper's.uno-loader
afterwards.Question for @jeromelaban - is this actually a breaking change? Are there any non-Uno apps which would not add content to
.uno-body
- resulting in the loader not disappearing?