Skip to content

Conversation

@meisekimiu
Copy link
Contributor

@meisekimiu meisekimiu commented Nov 12, 2024

Asynchronous calls caused by the confirmation dialog that pops up when a user uploads into the public workspace ended up causing some objects to preemptively go out of scope. To fix this, copy the FileSystemEntries from the DataTransferItemList before any async calls so we can pass it directly into UploadService.uploadFolders. It seems like we cannot copy the DataTransferItemList directly, but since we only want the FileSystemEntries anyway, we can just save that instead.

I wasn't able to recreate the in-browser deletion behavior in tests with our mocks but if anyone has any ideas I'd be happy to try again.

Stepz 2 Test:

  1. Try uploading a folder into public and verify it works
  2. Make sure uploading an individual file also works in public
  3. Verify that uploading in the private workspace still works as well.

@meisekimiu meisekimiu force-pushed the public-upload-folders branch 2 times, most recently from f5e814e to 315ed8b Compare November 12, 2024 21:35
@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 42.58%. Comparing base (d547367) to head (13bf487).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/app/core/components/main/main.component.ts 60.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
- Coverage   42.74%   42.58%   -0.16%     
==========================================
  Files         357      357              
  Lines       10982    10984       +2     
  Branches     1795     1795              
==========================================
- Hits         4694     4678      -16     
- Misses       6127     6146      +19     
+ Partials      161      160       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Asyncronous calls caused by the confirmation dialog that pops up when a
user uploads into the public workspace ended up causing some objects to
preemptively go out of scope. To fix this, copy the FileSystemEntries
from the DataTransferItemList before any async calls so we can pass it
directly into `UploadService.uploadFolders`. It seems like we cannot
copy the DataTransferItemList directly, but since we only want the
FileSystemEntries anyway, we can just save that instead.

PER-9879: Dragging a folder into the Public workspace doesn't work
@meisekimiu meisekimiu requested a review from k8lyn6 November 12, 2024 21:55
@k8lyn6 k8lyn6 requested a review from yeslikesolo November 12, 2024 22:10
Copy link
Collaborator

@yeslikesolo yeslikesolo left a comment

Choose a reason for hiding this comment

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

Tested all 3 scenarios, they worked great!

@meisekimiu meisekimiu merged commit ec042eb into main Nov 14, 2024
8 checks passed
@meisekimiu meisekimiu deleted the public-upload-folders branch November 14, 2024 17:41
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.

4 participants