Skip to content

[web-console] Improve Samply profile download UX#5853

Merged
Karakatiza666 merged 1 commit intomainfrom
samply-ui
Mar 18, 2026
Merged

[web-console] Improve Samply profile download UX#5853
Karakatiza666 merged 1 commit intomainfrom
samply-ui

Conversation

@Karakatiza666
Copy link
Copy Markdown
Contributor

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

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>
progress,
label
}: {
progress: { percent: number | null; bytes: { downloaded: number; total: number } }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is total always known?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess "0" means "unknown"

Copy link
Copy Markdown
Contributor Author

@Karakatiza666 Karakatiza666 Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No "cancel" button?
It would be nice to be able to stop it if it takes too long

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cancel button is wired up in usage sites, this component focuses just on displaying the progress

@Karakatiza666 Karakatiza666 added this pull request to the merge queue Mar 18, 2026
Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests for the new component.

</span>
{/if}
</div>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Merged via the queue into main with commit 907fc6b Mar 18, 2026
1 check passed
@Karakatiza666 Karakatiza666 deleted the samply-ui branch March 18, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants