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

Add progress indicator for initial load of web app #246

Open
TimJentzsch opened this issue Jan 25, 2025 · 1 comment
Open

Add progress indicator for initial load of web app #246

TimJentzsch opened this issue Jan 25, 2025 · 1 comment
Labels
A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@TimJentzsch
Copy link
Collaborator

The Wasm binary of a Bevy app can be quite big, especially in debug mode. This can result in significant loading times for the website.

We should check if we can add a simple progress indicator to the loading to improve the user feedback.

The server might provide a content-length header indicating the total size of the binary, which we can then use to calculate the progress.

As we only control the dev server and not the deployed version, the implementation should gracefully handle if the server doesn't provide the required data.

@TimJentzsch TimJentzsch added A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-for-Implementation This issue is ready for an implementation PR. Go for it! labels Jan 25, 2025
@TimJentzsch
Copy link
Collaborator Author

This might actually be quite complex. We download the binary with async import right noe, which AFAIK doesn't provide any callbacks for reporting progress.

Even with fetch it's complicated, because content-length will be the size of the compressed data (if e.g. gzip is used), but on the client we can only track the downloaded uncompressed data https://stackoverflow.com/a/64123890

@TimJentzsch TimJentzsch added D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-for-Implementation This issue is ready for an implementation PR. Go for it! labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Run Related to the bevy run command A-Web Building or running Bevy apps targeting the browser C-Usability An improvement that makes the API more pleasant D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

1 participant