Skip to content

Feature: Added advanced options when creating archives #10524

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

Merged
merged 29 commits into from
Nov 27, 2022

Conversation

cinqmilleans
Copy link
Contributor

@cinqmilleans cinqmilleans commented Nov 20, 2022

Resolved / Related Issues
This pr improves the creation of compressed archives. Closes #10327.

  1. The dialog has been redone and adds additional possibilities. I tried to stay practical and not technical.
  2. The context menu has been unified with the decompression and offers additional possibilities.
  3. There is no more distinction of the name of the archive according to whether one compresses an element or several.
  4. The progress percentage indication is updated at each percent. Previously, it could never be updated for a large folder.
  5. The compression code has been moved and is no longer static. It should be moved to the backend but the library needs to be updated first.

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

Screenshots (optional)
Archive3
Archive4
Archive5
Archive1
Archive2

@yaira2
Copy link
Member

yaira2 commented Nov 20, 2022

image

I have a couple of questions,

  1. Is there a reason for having compress when selecting an existing archive?
  2. Can the split options be hidden when they aren't available?
  3. Icons in the dialog aren't necessary, can they be removed?
  4. What does the "Do not compress" option do?
  5. Using x:Load instead of Visibility is a good idea and will automatically fix the extra space at the bottom of the dialog.

@cinqmilleans
Copy link
Contributor Author

  1. I changed the rule. The Compression part no longer appears when the selection is a single file which is an archive.
  2. It's changed.
  3. Icons have been removed.
  4. There are 6 levels of compression (Ultra, High, Normal, Low, Fast, None). Currently, the compression is always in Ultra. It's handy to have None because it's very fast to store many files in one to transfer or store. Media files or documents are often already compressed but recompressing them is slow and unnecessary. I put back the 6 levels because, after testing, the Ultra level is very slow (40 minutes for my extreme test, against 4 minutes in Normal). The default mode, including without going through the dialog, is Normal because it is the best compression/speed compromise. We can optionally not display each level for simplicity (Ultra/Normal/Fast/None).
  5. The extra space was intentional to avoid changing the window size. I changed the behavior to no longer have that empty space. I applied x:Load.

Archive6
Archive7

@yaira2 yaira2 changed the title Improves the creation of compressed archives Feature: Added more options when creating archvies Nov 22, 2022
@yaira2 yaira2 changed the title Feature: Added more options when creating archvies Feature: Added more options when creating archives Nov 22, 2022
@yaira2 yaira2 changed the title Feature: Added more options when creating archives Feature: Added advanced options when creating archives Nov 22, 2022
@yaira2 yaira2 force-pushed the CompressArchiveDialog branch 2 times, most recently from 8bbc13f to ad88e9f Compare November 23, 2022 18:35
@yaira2 yaira2 force-pushed the CompressArchiveDialog branch from 3f4e339 to e348c51 Compare November 23, 2022 18:39
@yaira2
Copy link
Member

yaira2 commented Nov 23, 2022

@cinqmilleans I made some adjustments to the UI. Functionality seems good as well but let's wait for a second review.

@hez2010
Copy link
Member

hez2010 commented Nov 24, 2022

Will do the review tomorrow. I'm running out of bandwidth today :)

@cinqmilleans
Copy link
Contributor Author

A few minor edits.

  1. Opening the expander now automatically gives focus to the password field.
  2. Combobox are too short for SplittingSize texts. To correct this problem, the combobox no longer displays the media when it is closed. The size becomes a minimum size because the "Do not split" text will be longer in many languages and it was truncated.

Other available formats are GZip, BZip2, Tar and XZ. I don't really know these formats but only Tar is managed by Files in decompression.

@yaira2
Copy link
Member

yaira2 commented Nov 24, 2022

Other available formats are GZip, BZip2, Tar and XZ. I don't really know these formats but only Tar is managed by Files in decompression.

Can we add support for rar and tar?

@cinqmilleans
Copy link
Contributor Author

You can add tar easily. For rar, you need another library, but also check the licenses. Free compression/decompression softwares doesn't seem to support it.

@yaira2
Copy link
Member

yaira2 commented Nov 24, 2022

Let's support whatever the current library supports 👍

@cinqmilleans
Copy link
Contributor Author

I added support for other formats for compression. These formats do not support splitting. I will try to add them also in unzip (including browse content). This will be done in another pr.

@cinqmilleans
Copy link
Contributor Author

I disabled the other formats. bzip2 and xz don't seem to keep filenames. gz and tar do not support passwords. To decide what to do.

Copy link
Member

@hez2010 hez2010 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Nov 27, 2022
@yaira2 yaira2 merged commit b87f340 into files-community:main Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add compression options
3 participants