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

Make create folder popup support nested folders #76084

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Apr 15, 2023

@timothyqiu timothyqiu added this to the 4.1 milestone Apr 15, 2023
@timothyqiu timothyqiu requested a review from a team as a code owner April 15, 2023 10:47
@adamscott
Copy link
Member

adamscott commented Apr 15, 2023

I'm not sure about the new lines in the description.

I know that showing existing/foo/bar/another/ would be the same as the input, but it feels weird for me and it takes much space.

Edit: just saw the image in the proposal, the Dolphin file manager uses this display.

@KoBeWi
Copy link
Member

KoBeWi commented Apr 15, 2023

It's still weird xd
The info could just say "subfolders will be created recursively" or something.

@timothyqiu
Copy link
Member Author

Updated. The hierarchical preview is removed.

@YuriSizov YuriSizov requested a review from a team April 18, 2023 13:58
void DirectoryCreateDialog::config(const String &p_base_dir) {
base_dir = p_base_dir;
label->set_text(vformat(TTR("Create new folder in %s:"), base_dir));
dir_path->set_text("new folder");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be translated?

Copy link
Member Author

Choose a reason for hiding this comment

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

The name was not translated in the old dialog.

I'm not sure if it is fixed now, but Android export had trouble loading non-ascii paths / filenames.

@KoBeWi
Copy link
Member

KoBeWi commented Apr 20, 2023

The default height can be smaller:
image

@timothyqiu timothyqiu force-pushed the nested-folders branch 2 times, most recently from f6d96a7 to f3c85c9 Compare April 23, 2023 06:22
@timothyqiu
Copy link
Member Author

The default height can be smaller

Updated code. Window::popup_centered() now correctly decides that the height should be 159px. But the window adjusted to around 200px after popup. Any idea what could be the cause?

@KoBeWi
Copy link
Member

KoBeWi commented Apr 23, 2023

Maybe try using reset_size() before popup?

@timothyqiu
Copy link
Member Author

timothyqiu commented Apr 23, 2023

The strange initial height is caused by Label having an unexpected min height when set to AUTOWRAP_WORD.

Setting the status label to not autowrap for now. I'll open an issue for the behavior :( Nevermind, there's already an issue for it, see #47005.

@akien-mga akien-mga merged commit 7b2d142 into godotengine:master Apr 25, 2023
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the nested-folders branch April 25, 2023 08:56
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.

Create Folder popup should support nested folders
5 participants