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

Announcing the heading group, and repo names. #2490

Merged
merged 6 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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>
Copy link
Contributor

@vineeththomasalex vineeththomasalex Apr 3, 2024

Choose a reason for hiding this comment

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

Nit

Suggested change
<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>
<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}">
Copy link
Contributor

Choose a reason for hiding this comment

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

We can set the automation attributes directly from resw.

<data name="MyStackPanel.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" ...

<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
Loading