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

Automatically rename all files of a LWC when the parent folder name is changed #3554

Closed
AllanOricil opened this issue Sep 22, 2021 · 8 comments
Labels
area:lwc type:feedback Feedback for new features

Comments

@AllanOricil
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Not a problem, but it will improve DX on VS Code reducing waste of time while renaming files.

Describe the solution you'd like
When working with LWC we always have a parent folder with the name of the component followed by files that have the same name of the component. Sometimes, while developing, we change our mind about the name of the component and we want to change it. In order to do so, we have to rename at least 3 things by hand: the parent folder name, the .xml file and .js file. The .css and .html might not exist, but if they do, we would also have to change them. So the idea is to create a new VS Code command that would rename the children files if the parent folder name is changed. You can also investigate if you can hook a handler to the standard vscode rename button, instead of creating a new command.

image

Describe alternatives you've considered
At the moment I have to do it manually

Additional context
N/A

@randi274 randi274 added type:feedback Feedback for new features area:lwc labels Sep 22, 2021
@randi274
Copy link
Contributor

Thanks for logging this @AllanOricil- @smaddox-sf and I were just discussing this the other day! We're currently considering what gaps our products have for LWC compatibility in the ecosystem, so it's great to hear what our users are looking for as we prioritize future work.

@AllanOricil
Copy link
Contributor Author

@randi274 cool. If you need help to identify more improvements to make the product better, and also hands to work on vscode customizations, I'm available to do business with Salesforce.

@AnanyaJha
Copy link
Collaborator

AnanyaJha commented Jan 18, 2022

Thanks @AllanOricil! We'll be looking at prioritizing this issue during our next iteration. Let us know if there are any other improvements you've discovered while developing with LWC (or otherwise) using our Extensions!

@randi274
Copy link
Contributor

@floralan heads up on connecting your WIP to this issue!

@floralan
Copy link
Contributor

floralan commented Apr 4, 2022

@AllanOricil Hi! We added the "SFDX: Rename Component" command recently in #3923, It will be shipped in this week's release. Please check out our latest version later this week!

@AllanOricil
Copy link
Contributor Author

AllanOricil commented Apr 4, 2022

@floralan nice job. Hope people use it. I will give it a try.

@AllanOricil
Copy link
Contributor Author

@floralan I have the latest vscode extension pack but this command does not show up

@randi274
Copy link
Contributor

randi274 commented May 6, 2022

@AllanOricil are you right clicking the bundle, or one of the files underneath? It doesn't work on the test directory just yet, but it should appear for the others!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:lwc type:feedback Feedback for new features
Projects
None yet
Development

No branches or pull requests

4 participants