Skip to content

Conversation

@marlenhalvorsen
Copy link

Issue:
Closes #17845

Changes:

  • Adds subtitle "Enter an item name" in create-item dialog
  • Sets default name to "New folder" when creating folder
  • Selects name by default to allow fast rename

Test steps:

  1. Launch Files (debug build)
  2. Create new folder via Ctrl+Shift+N
  3. Check that:
    • The dialog shows subtitle "Enter an item name"
    • "New folder" is prefilled
    • Text is fully selected on open

@yaira2 yaira2 added the ready for review Pull requests that are ready for review label Dec 8, 2025
@yaira2
Copy link
Member

yaira2 commented Dec 8, 2025

@marlenhalvorsen it looks like this is missing the Enter an item name subtitle. Can you adjust this?

@marlenhalvorsen
Copy link
Author

Subtitle added. “Enter an item name” now appears correctly in the create-item dialog.

@yaira2
Copy link
Member

yaira2 commented Dec 9, 2025

Thanks! Should we apply this change for other file formats as well?

@marlenhalvorsen
Copy link
Author

Thanks for the suggestion!

I've looked into the handling of itemType in GetFor_CreateItemDialog, and currently the dialog only receives two categories: "Folder" and "File". All file templates (e.g. .pptx, .xlsx, .txt) are mapped to "File" without any specific extension or template metadata.

Because of this, only the folder case can receive a unique default label at the moment. Differentiating per file type (e.g. "New .pptx", "New .xlsx") would require passing additional ShellNewEntry/extension information into the dialog.

@yaira2
Copy link
Member

yaira2 commented Dec 9, 2025

Thanks for checking. We can merge as is and can reconsider if we receive more feedback regarding other file formats.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Dec 9, 2025
@yaira2
Copy link
Member

yaira2 commented Dec 9, 2025

Alternatively, we can use "New document" for other file formats.

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

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Creating a folder should have new folder as name by default

2 participants