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

Archive: Allow selecting multiple files #327

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

956MB
Copy link

@956MB 956MB commented Dec 20, 2024

What's new

Addresses #254

As discussed in that issue, this implements multiple file/folder selection in the Archive file browser. With some personal design choices for the list selection indicators that can be changed if needed.

  • Files and folders in different locations can be selected and then actions done on them (Cut, Copy, Paste, Delete)
  • A check is used to make sure the destination path is not a child of one of the selected files/folders, and an error dialog is shown if tried.
  • List items in the browser have either a regular indicator [+] (for files or entire folders), or a number [2] to show the amount of selected files in a folder.
  • The setting Interface > File Browser > Selection Indicator was added to change which character is used in the selected file indicator: +, * or -. (These can also be changed or more added.)
  • When a folder has files selected inside it and shows a [3] indicator, the folder itself can be selected and all the files inside it are deselected and the folder shows a [+].
  • Renaming a file while in select mode is also possible, but it works on one at a time. Not all the selected files.

Keybinds for the "select mode" are as follows:

  • left: deselect
  • right: select
  • click OK: enter folder
  • hold OK: opens Actions/Manage menus
  • back: exit folder

This set of keybinds allows for selecting files and folders the same way and the ability to enter folders for its contents. as mentioned in the issue comments.

Couple of other things I'd thought of doing but haven't yet (TODO):

  1. Make the Select "badge" text at the top of the status bar also show the amount of selected files, like this Select (4).
  2. Add a scrollable list to the delete screen when theres more than one file being deleted. Gives you a second to see the files about to be deleted rather than "Delete 5 files?".

Screenshots

Delete files in multiple folders

delete_files_in_multiple_folders

Copy folder and file

copy_folder_and_file

Copy files and delete

show_selected_files_and_delete

Rename selected file then delete

rename_selected_file_then_delete

Nested path error dialog

nested_path_error


For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

Allows selecting both files and folders at the same time to perform
actions on. Selected files are either moved to clipboard for the
`Cut`/`Copy` and `Paste` actions, or deleted with `Delete`. `Rename`
action still only works on single file, but that file can be in the
multi selection.
- New file list widget was created to show the to-be-deleted files on the delete screen, rather than just "Delete n files?" It's also scrollable.
- 'Select' action menu option was removed from the favorites tab since favorites already have a mechanism for that stuff.
@956MB
Copy link
Author

956MB commented Dec 22, 2024

I updated the delete screen with a new file list widget. It's scrollable up/down but the files are obviously not selectable with a cursor or anything. They're just there as a visual confirmation of what you're about to delete. Of course it's up to whoever in charge whether it should be in there of not, but I think it's helpful. Fills out the empty space too.

Screenshot 2024-12-21 at 7 21 49 PM

- File list now accounts for `.js` files and uses correct icon
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.

1 participant