godot
godot copied to clipboard
Create `.editorconfig` file only on project creation
Instead of always generating one when missing, this PR creates .editorconfig on project creation.
- Bugsquad edit: Closes #97796.
I agree with changing this to a project creation step.
I'm not fully sold with the UI though, this dialog is already heavy and adding more checkboxes and labels really makes information overload IMO. It might also be an issue on the Android editor where the dialog might again become too tall for screens in landscape mode.
We might need to rethink this UI a bit, CC @Calinou @KoBeWi.
I'm fine with merging this as a first step and have others rework the UX later.
There are a couple of options I can think of, if we don't want the dialog to be too high:
- Move checkboxes on the right, making the dialog wider
- Add foldable categories for Renderer and Metadata files
- Use TabContainer
Not sure if I see any reason for making it optional. It's tiny. And .editorconfig in the form Godot creates should not have any effect on most IDEs (it's only setting encoding, and for Godot projects only supported is UTF-8).
Also, adding this option might create a false impression that Godot supports reading and using .editorconfig (which is probably a good idea, but currently it is not implemented), no one will check tooltips.
@bruvzg I think we could hide the option from the project creation dialog for now and create the file without asking.
But in my opinion it still makes sense to move this step to project creation. Since the inability to delete the file permanently seems to be annoying for some users. And it also has a small chance of unexpected issues in projects.
Not sure if it's related but there is ERROR: Failed to create file "res://.editorconfig".:
- #97377
I agree with not making it optional, but having it only on project creation. Forcefully creating the file when editing pre-existing projects was indeed a concern of mine, and we've indeed see it appearing in unexpected places, like the GDScript test suite.
If some users ask for it, we could later add an editor setting to configure whether to create it, or expose it to the project creation dialog, but for now I think we can consider this is part of the new default files for a Godot project.
Done. This PR now moves .editorconfig creation from every startup to project creation.
Thanks!
See also the previous discussion here: https://github.com/godotengine/godot/pull/96845#issuecomment-2343167316