Repository navigation
feat(wasm): Let the bootstrapper fade its loader out on first frame - #25103
Merged
Merged
Conversation
Call Bootstrapper.dismissLoader when the bootstrapper exposes it, and fall back to removing the persistent loader element for older bootstrappers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013terw2KRvw8e64cogQymUL
ramezgerges
approved these changes
Oct 8, 2026
Xiaoy312
approved these changes
Oct 8, 2026
Contributor
|
Claude finished @MartinZikmund's task in 14s —— View job Review summaryVerdict: Looks good, with one minor suggestion. The change is small and backward compatible, because it feature-detects
Not covered: I didn't test this at runtime. As the PR notes, there is no bootstrapper build with |
| // Newer bootstrappers fade the loader out themselves; older ones don't expose dismissLoader. | ||
| const dismissLoader = (globalThis as any).Uno?.WebAssembly?.Bootstrap?.Bootstrapper?.dismissLoader; | ||
| if (typeof dismissLoader === "function") { | ||
| dismissLoader(); |
Contributor
There was a problem hiding this comment.
Minor: dismissLoader is pulled off Bootstrapper into a local and invoked unbound, so this is undefined inside it. If the bootstrapper implements it as a static method that uses this (e.g. this.something), this would throw. Safer to call it on its owner:
Suggested change
| dismissLoader(); | |
| const bootstrapper = (globalThis as any).Uno?.WebAssembly?.Bootstrap?.Bootstrapper; | |
| if (typeof bootstrapper?.dismissLoader === "function") { | |
| bootstrapper.dismissLoader(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
When removing the bootstrapper's persistent loader after the first rendered frame,
WebAssemblyWindowWrapper.removeLoadingnow callsUno.WebAssembly.Bootstrap.Bootstrapper.dismissLoader()if it exists. Otherwise it falls back to the existing direct element removal.#uno-loadingremoval andpersistBootstrapperLoaderare unchanged.Why
Uno.Wasm.Bootstrap #1097 redesigns the loading screen and adds
dismissLoader(), which fades the loader out and lets custom loaders run their own exit animation. Removing the element directly skips both.Feature detection keeps this backward compatible: older bootstrappers don't expose
dismissLoaderand behave exactly as before.Validation
tsc -p src/Uno.UI.Runtime.WebAssembly.Browser/tsconfig.json --noEmit(TypeScript 7.0.2 via npx): 90 errors both before and after the change, none introduced (pre-existing strict-null noise).dismissLoader.🤖 Generated with Claude Code
https://claude.ai/code/session_013terw2KRvw8e64cogQymUL