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

Rework creating new folders in editor #97075

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Sep 16, 2024

Inspired by #93372 (comment), this makes EditorFileSystem responsible for creating new folders.

I also added update_all() method to FileSystemDock. I needed it for something, but it ended up as simple helper.

@KoBeWi KoBeWi added this to the 4.4 milestone Sep 16, 2024
@KoBeWi KoBeWi requested a review from Hilderin September 16, 2024 14:11
@KoBeWi KoBeWi requested review from a team as code owners September 16, 2024 14:11
@KoBeWi KoBeWi force-pushed the better_new_folder_(not_to_be_confused_with_new_better_folder) branch from be66115 to d9c0dfb Compare September 16, 2024 14:25
@Hilderin
Copy link
Contributor

I like it. The flow seems really better to me!!!

@Hilderin
Copy link
Contributor

Hilderin commented Sep 16, 2024

I found 2 little issues:

Issue 1

  • Click create folder
  • Input test/test but do not press OK
  • Go create the folder test and subfolder test via File Explorer
  • Got back to Godot and press OK
  • The folders will be duplicate:
    image

Issue 2:

  • Click create folder
  • Input test but do not press OK
  • Go create the folder test via File Explorer
  • Got back to Godot and press OK
  • I expected a popup saying that the folder could not be created, but I only got an error in the output:
    image

For the rest, it seems to work perfectly!! Good job, I can't wait to see the other files operations implemented that way. Don't hesitate if you need help for some implementation or some testing.

@KoBeWi KoBeWi force-pushed the better_new_folder_(not_to_be_confused_with_new_better_folder) branch from d9c0dfb to ad99c79 Compare September 17, 2024 10:40
@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 17, 2024

  1. fixed
  2. it's a pre-existing behavior. Seems to be a bug with DirCreateDialog, which validates path before attempting to create the folder.

Copy link
Contributor

@Hilderin Hilderin left a comment

Choose a reason for hiding this comment

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

Great!!
Tested and works perfectly, as expected!

@akien-mga akien-mga merged commit ff2b5a5 into godotengine:master Sep 19, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the better_new_folder_(not_to_be_confused_with_new_better_folder) branch September 19, 2024 15:33
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.

3 participants