Skip to content

Commit

Permalink
Announcing the heading group, and repo names. (#2490)
Browse files Browse the repository at this point in the history
* NArrator says repo name in AddRepoDialog.

* Adding group names to the main page

* Moved some code from the view to the ViewModel.

* Adding notes to keep the strings in-sync

---------

Co-authored-by: Darren Hoehna <dahoehna@microsoft.com>
  • Loading branch information
dhoehna and dhoehna committed Apr 3, 2024
1 parent b066a15 commit a9d28be
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public static class StringResourceKey
public static readonly string InstalledPackageReboot = nameof(InstalledPackageReboot);
public static readonly string InstallingPackage = nameof(InstallingPackage);
public static readonly string InstallationNotesTitle = nameof(InstallationNotesTitle);
public static readonly string MainPageEnvironmentSetupGroup = nameof(MainPageEnvironmentSetupGroup);
public static readonly string MainPageQuickConfigurationGroup = nameof(MainPageQuickConfigurationGroup);
public static readonly string Next = nameof(Next);
public static readonly string NoSearchResultsFoundTitle = nameof(NoSearchResultsFoundTitle);
public static readonly string PackagesCount = nameof(PackagesCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,14 @@
<value>Loading your environments</value>
<comment>Test that tells the user that we're still loading their environments. These environments can be virtual or remote machines</comment>
</data>
<data name="MainPageEnvironmentSetupGroup" xml:space="preserve">
<value>Set up development environment</value>
<comment>(Narrator reads this entry and should stay in sync with MainPage_EnvironmentSetup.Text ). Header text for a group of controls giving multiple choices to set up the environment/machine</comment>
</data>
<data name="MainPageQuickConfigurationGroup" xml:space="preserve">
<value>Quick steps</value>
<comment>(Narrator reads this and should be in sync with MainPage_QuickConfiguration.Text) Header text for a group of controls giving multiple choices for configuring the machine, but not a full setup flow</comment>
</data>
<data name="ConfigurationFile_SummaryView.Content" xml:space="preserve">
<value>Summary view</value>
<comment>Show the summary view of the configuration file</comment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ public async Task ChangePage(SegmentedItem selectedItem)
return;
}

[RelayCommand]
public async Task ShowCustomizeDevDriveWindow()
{
await EditDevDriveViewModel.PopDevDriveCustomizationAsync();
ToggleCloneButton();
}

/// <summary>
/// Indicates if the ListView is currently filtering items. A result of manually filtering a list view
/// is that the SelectionChanged is fired for any selected item that is removed and the item isn't "re-selected"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public partial class MainPageViewModel : SetupPageViewModelBase
[ObservableProperty]
private bool _showAppInstallerUpdateNotification;

public string MainPageEnvironmentSetupGroupName => StringResource.GetLocalized(StringResourceKey.MainPageEnvironmentSetupGroup);

public string MainPageQuickStepsGroupName => StringResource.GetLocalized(StringResourceKey.MainPageQuickConfigurationGroup);

public bool ShouldShowSetupTargetItem => _experimentationService.IsFeatureEnabled(EnvironmentsSetupFlowFeatureName);

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<ListView x:Name="RepositoriesListView" Visibility="{x:Bind AddRepoViewModel.IsFetchingRepos, Mode=OneWay, Converter={StaticResource NegatedBoolToVisibilityConverter}}" SelectionMode="Multiple" Height="300" HorizontalAlignment="Stretch" SelectionChanged="RepositoriesListView_SelectionChanged" ItemsSource="{x:Bind AddRepoViewModel.RepositoriesToDisplay, Mode=OneWay}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="models:RepoViewListItem">
<Grid ColumnSpacing="7">
<Grid ColumnSpacing="7" AutomationProperties.Name="{x:Bind RepoDisplayName}">
<ToolTipService.ToolTip>
<ToolTip IsEnabled="{x:Bind IsRepoNameTrimmed, Mode=OneWay}" Content="{x:Bind RepoDisplayName}"/>
</ToolTipService.ToolTip>
Expand Down Expand Up @@ -264,7 +264,7 @@
x:Uid="CustomizeHyperLink"
Grid.Column="1"
Visibility="{x:Bind AddRepoViewModel.EditDevDriveViewModel.ShowCustomizeOption, Mode=OneWay}"
Click="CustomizeDevDriveHyperlinkButton_ClickAsync"
Command="{x:Bind AddRepoViewModel.ShowCustomizeDevDriveWindowCommand}"
Grid.Row="0"
Margin="0 -3 0 0"
Padding="3" />
Expand Down
9 changes: 0 additions & 9 deletions tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,6 @@ private void MakeNewDevDriveCheckBox_Click(object sender, RoutedEventArgs e)
}
}

/// <summary>
/// User wants to customize the default dev drive.
/// </summary>
private async void CustomizeDevDriveHyperlinkButton_ClickAsync(object sender, RoutedEventArgs e)
{
await AddRepoViewModel.EditDevDriveViewModel.PopDevDriveCustomizationAsync();
AddRepoViewModel.ToggleCloneButton();
}

private void RepoUrlTextBox_TextChanged(object sender, RoutedEventArgs e)
{
// just in case something other than a text box calls this.
Expand Down
6 changes: 3 additions & 3 deletions tools/SetupFlow/DevHome.SetupFlow/Views/MainPageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
BackgroundSource="{ThemeResource Setup_Banner_Back}"
OverlaySource="{ThemeResource Setup_Banner_Front}" />

<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" x:Uid="ms-resource:///DevHome.SetupFlow/Resources/MainPage_EnvironmentSetup" />
<StackPanel Spacing="{StaticResource SettingsCardSpacing}" AutomationProperties.Name="{x:Bind ViewModel.MainPageEnvironmentSetupGroupName}">
<TextBlock x:Name="SetupEnvironmentHeader" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" x:Uid="ms-resource:///DevHome.SetupFlow/Resources/MainPage_EnvironmentSetup"/>
<!-- Transparent Grid wrapper for displaying tooltip on disabled settings card -->
<Grid Background="Transparent">
<ctControls:SettingsCard x:Uid="ms-resource:///DevHome.SetupFlow/Resources/MainPage_SetupFlow"
Expand Down Expand Up @@ -162,7 +162,7 @@
</ctControls:SettingsCard>
</StackPanel>

<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
<StackPanel Spacing="{StaticResource SettingsCardSpacing}" AutomationProperties.Name="{x:Bind ViewModel.MainPageQuickStepsGroupName}">
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" x:Uid="ms-resource:///DevHome.SetupFlow/Resources/MainPage_QuickConfiguration" />
<ctControls:SettingsCard x:Uid="ms-resource:///DevHome.SetupFlow/Resources/MainPage_CloneRepos"
AutomationProperties.AutomationId="CloneRepoButton"
Expand Down

0 comments on commit a9d28be

Please sign in to comment.