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

Prefill the file dialog with the old name when renaming a file #1934

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

dawedawe
Copy link
Contributor

@dawedawe dawedawe commented Sep 21, 2023

WHAT

🤖 Generated by Copilot at ca660ec

Added new commands for duplicating and creating files in Solution Explorer. Modified createNewFileDialg function to accept a prefilled parameter for the file path input.

🤖 Generated by Copilot at ca660ec

createNewFileDialog
prefilled with existing file
autumn of copying

✨♻️📁

WHY

I often see myself just changing a few characters when renaming a file. In this scenario, having the old name prefilled in the text box is quite helpful IMHO.

HOW

🤖 Generated by Copilot at ca660ec

  • Add prefilled parameter to createNewFileDialg function to allow editing existing file name (link)
  • Implement "Duplicate file" command by calling createNewFileDialg with prefilled set to last segment of virtual path (link)
  • Implement "New file relative to selected file" and "New file relative to project file" commands by calling createNewFileDialg with prefilled set to None (link, link, link)

@MangelMaxime
Copy link
Contributor

You beat me on this one @dawedawe thank you for sending the PR :)

Copy link
Member

@TheAngryByrd TheAngryByrd left a comment

Choose a reason for hiding this comment

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

🎸

@TheAngryByrd TheAngryByrd merged commit 85d036e into ionide:main Sep 21, 2023
3 checks passed
@dawedawe dawedawe deleted the prefill_rename_box branch September 21, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants