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

[FileSystem Dock] Add option to show some unsupported files in the dock. #96603

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Sep 5, 2024

Adds editor setting to specify unsupported file extensions to show in the docs, files are opened using OS::shell_open.

Closes godotengine/godot-proposals#10662
Closes godotengine/godot-proposals#677

@bruvzg bruvzg added this to the 4.x milestone Sep 5, 2024
@bruvzg bruvzg changed the title [FileSystem Dock] Add option to show some unsuppored files in the dock. [FileSystem Dock] Add option to show some unsupported files in the dock. Sep 5, 2024
@JekSun97
Copy link
Contributor

JekSun97 commented Sep 5, 2024

As far as I understand, absolutely any files will be shown?

@AThousandShips
Copy link
Member

Any file with an extension specified in the setting

@passivestar
Copy link
Contributor

passivestar commented Sep 5, 2024

Works

image

Also works with symlinks on mac which makes it VCS-friendly (source files can come from elsewhere and still be accessible from godot, including editor plugins)

@bruvzg bruvzg marked this pull request as ready for review September 5, 2024 15:09
@bruvzg bruvzg requested review from a team as code owners September 5, 2024 15:09
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally on Linux, it works as expected.

image

Folder colors are correctly preserved across restarts. Folders and files can be renamed within the FileSystem dock, even if they are within a symbolic link that points outside the project folder (as expected).

Note that Godot is unable to rename symbolic link folders themselves from the FileSystem dock (here, res://symlink_target/ points to /tmp/symlink_target/ which I have write access to):

image

Perhaps this could be handled, or at least specifically detected so that a dedicated error message is shown. Renaming symbolic link files works though.

There's still the question of whether we should have a temporary toggle to display all files in the project folder, regardless of the editor setting that determines which file extensions are shown.

PS: In a future PR, we should see if symlinks can have their text be displayed in italic to mimic how KDE's Dolphin displays them.

@bruvzg
Copy link
Member Author

bruvzg commented Sep 5, 2024

Note that Godot is unable to rename symbolic link folders themselves from the FileSystem dock (here, res://symlink_target/ points to /tmp/symlink_target/ which I have write access to):

I'll take a look tomorrow, probably it's just have hard-coded file handle type check somewhere. #96639

In a future PR, we should see if symlinks can have their text be displayed in italic to mimic how KDE's Dolphin displays them.

We have DirAccess::is_link(path), so should be easy to detect.

For the reference, macOS Finder mark symlinks with the arrow in the corner, and I think Windows do the same, so it might be better option than italic:
Screenshot 2024-09-06 at 00 21 07
#96643

There's still the question of whether we should have a temporary toggle to display all files in the project folder, regardless of the editor setting that determines which file extensions are shown.

There's "Show in file manager" option which should be sufficient for the quick access to all files, and permanently showing all files is unlikely useful.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 6, 2024
@akien-mga akien-mga merged commit 05709b3 into godotengine:master Sep 6, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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