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 filter & sort to editor file dialog #97344

Merged

Conversation

pafuent
Copy link
Contributor

@pafuent pafuent commented Sep 22, 2024

Closes godotengine/godot-proposals#2721

On EditorFileDialog:

  • Add filter box that only shows folders and files in current directory that match
  • Add sort button to sort files and directories
  • Add a shortcut for CTRL+F for selecting the filter box

Also moved common code between EditorFileDialog and FileSystemDock to it's own file.

This tries to address comments on #48734 and change it to make it compatible with code on master.

Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shortcut doesn't work when the EditorFileDialog is opened from the project manager:

{68B68327-AD51-421B-B1DC-12138134DDD8}

editor/gui/editor_file_dialog.cpp Outdated Show resolved Hide resolved
editor/file_info.h Outdated Show resolved Hide resolved
editor/file_info.cpp Outdated Show resolved Hide resolved
editor/file_info.cpp Outdated Show resolved Hide resolved
editor/gui/editor_file_dialog.cpp Outdated Show resolved Hide resolved
editor/gui/editor_file_dialog.h Outdated Show resolved Hide resolved
editor/file_info.h Outdated Show resolved Hide resolved
editor/gui/editor_file_dialog.h Outdated Show resolved Hide resolved
editor/gui/editor_file_dialog.h Outdated Show resolved Hide resolved
editor/filesystem_dock.h Show resolved Hide resolved
editor/file_info.h Outdated Show resolved Hide resolved
editor/file_info.h Outdated Show resolved Hide resolved
@pafuent pafuent force-pushed the editor_file_dialog_filter_sort branch from 3668ed2 to d8cb252 Compare September 25, 2024 23:18
@pafuent pafuent force-pushed the editor_file_dialog_filter_sort branch from d8cb252 to 8ead241 Compare September 26, 2024 11:04
Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again and works as expected both in the editor and project manager :)
Great work!

editor/file_info.cpp Outdated Show resolved Hide resolved
@pafuent pafuent force-pushed the editor_file_dialog_filter_sort branch from 8ead241 to f037ee5 Compare September 26, 2024 12:39
Closes godotengine/godot-proposals#2721

On `EditorFileDialog`:
 * Add filter box that only shows folders and files in current directory that match
 * Add sort button to sort files and directories
 * Add a shortcut for CTRL+F for selecting the filter box

Also moved common code between `EditorFileDialog` and `FileSystemDock`
to it's own file.

Co-authored-by: fox <[email protected]>
@pafuent pafuent force-pushed the editor_file_dialog_filter_sort branch from f037ee5 to 1637539 Compare September 26, 2024 14:08
@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 26, 2024
@akien-mga akien-mga merged commit 344ce2b into godotengine:master Sep 26, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@pafuent pafuent deleted the editor_file_dialog_filter_sort branch September 26, 2024 19:22
@foxydevloper
Copy link
Contributor

@pafuent Hey! thank you for fixing up and getting this PR merged! glad to see this added :D

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

Successfully merging this pull request may close these issues.

Improve select file dialog with search bar and sort button
6 participants