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

Add ability to select a folder instead of just a file #1

Open
javfg opened this issue Jun 14, 2023 · 2 comments
Open

Add ability to select a folder instead of just a file #1

javfg opened this issue Jun 14, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@javfg
Copy link
Contributor

javfg commented Jun 14, 2023

Currently, the File-picker only allows to pick one or multiple files. It would be desirable to be able to pick folders instead.

To implement this, first some decisions have to be made:

  • Can the user pick both files and folders or only one type based on a flag
  • If the folder-picking is exclusive, can multiple folders be picked?

Then, some changes will have to be added to the OwnCloud File-picker code to change the current functionality, which is entering into a folder when clicking it. Folders should show the checkbox for selection, like files, and navigation would have to be done in another way (perhaps showing a 'go inside' button when hovering over a folder?).

After that, the File-picker-wrapper has to be modified:

  • Maybe adding a flag (depending on what is decided)
  • Making sure it works with paths ending in a folder
@javfg javfg added the enhancement New feature or request label Jun 14, 2023
@avivace
Copy link

avivace commented Jul 5, 2023

Can the user pick both files and folders or only one type based on a flag

I would say we start from 2 different "modes". File-picking or folder-picking. A query param like mode can be used to switch between two behaviours. It would still be interesting, as a future interaction, to try to experiment with a "mixed" approach (so able to select both).

If the folder-picking is exclusive, can multiple folders be picked?

Let's start with only one folder selectable.

Both of this also depends on what the backend returns (e.g. if it returns a single link for multiple folders and files selected it may be okay to just allow a mixed approach).

About the navigation: this needs to be checked in the code, but if possible we could just start having checkboxes on folders and leave the "click on folder" as navigation.

@javfg
Copy link
Contributor Author

javfg commented Jul 5, 2023

A query param like mode can be used to switch between two behaviours.

I'd recommend a folderPicker flag that if present, alters the default from regular file picking. This follows the nomenclature already there (like locationPicker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants