Skip to content

Conversation

@xuang7
Copy link
Contributor

@xuang7 xuang7 commented May 5, 2025

Purpose:

Fixes issue #3421 when uploading multiple files at once, only the first upload’s progress box was shown; as soon as it finished, all remaining uploads disappeared. This PR refactors the dataset-detail upload UI so that each file gets its own independent status/progress box.

Changes:

In dataset-detail.component.ts:

  • Push an initializing placeholder into uploadTasks for every file before starting its multipart upload.
  • In the multipartUpload subscription, locate and update only the matching task via
    const taskIndex = this.uploadTasks.findIndex(t => t.filePath === filePath);
  • Update progress, handle errors, and complete each upload per task.
  • trackByTask now returns task.filePath, ensuring Angular renders a separate
    for each upload.
  • Continue to auto-hide a finished task after 3 seconds, without affecting others.

In dataset-detail.component.html:

  • Update file so multiple progress boxes render correctly.

In dataset-detail.component.scss:

  • Wrapped the progress list in a container limited to 25vh with overflow-y: auto to keep it scrollable.

Demonstration:

Upload single file:

1file.mov

Upload multiple files:

3 files:

3files.mov

12 files:

12files.mov

@xuang7 xuang7 self-assigned this May 5, 2025
@xuang7 xuang7 marked this pull request as ready for review May 6, 2025 00:08
@xuang7 xuang7 requested a review from bobbai00 May 6, 2025 02:48
Copy link
Contributor

@bobbai00 bobbai00 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left some comments.

@bobbai00 bobbai00 changed the title Enhance Multi-file Upload Progress Bars Correctly display upload progresses for 1+ ongoing uploading tasks May 6, 2025
@xuang7 xuang7 added this to the https://github.com/Texera/texera/issues/3421 milestone May 8, 2025
@xuang7 xuang7 changed the title Correctly display upload progresses for 1+ ongoing uploading tasks Display Individual Progress Indicators for Concurrent File Uploads May 10, 2025
Copy link
Contributor

@bobbai00 bobbai00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@xuang7 xuang7 merged commit 734c580 into master May 13, 2025
9 checks passed
@xuang7 xuang7 deleted the xuan-multi-file-upload-progress branch May 13, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants