This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Add loading indicator text when loading large code files #45174
Merged
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.
Fixes #44666
When opening large files, the file download can become quite slow and since we don't use any streaming APIs, the bottleneck is often the time to first byte. To improve the UX in the short term before we can add larger scale fixes to this problem, this PR tweaks the loading experience and adds different subtitles when loading exceeds specific thresholds (1sec, 3sec, 6sec, and 9sec). https://www.figma.com/file/5CgqjaXqrRhquTG6GB3YGd/FE-scale-audit%3A-loading-big-files-in-search-results-list-bogs-down-the-browser-%2344666-WIP?node-id=275%3A1628&t=TaPSg9bCLwiM1A1N-4
Figma: https://www.figma.com/file/5CgqjaXqrRhquTG6GB3YGd/FE-scale-audit%3A-loading-big-files-in-search-results-list-bogs-down-the-browser-%2344666-WIP?node-id=275%3A1628&t=TaPSg9bCLwiM1A1N-4
Test plan
You have to enable heavy network throttling to repro the 9 sec case (100kbps in my case):
loading.mov
App preview:
Check out the client app preview documentation to learn more.