Skip to content

Feature: Add compression options #10327

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

Closed
cinqmilleans opened this issue Oct 29, 2022 · 21 comments · Fixed by #10524
Closed

Feature: Add compression options #10327

cinqmilleans opened this issue Oct 29, 2022 · 21 comments · Fixed by #10524

Comments

@cinqmilleans
Copy link
Contributor

cinqmilleans commented Oct 29, 2022

What feature or improvement do you think would benefit Files?

Currently, data compression has no options other than file name. Some options are very practical (7z format, compression level, password, ...). Having all this integrated adds significant added value (no need to install third-party software, better integrated context menu, etc.). However, it must be kept simple so as not to confuse the user.

The compression popup only asks for the file name. We could add a button to display options. These options should be explained, for example to understand the advantages and disadvantages of each format.

Requirements

  • Right clicking on any item (or multiple items) displays a menu item to "Add to archive"
    • Clicking this menu item displays a sub flyout with an option to add "folder.zip" (folder is the name of the parent directory
    • There should be a second item in this sub flyout that says "Add to archive". This displays a popup where the user can choose the format and other advanced options.
  • Advanced options modal should have the title "Add to archive"
    • Users can choose the archive name
    • Users can pick the format
    • Users can set a password
    • Users can choose the compression level

Files Version

Version : 2.3.52.0 OS Version: 10.0.22621.675

Windows Version

Windows 11 22621.674

Comments

I can make an example view before implementation to confirm the concept.

@yaira2 yaira2 changed the title Add compression options Feature: Add compression option to set password Oct 30, 2022
@yaira2 yaira2 moved this to 🆕 New in Files task board Oct 30, 2022
@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board Oct 30, 2022
@yaira2 yaira2 moved this from 🔖 Ready to build to 📋 Planning stage in Files task board Oct 30, 2022
@yaira2 yaira2 changed the title Feature: Add compression option to set password Feature: Add compression options Oct 30, 2022
@yaira2
Copy link
Member

yaira2 commented Oct 30, 2022

I think we should do this but setting to planning so that can settle on a UI.

@cinqmilleans
Copy link
Contributor Author

@yaichenbaum Here is a mockup.
Compress1
Compress2
Compress3

archive.mp4

@yaira2
Copy link
Member

yaira2 commented Nov 1, 2022

@cinqmilleans I updated the requirements, what do you think?

@cinqmilleans
Copy link
Contributor Author

@yaichenbaum That seems alright to me. I would add the option to split the archive into maximum file size. It's used a lot. All the other options available are too technical and reserved for experts.

@yaira2
Copy link
Member

yaira2 commented Nov 2, 2022

@yaichenbaum That seems alright to me. I would add the option to split the archive into maximum file size. It's used a lot. All the other options available are too technical and reserved for experts.

What does that look like?

@cinqmilleans
Copy link
Contributor Author

I mean the option to cut into several files (700mb, 4.7gb, ...) is very useful.

@ferrariofilippo
Copy link
Contributor

I think we should also support default options.
We may add a menu in settings for this

@cinqmilleans
Copy link
Contributor Author

I think rather that it is necessary simply to reselect by default the options chosen the previous time. No need to clutter up the settings with this.

@ferrariofilippo
Copy link
Contributor

I think we should add at least a chechbox to ask the user if he wants to save those options

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

I think rather that it is necessary simply to reselect by default the options chosen the previous time. No need to clutter up the settings with this.

I agree that a setting isn't needed. We should start without remembering the options and go from there.

@cinqmilleans
Copy link
Contributor Author

I start the implementation.

@yaira2
Copy link
Member

yaira2 commented Nov 6, 2022

@cinqmilleans thank you! I like the design you shared, I think we can leave out the "More options" button as it seems a little unnecessary.

@yaira2 yaira2 moved this from 📋 Planning stage to 🔖 Ready to build in Files task board Nov 6, 2022
@cinqmilleans
Copy link
Contributor Author

@yaichenbaum Here is a preview of the new compression dialog.

  • The name of the archive is pre-filled with the name of the file, or of the folder if there are several.
  • Available format is zip or 7z. I used a classic combobox. The placement of the dropdown is less aesthetic but the integration is better. The Dropdown displays a description of the format.
  • The splitting size offers named choices (ex: 650Mb - CD).
  • The password displays a peek button when it is not empty.
  • There is no saving options but it can be added later.

I need to modify the glyphs but I don't know which ones to use. Any suggestions are welcome.

AddToArchive

@Josh65-2201
Copy link
Member

Is it possible to add SFX option as a compression method? 7zip program has this option not sure if the library used has it too.

@yaira2
Copy link
Member

yaira2 commented Nov 13, 2022

@mdtauk do you have any feedback on this design? I might suggest changing the title to "Create Archive", the other suggestion would be to make the password textbox a little wider.

What does the splitting size option do?

@Josh65-2201
Copy link
Member

Split size makes it so the if the user has 1GB to archive then selects splitting to 650mb it will make 2 archives no bigger than 650mb

@Tellinq
Copy link

Tellinq commented Nov 13, 2022

I need to modify the glyphs but I don't know which ones to use. Any suggestions are welcome.

image

I was looking at the available glyphs I could use. I figured that arrows pointing to each other could possibly represent compression level, although I feel like there might be a better icon for this representation

Perhaps scissors could represent splitting? I had someone suggest splitting squares icon but I didn't find a glyph ID for that.

Either a lock or something that is similar showing *** might work.

This is actually my first time dealing with Glyph FontIcons. Let me know what you all think!

@Tellinq
Copy link

Tellinq commented Nov 13, 2022

the other suggestion would be to make the password textbox a little wider.

When trying this I first thought that the password box would remain at a static size and end up obstructing most characters. Little did I know that it would actually expand if I put in a significant amount of characters.

I personally think it should be a bit wider than it is right now by default, but I'm glad that it dynamically expands if a user needs to actually put in a larger password.

Upload.from.GitHub.for.iOS.MOV

@mdtauk
Copy link
Contributor

mdtauk commented Nov 13, 2022

I agree the dialog title should be Create Archive, as Add To implies you are using an existing archive and adding to it.

It's there any example of other dialogs using the Settings style of including a Glyph, heading, and enclosing in a group box?

The password field should probably be outside of this, to prevent truncation.

How would this dialog adapt for extracting files from an archive, and other archive management?

@yaira2
Copy link
Member

yaira2 commented Nov 13, 2022

It's there any example of other dialogs using the Settings style of including a Glyph, heading, and enclosing in a group box?

Glyphs should probably be remoed in this case 👍

How would this dialog adapt for extracting files from an archive, and other archive management?

It'll be a separate modal, see #10413 for details (the screenshots there are out of date).

@cinqmilleans
Copy link
Contributor Author

Thanks for all your feedback. Functionality advances.

The current library does not support Splitting for the zip format. The combobox is grayed out when zip is selected.
The progress percentage has been improved to use the one provided by the library. Currently it is only updated between each subfolder.
SFX option is possible but too technical. Maybe change the value used automatically depending on the format.

Repository owner moved this from 🔖 Ready to build to ✅ Done in Files task board Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants