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

File picker should support multiple selection #4181

Open
wildasin opened this issue Jan 20, 2025 · 6 comments
Open

File picker should support multiple selection #4181

wildasin opened this issue Jan 20, 2025 · 6 comments
Assignees
Milestone

Comments

@wildasin
Copy link

Describe the bug
There appears to be no way to import more than one .zim file at a time into the library.

Expected behavior
When picking files to add to the library, it should be possible to select more than one by long-pressing several file icons in succession. Ideally, it would be possible to drag to select a range of files a la Google Photos, and a Select All would be provided.

Steps to reproduce the behavior:

  1. Click '+' in the Library.
  2. Long-press a file icon to select it.
  3. Long-press a second file icon.
  4. The first file becomes deselected in favor of the second; it is not possible to have more than 1 selected.

Environment

  • Version of Kiwix Android : 3.13.0
  • Device : Galaxy Tab A9+
  • OS version : 14
@kelson42
Copy link
Collaborator

The idea is good, but at this stage not sure this is worth the complexification of the code.

@kelson42 kelson42 self-assigned this Jan 20, 2025
@wildasin
Copy link
Author

It looks like this started to get implemented, because long-pressing a file selects it and it says "1 Selected".

An interim solution that might require less UI development effort might be to long-press the enclosing folder (from one level up in the tree) and be able to add it in one shot.

@wildasin
Copy link
Author

When considering how to prioritize this issue, it might help if I described my user journey. I'm not sure if it's common but I don't think it's too odd.

When I found out about Kiwix the other day I decided to load up a 1TB SD card to install on my tablet. I set up the various torrents and web downloads to grab most of the available ZIMs, which took about a day but operated unattended.

Once all these files were on the SD card, I expected to be able to open them up in Kiwix and use them; however, between this issue and #4182 it will be at least another day of fairly intensively babysitting my tablet, when it could easily have been accomplished in seconds.

@MohitMaliFtechiz
Copy link
Collaborator

MohitMaliFtechiz commented Jan 24, 2025

@kelson42 This feature is easily implemented for the full version of Kiwix as there is no need to copy/move the ZIM files, and selected ZIM files will easily show on the library screen. However, for the PS version, we have to fully handle all selected ZIM files. The current situation is handling the single file. So we have to handle these scenarios:

  1. Show a list of ZIM files in the UI that the user selected(In dialog dialog).

  2. When the user copy/move ZIM files, we will need to copy/move the ZIM files one by one(and should the progress of number of copied/moved ZIM files), and if any error occurs in copy/move we have to handle those scenarios.

    • If the device does not have enough storage, it should show the storage selection dialog and copy/move the other ZIM files in the chosen storage.
    • If there is some other error that occurs while copy/move then it should continue to copy/move other ZIM files and show the error at last of the operation that these ZIM files failed to copy/move so that the user can again try to copy/move ZIM files.
    • Also, we have to handle the failed operation, if the user chooses copy and some error happens it should delete the temp copied file. Same for move operation.
  3. When user selects the multiple ZIM files then opening the ZIM file in the reader will skip as the user wants to load the ZIM files in the application.

@salehdemir
Copy link

Can you please assign me this issue ?

@kelson42
Copy link
Collaborator

kelson42 commented Feb 2, 2025

@salehdemir Wir are not ready to implement this now as the workflow is still in discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants