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

Create new project with default "Create folder" selected, not working in Godot 4.3.* #93973

Open
jjmontes opened this issue Jul 5, 2024 · 17 comments · Fixed by #94015 · May be fixed by #95262
Open

Create new project with default "Create folder" selected, not working in Godot 4.3.* #93973

jjmontes opened this issue Jul 5, 2024 · 17 comments · Fixed by #94015 · May be fixed by #95262

Comments

@jjmontes
Copy link

jjmontes commented Jul 5, 2024

Tested versions

  • Reproducible in: v4.3.dev5.official [c9c17d6], v4.3.dev6.official [64520fe], v4.3.beta1.official [a4f2ea9], v4.3.beta2.official [b75f048]
  • Not reproducible in: previously versions (is a new attribute)

System information

Ubuntu 22.04.4 LTS - Godot v4.3.beta2.official [b75f048]

Issue description

When creating a new project, the "Create Folder" option is selected by default, but it is not working.
New proyect

If I leave the option checked (as it comes) and press the CREATE AND EDIT button, it creates the project without creating a new folder with the project's name. However, if before pressing the CREATE AND EDIT button I uncheck and recheck the "Create Folder" option, in that case, it does create the folder.
Video for new proyect

Steps to reproduce

Test 1

  1. Start Godot
  2. Press the button to create a new project
  3. If necessary, change the project's name (if a project with the default name already exists)
  4. Press the Create and Edit button
  5. Verify that the project was created in the "Project Path" folder and not within the "Project Name" folder.

Test 2

  1. Start Godot
  2. Press the button to create a new project
  3. If necessary, change the project's name (if a project with the default name already exists)
  4. Uncheck the "Create Folder" option
  5. Recheck the "Create Folder" option
  6. Press the Create and Edit button
  7. Verify that the project was created in the "Project Name" folder within the "Project Path" folder (Expected behavior)

Possible fixes:

  1. Have the "Create Folder" option appear unchecked by default.
  2. Ensure the internal value used by the editor is set to TRUE when the screen starts.

Minimal reproduction project (MRP)

no MRP, only video to see bug
Grabación de pantalla desde 05-07-24 11:27:01.webm

@Grublady
Copy link
Contributor

Grublady commented Jul 5, 2024

Reproducible on 4.3.beta2 & 4.3 master [b97110c] on macOS 15.0.
The issue seems to only occur when a trailing slash is included in the project path:

Screen.Recording.2024-07-05.at.15.06.16.mov

Perhaps some form of sanitization could make the behavior consistent.

@akien-mga akien-mga changed the title Create new proyect with default "Create folder" selected, not working in Godot 4.3.* Create new project with default "Create folder" selected, not working in Godot 4.3.* Jul 7, 2024
@akien-mga akien-mga moved this from Unassessed to Not Critical in 4.x Release Blockers Jul 7, 2024
@jjmontes
Copy link
Author

jjmontes commented Aug 2, 2024

The bug continue in 4.3 rc 2.
Folder is not empty, "Ruta de proyecto" hasn't end with slash and "Crear carpeta" option is checked:
imagen

but when I push "Crear y editar" button, show the next popup:
imagen

If I push "OK" button, then the proyect is created in folder "Ruta de proyecto" (/media/jjmontes/SeagateExpansionDrive/jjmoa/Godot/4.3.0-rc 2/Proyectos/)
imagen

The expected behavior was that it would be created within the indicated folder (/media/jjmontes/SeagateExpansionDrive/jjmoa/Godot/4.3.0-rc 2/Proyectos/LogiFive)

@Grublady
Copy link
Contributor

Grublady commented Aug 2, 2024

This looks like there may be a discrepancy in expected behavior—

  • The current implementation uses the Project Path/Ruta del Proyecto field as the source of truth for the destination folder, and uses the Create Folder/Crear Carpeta toggle as a means to control this field.
  • The issue seems to expect that the destination folder is dynamically produced from the Project Path/Ruta del Proyecto and the state of the Create Folder/Crear Carpeta toggle; ie Project Path does not directly correspond to the destination folder.

Is it documented somewhere how this is supposed to behave?

@jjmontes
Copy link
Author

jjmontes commented Aug 2, 2024

Until version 4.2.stable, when you indicated that you wanted to create a new project, the screen that appeared was this one:
imagen

If you notice, the difference between version 4.2.stable and 4.3 RC 2 is that in 4.2.stable there was a button ("Create Folder") that, when pressed, created the "Project Name" folder in the "Project Path"; in version 4.3 RC 2, the "Create Folder" button was removed and a "checkbox" was added to indicate whether or not you want to create a folder. I infer, based on what existed in version 4.2 compared to what is now, that if it is checked, the project is created in "Project Path" + "Project Name," and if it is unchecked, it is created in the "Project Path."

I haven't found documentation about this regarding version 4.3.

@Grublady
Copy link
Contributor

Grublady commented Aug 3, 2024

It looks like this functionality was proposed in godotengine/godot-proposals#4749.

According to that proposal, the current implementation works correctly.

A similar concern about this feature being unintuitive was raised in this comment on the related PR.

Perhaps the proposal should be reopened for further discussion? I'm somewhat unfamiliar with Godot's proposal process, maybe a maintainer can clarify

@Gearyandres94
Copy link

Reproducible on Godot 4.3RC2 on Windows 10.
It seems to be an error when you write the path to the selected folder. If you choose it with the modal of choose folder it works

@akien-mga akien-mga moved this from Not Critical to Bad in 4.x Release Blockers Aug 6, 2024
@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2024

Create Folder button toggles appending the project name to path:

godot.windows.editor.dev.x86_64_KSDpUzJoCz.mp4

The project name is appended automatically when you Browse path:

godot.windows.editor.dev.x86_64_eJz6khxUH5.mp4

The only case when it "doesn't work" is when you manually modify the Path field.

We can:

  • disable Path field when Create Folder is enabled
  • use the Path only as base, not a final path

Note that for the latter option we still need to show the project's folder name somehow, so it would be a new label somewhere.

@jjmontes
Copy link
Author

jjmontes commented Aug 7, 2024

I would think of it differently; instead of appending the "Project name" input box text to the "Project path" input box text, simply, at the moment of pressing the "Create & Edit" button:

  • If the "Create folder" toggle is active, create the folder "Project name"/"Project name" and save the Godot project files inside it.
  • Otherwise (if the toggle is inactive), create the "Project name" folder and save the Godot project files inside it.

This way, it would work well for all cases.

@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2024

The project name appended to path follows the project naming style set in editor settings. Thus having a preview of the name is needed, otherwise users would be confused why their folder is named differently.

@akien-mga
Copy link
Member

The UX problem here is that "Create Folder" does two things:

  • Generate a folder name based on the project name
  • Create the folder

Users may want to create a folder, but customize the name of that folder.

So I think it should behave somewhat like this:

  • The generated folder name should be shown in the path
  • The path can be edited manually
  • "Create folder" creates the folder regardless of whether it's generated or not

What would prevent this from working currently?

@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2024

The generated folder name should be shown in the path

You mean like it does currently? The problem is that the path can be changed to an existing, non-empty folder. Currently it results in a warning. We can't modify the Path field when user changes it manually.

@comminux
Copy link

comminux commented Aug 7, 2024

@KoBeWi

What do you think about if a user manually inserts a shared path for their projects folder from the clipboard and with the "Create folder" option enabled, the project name is added at the end of the project path field?

@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2024

LineEdit has no signal for pasting text from clipboard, so manually appending something would make it impossible to write in the field (the text would change each time you type a character).

@comminux
Copy link

comminux commented Aug 7, 2024

It turns out that then it will be possible to update the path after insertion only when using text_submitted signal (Paste the copied path and confirm with the Enter key)?

@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2024

image

@Grublady

This comment has been minimized.

@KoBeWi KoBeWi linked a pull request Aug 7, 2024 that will close this issue
@akien-mga akien-mga modified the milestones: 4.3, 4.4 Aug 7, 2024
@jitspoe
Copy link
Contributor

jitspoe commented Oct 23, 2024

I always type in the project base path, so the "Create Folder" checkbox has legit never worked for me. The old button worked. I would expect it to just tack on the project name as a subdirectory of whatever I typed in. Not being able to type in the directory if I want to have it generate the folder is a pain, especially since it defaults to the documents directory and I have a godot projects directory I have all my quick test projects in.

Can't you just tack it on as soon as you go out of the project path edit box or change the project name? Could possibly even add it to the right of the cursor as you're typing, as long as the string to the right matched the new folder string. Just feels super janky and broken right now.

Edit: Also, if I type in "E:\projects\godot" then click browse to quickly fix the directory not creating, it brings up the file dialogue to "E:\projects". If "Create Folder" is unchecked, it will open to "E:\projects\godot" as expected.

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