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

Modify telemetry first run experience to be non-blocking #117

Merged
merged 5 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/WingetCreateCLI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/WingetCreateCLI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,6 @@
<data name="PackageIdAlreadyExists_Error" xml:space="preserve">
<value>We have detected that this package identifier already exists. If you intend to update an existing package, please use the update command.</value>
</data>
<data name="EnableTelemetryFirstRun_Message" xml:space="preserve">
<value>Would you like to enable telemetry?</value>
</data>
<data name="SettingsCommand_HelpText" xml:space="preserve">
<value>Open settings</value>
</data>
Expand Down Expand Up @@ -680,4 +677,7 @@

"winget" is the proper name of the tool</comment>
</data>
<data name="TelemetryEnabledByDefault_Message" xml:space="preserve">
<value>By default, telemetry is enabled but can be disabled by running 'wingetcreate settings' and editing your settings file.</value>
</data>
</root>
7 changes: 3 additions & 4 deletions src/WingetCreateCLI/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Microsoft.WingetCreateCLI
using Microsoft.WingetCreateCLI.Models.Settings;
using Microsoft.WingetCreateCLI.Properties;
using Newtonsoft.Json;
using Sharprompt;

/// <summary>
/// UserSettings configuration class for WingetCreate.
Expand Down Expand Up @@ -118,13 +117,13 @@ public static void FirstRunTelemetryConsent()
{
if (!File.Exists(SettingsJsonPath))
{
Prompt.Symbols.Done = new Symbol(string.Empty, string.Empty);
Prompt.Symbols.Prompt = new Symbol(string.Empty, string.Empty);
Console.WriteLine(Resources.TelemetrySettings_Message);
Console.WriteLine("------------------");
Console.WriteLine(Resources.TelemetryJustification_Message);
Console.WriteLine(Resources.TelemetryAnonymous_Message);
TelemetryDisabled = !Prompt.Confirm(Resources.EnableTelemetryFirstRun_Message);
Console.WriteLine(Resources.TelemetryEnabledByDefault_Message);
Console.WriteLine();
TelemetryDisabled = true;
ryfu-msft marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down