fluxxcode / egui-file-dialog

Full featured and customizable file dialog for egui
MIT License
78 stars 10 forks source link

Ability to manually enter path #55

Closed crumblingstatue closed 6 months ago

crumblingstatue commented 7 months ago

It's common for me to manually enter a path, and navigate using the file dialog from there. For example, enter /home/me/mystuff manually, and then use the dialog from that point on. This is a commonly supported feature of file dialogs.

fluxxcode commented 7 months ago

The feature is already on my list. But I'm not sure how best to implement this. I see two approaches here at the moment:

  1. Adding an edit button next to the reload button in the top bar. If you press this, the current path display with the individual buttons for the segments becomes a text edit field where the path can be edited. Advantage: It's easy to understand. Disadvantage: We need more space in the top bar.

  2. After the last segment in the current path, we define an area that can be pressed and then the path changes to a text field. Advantage: We save space and a button in the top bar Disadvantage: Not really easy to understand and you have to somehow visualize to the user that you can press there. Additionally, as the path becomes long and takes up the entire field, the area to press becomes quite small.

crumblingstatue commented 6 months ago

Some other options:

fluxxcode commented 6 months ago

I like the shortcut /. But I'm not sure how well this fits on Windows 🤔 😄

I had actually already planned hamburger menu for show/hide folders :D But I think it's not that good from a UX perspective if you have to go to a submenu to edit the path.

Instead, I thought about putting a small button at the end of the current path display. I think in combination with the shortcut that should be enough.

Quick poc: Screenshot_20240223_211450

fluxxcode commented 6 months ago

The path edit functionality is now implemented. I decided on the button at the end of the current path. See the PR #85 for a demo!

I haven't implemented a shortcut to open the path edit yet. I will implement shortcuts and keyboard input all at once. For this I use the following issue: https://github.com/fluxxcode/egui-file-dialog/issues/70