fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
23.97k stars 1.34k forks source link

Text-based path input in file browser #1098

Open Atomotron opened 4 years ago

Atomotron commented 4 years ago

On the Linux default file browser, you can press Ctrl-L to convert the row of buttons that show the current path into a text entry that allows you to cut and paste the present working directory. In addition, the selected file is also put in a text box, so that you can paste in paths copied from elsewhere. Windows also allows the user to cut and paste paths in these two places.

Implementing this here would mean two changes:

andydotxyz commented 4 years ago

When saving a file the file name is already an entry - so I guess that part is already done? Converting the list of buttons to a path string is a nice idea. I think the keyboard shortcut would need to be secondary to some sort of user-facing action, not sure exactly what that is, but with a little design this could be pretty slick.

Atomotron commented 4 years ago

Trying it out, I see that the filename is an entry for saving, but a label for opening. Perhaps the open dialog should be changed for consistency.

The save entry cannot accept a full path, so it does not resolve this issue. If you put in a full path on linux, it still appends the working directory at the front. So that makes the three issues being considered:

andydotxyz commented 4 years ago

I think that the filename label / entry should just be for file names - changing path by typing seems like a different feature, associated with the button row as you suggested before. Allowing text input for "open" seems non-intuituve as you can only open files that exist...

Atomotron commented 4 years ago

The main use case that I'm aiming at is when I have the path of a file in my clipboard, oftentimes copied out of a terminal or another program, and I want to open or save it. The GNOME filebrowser will let you put this full path in to the button-area after converting it to a text entry, as you suggest. On Windows, you can paste in a full path where the currently selected file name is displayed.

andydotxyz commented 4 years ago

It sounds like the GNOME approach is more intuitive than the Windows one. Allowing users to type the filename of a file to open doesn't make sense to me. To add alternative approach to directory selection stands as a good suggestion.

Atomotron commented 4 years ago

As long as it's possible to cut-and-paste a full file path, then this use case will be satisfied.

Allowing users to type the filename of a file to open doesn't make sense to me.

I also don't see why they would want to type it in, but I regularly want to paste a full path (including name) from the clipboard.