Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/WP-724: Mutation Hooks: Compress Files #1009

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Conversation

jmcmillenmusic
Copy link
Collaborator

@jmcmillenmusic jmcmillenmusic commented Nov 15, 2024

Overview

We are working on updating our current mutations to utilize TypeScript and React Query instead of React Redux. This should improve the speed and functionality of all portal systems going forward.

Related

Changes

I converted useCompress.js to useCompress.ts and created a mutation that compresses the selected files into a ZIP file that gets placed in the Root directory.

Testing

  1. Navigate to any folder containing multiple files.
  2. Select 2 or more files and click on the Compress button in the Toolbar.
  3. Click on the Compress button in the modal that appears.
  4. The modal will close, and you get a notification that the ZIP file will be in your Root directory shortly.

UI

image

Notes

  1. Folders cannot be compressed.
  2. The total size of all files to be compressed must be less than 2 GB.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 15.27778% with 183 lines in your changes missing coverage. Please review.

Project coverage is 72.08%. Comparing base (498d801) to head (d9e4bfb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...lient/src/hooks/datafiles/mutations/useCompress.ts 20.61% 104 Missing ⚠️
client/src/utils/getCompressParams.ts 2.22% 44 Missing ⚠️
...ent/src/hooks/datafiles/useDataFilesAllocations.js 0.00% 29 Missing and 1 partial ⚠️
server/portal/apps/workspace/api/views.py 40.00% 2 Missing and 1 partial ⚠️
client/src/redux/sagas/datafiles.sagas.js 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1009      +/-   ##
==========================================
- Coverage   72.68%   72.08%   -0.61%     
==========================================
  Files         534      538       +4     
  Lines       33657    33776     +119     
  Branches     2989     2982       -7     
==========================================
- Hits        24464    24347     -117     
- Misses       8995     9229     +234     
- Partials      198      200       +2     
Flag Coverage Δ
javascript 74.65% <14.69%> (-0.75%) ⬇️
unittests 60.83% <40.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ient/src/hooks/datafiles/mutations/useSubmitJob.ts 100.00% <100.00%> (ø)
client/src/utils/types.ts 100.00% <100.00%> (ø)
server/portal/settings/settings_default.py 0.00% <ø> (ø)
client/src/redux/sagas/datafiles.sagas.js 39.45% <33.33%> (-8.92%) ⬇️
server/portal/apps/workspace/api/views.py 55.83% <40.00%> (-0.25%) ⬇️
...ent/src/hooks/datafiles/useDataFilesAllocations.js 0.00% <0.00%> (ø)
client/src/utils/getCompressParams.ts 2.22% <2.22%> (ø)
...lient/src/hooks/datafiles/mutations/useCompress.ts 20.61% <20.61%> (ø)

@rstijerina
Copy link
Member

Client side tests failing

client/package.json Outdated Show resolved Hide resolved
client/src/hooks/datafiles/mutations/useCompress.ts Outdated Show resolved Hide resolved
client/src/utils/getCompressParams.ts Outdated Show resolved Hide resolved
client/src/hooks/datafiles/mutations/useCompress.ts Outdated Show resolved Hide resolved
@jmcmillenmusic
Copy link
Collaborator Author

jmcmillenmusic commented Dec 9, 2024

Client side tests failing

I'll come back to the tests I skipped once I get the Extract hook working with the new changes we talked about.

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.

2 participants