Skip to content

Commit

Permalink
Add SendFeedback menu item for NTVS (#1253)
Browse files Browse the repository at this point in the history
* Add SendFeedback menu item for NTVS

Adds a simple menu item to send feedback about ntvs. See #1252 for details

Closes #1252

* Move send feedback to NTVS menu. Add documentaiton link

* Add documentation command
  • Loading branch information
mjbvz authored Sep 9, 2016
1 parent 8d30f01 commit bbaf25d
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 9 deletions.
31 changes: 31 additions & 0 deletions Nodejs/Product/Nodejs/Commands/SendFeedbackCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//*********************************************************//

using System;
using System.Diagnostics;
using Microsoft.VisualStudioTools;

namespace Microsoft.NodejsTools.Commands {
internal sealed class SendFeedbackCommand : Command {
public override void DoCommand(object sender, EventArgs args) {
Process.Start(@"https://aka.ms/ntvs-feedback");
}

public override int CommandId {
get { return (int)PkgCmdId.cmdidSendFeedback; }
}
}
}
31 changes: 31 additions & 0 deletions Nodejs/Product/Nodejs/Commands/ShowDocumentationCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//*********************************************************//
// Copyright (c) Microsoft. All rights reserved.
//
// Apache 2.0 License
//
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.
//
//*********************************************************//

using System;
using System.Diagnostics;
using Microsoft.VisualStudioTools;

namespace Microsoft.NodejsTools.Commands {
internal sealed class ShowDocumentationCommand : Command {
public override void DoCommand(object sender, EventArgs args) {
Process.Start(@"https://go.microsoft.com/fwlink/?linkid=785972");
}

public override int CommandId {
get { return (int)PkgCmdId.cmdidShowDocumentation; }
}
}
}
2 changes: 2 additions & 0 deletions Nodejs/Product/Nodejs/Nodejs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@
<DependentUpon>DiagnosticsForm.cs</DependentUpon>
</Compile>
<Compile Include="Commands\ImportWizardCommand.cs" />
<Compile Include="Commands\SendFeedbackCommand.cs" />
<Compile Include="Commands\OpenReplWindowCommand.cs" />
<Compile Include="Commands\OpenRemoteDebugDocumentationCommand.cs" />
<Compile Include="Commands\OpenRemoteDebugProxyFolderCommand.cs" />
<Compile Include="Commands\ShowDocumentationCommand.cs" />
<Compile Include="Commands\SurveyNewsCommand.cs" />
<Compile Include="Debugger\DataTips\DataTipTextManagerEvents.cs" />
<Compile Include="Debugger\DebugEngine\AD7EvalErrorProperty.cs" />
Expand Down
4 changes: 3 additions & 1 deletion Nodejs/Product/Nodejs/NodejsPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ protected override void Initialize() {
new OpenRemoteDebugDocumentationCommand(),
new SurveyNewsCommand(),
new ImportWizardCommand(),
new DiagnosticsCommand(this)
new DiagnosticsCommand(this),
new SendFeedbackCommand(),
new ShowDocumentationCommand()
};
try {
commands.Add(new AzureExplorerAttachDebuggerCommand());
Expand Down
27 changes: 25 additions & 2 deletions Nodejs/Product/Nodejs/NodejsTools.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<Parent guid="guidNodeToolsCmdSet" id="RemoteDebugProxyMenu"/>
</Group>

<Group guid="guidNodeToolsCmdSet" id="NtvsHelpGroup" priority="0x0500">
<Parent guid="guidNodeToolsCmdSet" id="ToolsMenu"/>
</Group>

<Group guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJWIN_SCOPE" priority="0x0500">
<Parent guid="guidNodeToolsNpmCmdSet" id="NpmMenu"/>
</Group>
Expand Down Expand Up @@ -90,7 +94,7 @@
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
If you do not want an image next to your command, remove the Icon node or set it to <Icon guid="guidOfficeIcon" id="msotcidNoIcon" /> -->

<Button guid="guidNodeToolsCmdSet" id="cmdidAddNewJavaScriptFileCommand" priority="0x0550" type="Button">
<Parent guid="guidNodeToolsCmdSet" id="AddNewFileGroup"/>
<Strings>
Expand Down Expand Up @@ -218,14 +222,30 @@
</Strings>
</Button>

<Button guid="guidNodeToolsCmdSet" id="cmdidDocumentation" priority="0x004" type="Button">
<Parent guid="guidNodeToolsCmdSet" id="NtvsHelpGroup"/>
<Strings>
<ButtonText>&amp;Documentation...</ButtonText>
<CommandName>Documentation...</CommandName>
</Strings>
</Button>

<Button guid="guidNodeToolsCmdSet" id="cmdidSurveyNews" priority="0x005" type="Button">
<Parent guid="guidNodeToolsCmdSet" id="ToolsMenuItemsGroup"/>
<Parent guid="guidNodeToolsCmdSet" id="NtvsHelpGroup"/>
<Strings>
<ButtonText>Survey/&amp;News...</ButtonText>
<CommandName>Survey/News...</CommandName>
</Strings>
</Button>

<Button guid="guidNodeToolsCmdSet" id="cmdidSendFeedback" priority="0x006" type="Button">
<Parent guid="guidNodeToolsCmdSet" id="NtvsHelpGroup"/>
<Strings>
<ButtonText>&amp;Report Issue or Send Feedback...</ButtonText>
<CommandName>Report Issue or Send Feedback...</CommandName>
</Strings>
</Button>

<Button guid="guidNodeToolsNpmCmdSet" id="cmdidNpmManageModules" priority="0x8000" type="Button">
<Parent guid="guidNodeToolsNpmCmdSet" id="NpmGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
Expand Down Expand Up @@ -400,6 +420,8 @@
<IDSymbol name="cmdidAddNewTypeScriptFileCommand" value="0x0212" />
<IDSymbol name="cmdidAddNewHTMLFileCommand" value="0x0213" />
<IDSymbol name="cmdidAddNewCSSFileCommand" value="0x0214" />
<IDSymbol name="cmdidSendFeedback" value="0x0215" />
<IDSymbol name="cmdidDocumentation" value="0x0216" />

<!-- Shared commands, defined in CommonConstants.cs -->
<IDSymbol name="cmdidAddExistingFolder" value="0x10001" />
Expand All @@ -412,6 +434,7 @@
<IDSymbol name="CodeFileGroup" value="0x1012" />
<IDSymbol name="AzureExplorerCommandsGroup" value="0x1015" />
<IDSymbol name="AddNewFileGroup" value="0x1016"/>
<IDSymbol name="NtvsHelpGroup" value="0x1017" />

<!-- Menus -->
<IDSymbol name="ToolsMenu" value ="0x2001" />
Expand Down
12 changes: 6 additions & 6 deletions Nodejs/Product/Nodejs/PkgCmdId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ class PkgCmdId {
public const int cmdidDiagnostics = 0x208;
public const int cmdidSetAsContent = 0x209;
public const int cmdidSetAsCompile = 0x210;
public const int cmdidAddNewJavaScriptFileCommand = 0x211;
public const int cmdidAddNewTypeScriptFileCommand = 0x212;
public const int cmdidAddNewHTMLFileCommand = 0x213;
public const int cmdidAddNewCSSFileCommand = 0x214;

public const int cmdidAddNewJavaScriptFileCommand = 0x211;
public const int cmdidAddNewTypeScriptFileCommand = 0x212;
public const int cmdidAddNewHTMLFileCommand = 0x213;
public const int cmdidAddNewCSSFileCommand = 0x214;
public const int cmdidSendFeedback = 0x215;
public const int cmdidShowDocumentation = 0x216;

public const int cmdidNpmManageModules = 0x300;
public const int cmdidNpmInstallModules = 0x301;
Expand All @@ -47,4 +48,3 @@ class PkgCmdId {
public const int menuIdNpm = 0x3000;
}
}

0 comments on commit bbaf25d

Please sign in to comment.