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

Expose create commands only on default folders #1235

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

ntotten
Copy link
Contributor

@ntotten ntotten commented Apr 5, 2019

What does this PR do?

Limits create commands to only be exposed on default folders

What issues does this PR fix or reference?

Closes #852, @W-5746531@

@ntotten ntotten requested review from lcampos and brpowell April 5, 2019 19:05
@codecov
Copy link

codecov bot commented Apr 5, 2019

Codecov Report

Merging #1235 into develop will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1235      +/-   ##
===========================================
+ Coverage    70.98%   71.01%   +0.02%     
===========================================
  Files          196      196              
  Lines         7397     7397              
  Branches       781      781              
===========================================
+ Hits          5251     5253       +2     
+ Misses        1990     1989       -1     
+ Partials       156      155       -1
Impacted Files Coverage Δ
...edx-vscode-core/src/telemetry/telemetryReporter.ts 53.52% <0%> (+2.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea102fc...46c5f2e. Read the comment docs.

@@ -116,15 +116,15 @@
"explorer/context": [
{
"command": "sfdx.force.apex.class.create",
"when": "explorerResourceIsFolder && resourceFilename != aura && resourceFilename != lwc && sfdx:project_opened"
"when": "explorerResourceIsFolder && resourceFilename == classes && sfdx:project_opened"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good but looks like it breaks a test so need to get that updated as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me too. The test failure doesn't look related to these changes, I was seeing that fail locally for me on another branch as well...

Copy link
Contributor Author

@ntotten ntotten Apr 8, 2019

Choose a reason for hiding this comment

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

@brpowell Ah thanks, I was stumped on that one. I couldn't figure out why this change broke some random localization test.

},
{
"command": "sfdx.force.visualforce.component.create",
"when": "explorerResourceIsFolder && resourceFilename != aura && resourceFilename != lwc && sfdx:project_opened"
"when": "explorerResourceIsFolder && resourceFilename != components && sfdx:project_opened"
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be resourceFilename == components

},
{
"command": "sfdx.force.visualforce.page.create",
"when": "explorerResourceIsFolder && resourceFilename != aura && resourceFilename != lwc && sfdx:project_opened"
"when": "explorerResourceIsFolder && resourceFilename != pages && sfdx:project_opened"
Copy link
Contributor

Choose a reason for hiding this comment

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

resourceFilename == pages

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Fixed

@@ -144,7 +144,7 @@
},
{
"command": "sfdx.force.apex.trigger.create",
"when": "explorerResourceIsFolder && resourceFilename != aura && resourceFilename != lwc && sfdx:project_opened"
"when": "explorerResourceIsFolder && resourceFilename != triggers && sfdx:project_opened"
Copy link
Contributor

Choose a reason for hiding this comment

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

resourceFilename == triggers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Fixed.

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.

Template Commands should be surfaced on only default folders.
4 participants