Skip to content

Auto focus text field when creating new files and folders #2096

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

FastestMolasses
Copy link
Member

@FastestMolasses FastestMolasses commented Jul 25, 2025

Description

When we create a new file or folder, CodeEdit will now automatically focus the renaming field so the user can directly set the file name in one step.

Files and folders are no longer created immediately, instead a "phantom" file will be represented in the project navigator, and will only actually create the file when the user sets a valid file name.

Lastly, we do not automatically set the file extension for the user.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

auto.rename.mov

@FastestMolasses FastestMolasses self-assigned this Jul 25, 2025
@FastestMolasses FastestMolasses added enhancement New feature or request navigator labels Jul 25, 2025
@FastestMolasses FastestMolasses marked this pull request as draft July 25, 2025 08:02
@FastestMolasses FastestMolasses marked this pull request as ready for review July 25, 2025 18:56
@thecoolwinter
Copy link
Collaborator

This looks great, just needs the lint fix and we can merge!

@FastestMolasses
Copy link
Member Author

@thecoolwinter Looks like just an unrelated issue with the CEActiveTaskTests test

@thecoolwinter
Copy link
Collaborator

I agree, I can't seem to track down why those tests are failing but they appear to be fixed on main. We can merge without those passing tests.

Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

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

Found one bug. If there's a file system event while the new file item is focused, it silently fails to create the file.

Screen.Recording.2025-08-08.at.10.07.30.AM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request navigator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants