[web-console] Improve Samply profile download UX#5853
Conversation
Display download progress immediately and properly Avoid resuming the download when user clicked away from the dialog Unify download dialog between Samply profile and Support bundle Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
3d0cb1f to
0d7198e
Compare
| progress, | ||
| label | ||
| }: { | ||
| progress: { percent: number | null; bytes: { downloaded: number; total: number } } |
There was a problem hiding this comment.
I guess "0" means "unknown"
There was a problem hiding this comment.
Not always. When the download response body is HTTP-compressed the total is not known, so I just show the number of downloaded bytes
| } = $props() | ||
| </script> | ||
|
|
||
| <div class="flex flex-col items-center gap-3 py-4"> |
There was a problem hiding this comment.
No "cancel" button?
It would be nice to be able to stop it if it takes too long
There was a problem hiding this comment.
The cancel button is wired up in usage sites, this component focuses just on displaying the progress
mythical-fred
left a comment
There was a problem hiding this comment.
Missing tests for the new component.
| </span> | ||
| {/if} | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
New shared component with no tests. This is a behavior change — please add Vitest + @testing-library/svelte tests for DownloadProgressDisplay. At minimum: renders progress during download, shows an error state, handles completion. The MetricsTables.svelte.spec.ts file next door is a good model.
Display download progress immediately and properly
Avoid resuming the download when user clicked away from the dialog
Unify download dialog implementation between Samply profile and Support bundle
Testing: manual
Screencast from 2026-03-18 04-16-31.webm