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

feat: custom templates for vscode #3563

Merged
merged 7 commits into from
Oct 1, 2021
Merged

feat: custom templates for vscode #3563

merged 7 commits into from
Oct 1, 2021

Conversation

xyc
Copy link
Contributor

@xyc xyc commented Sep 29, 2021

What does this PR do?

Support custom templates in VS Code

What issues does this PR fix or reference?

@W-9790311@

@xyc xyc marked this pull request as ready for review September 29, 2021 22:36
@xyc xyc requested a review from a team as a code owner September 29, 2021 22:36
Copy link
Contributor

@randi274 randi274 left a comment

Choose a reason for hiding this comment

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

Looking great so far! I wanted to do some testing of this tomorrow before approving, but left a few quick comments

@@ -18,7 +18,7 @@ import { forceApexClassCreate } from '../../../../src/commands/templates/forceAp
import { nls } from '../../../../src/messages';
import { notificationService } from '../../../../src/notifications';
import { telemetryService } from '../../../../src/telemetry';
import { getRootWorkspacePath } from '../../../../src/util';
import { ConfigUtil, getRootWorkspacePath } from '../../../../src/util';
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch on this one! Did this come up with any of the other create commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, telemetry test is only for apex class create since the other template types are very similar. It might be belonging to its own test file though, but not a pressing need to refactor now.

Copy link
Contributor

@randi274 randi274 left a comment

Choose a reason for hiding this comment

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

Works great! Ran lots of tests to check error states and happy paths with local and remote repos. I love that the code is smart enough to store multiple templates locally, and switch between cached versions as the desired URL changes.

My only feedback during testing is that it's not quite clear which cached directory you need to delete if you want to re-download the remote repository. That may be a good motivating factor for eventually offering an option through VS Code to update the cached templates, but for now users will just need to navigate into the directories to remember which is which.

Great work! 🎉

"@salesforce/salesforcedx-utils-vscode": "52.16.0",
"@salesforce/source-deploy-retrieve": "4.1.1",
"@salesforce/source-deploy-retrieve": "4.4.7",
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome. I had a PR in flight for this. I'll take that off.

@xyc xyc merged commit 7c80e69 into develop Oct 1, 2021
@xyc xyc deleted the xyc/byotemplate-vscode branch October 1, 2021 18:10
@xyc xyc mentioned this pull request Nov 19, 2021
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.

None yet

3 participants