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

Renaming a script without a supported file extension, hides the script without a warning #56805

Closed
duianto opened this issue Jan 15, 2022 · 1 comment · Fixed by #56847
Closed

Comments

@duianto
Copy link

duianto commented Jan 15, 2022

Godot version

v3.4.1.stable.official [aa1b958]

System information

Windows 10 21H1

Issue description

Renaming a script in the FileSystem panel, by removing the file extension .gd

Hides the file from the FileSystem panel, without showing a warning message.

This might seem like it was deleted.
But it's still available in the project directory.

Steps to reproduce

In the FileSystem panel

  • Create a new script file
  • Rename it by removing the extension .gd

Observed

The file disappears from the FileSystem panel.

Expected

A warning message should probably be shown.

Stating that renaming a file without a supported extension, will hide the file in Godot.

It will not be deleted, it's still available in the project directory.

Minimal reproduction project

No response

@jmb462
Copy link
Contributor

jmb462 commented Jan 16, 2022

I've got the logic the detect when such problem will occur.

But I've no idea on what UI is the best to deal with it :

  • a warning icon at the right of the LineEdit with a tooltip explaining the problem (didn't see such icon in godot so may feel not consistant in editor)
  • a label appearing below the lineedit updated before confirming with the OK button (this way is used in script creation dialog but in this rename dialog, there is no space dedicated to such label, would change the dialog size when appears). OK button could also be disabled at this stage if we want to prevent people from renaming with unknown extensions.
  • another confirm dialog after clicking OK, explaining the problem and giving the opportunity to proceed anyway or cancel (coming back to rename dialog).

I wonder if we shouldn't prevent these renaming in dock as there is not option to show hidden files in FileSystem dock.
People who really wants to rename with an unsupported extension could use system file explorer.

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

Successfully merging a pull request may close this issue.

4 participants