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

Make New Tab Page scrollable #2130

Merged
merged 1 commit into from
Oct 7, 2024
Merged
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
104 changes: 53 additions & 51 deletions src/NexusMods.App.UI/WorkspaceSystem/NewTabPage/NewTabPageView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,65 @@
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="500"
x:Class="NexusMods.App.UI.WorkspaceSystem.NewTabPageView">

<StackPanel Margin="24" Orientation="Vertical" Spacing="24">
<banners:InfoBanner x:Name="InfoBanner">
<StackPanel>
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText1}"/>
<icons:UnifiedIcon x:Name="AddPanelIcon"/>
<icons:UnifiedIcon Value="{x:Static icons:IconValues.Add}" Size="16" />
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText2}"/>
</StackPanel>
</banners:InfoBanner>
<ScrollViewer>
<StackPanel Margin="24" Orientation="Vertical" Spacing="24">
<banners:InfoBanner x:Name="InfoBanner">
<StackPanel>
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText1}" />
<icons:UnifiedIcon x:Name="AddPanelIcon" />
<icons:UnifiedIcon Value="{x:Static icons:IconValues.Add}" Size="16" />
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText2}" />
</StackPanel>
</banners:InfoBanner>

<ItemsControl x:Name="Sections">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl x:Name="Sections">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionViewModel}">
<StackPanel Classes="Spacing-3" MinWidth="160" MaxWidth="375" Margin="0 0 24 24">
<TextBlock x:Name="SectionNameTextBlock" Text="{CompiledBinding SectionName}"
Classes="HeadingSMSemi" />
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionViewModel}">
<StackPanel Classes="Spacing-3" MinWidth="160" MaxWidth="375" Margin="0 0 24 24">
<TextBlock x:Name="SectionNameTextBlock" Text="{CompiledBinding SectionName}"
Classes="HeadingSMSemi" />

<ItemsControl x:Name="Items" ItemsSource="{CompiledBinding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Classes="Spacing-2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl x:Name="Items" ItemsSource="{CompiledBinding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Classes="Spacing-2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionItemViewModel}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionItemViewModel}">

<Border Classes="Mid Rounded">
<navigation:NavigationControl
Height="56"
Padding="0"
Width="375"
Background="{StaticResource SurfaceMidBrush}"
Command="{CompiledBinding SelectItemCommand}">
<Border Classes="Mid Rounded">
<navigation:NavigationControl
Height="56"
Padding="0"
Width="375"
Background="{StaticResource SurfaceMidBrush}"
Command="{CompiledBinding SelectItemCommand}">

<StackPanel Margin="16" Orientation="Horizontal" Classes="Spacing-1">
<icons:UnifiedIcon Size="24" Value="{CompiledBinding Icon}" />
<TextBlock x:Name="NameTextBlock"
Text="{CompiledBinding Name}"
Classes="BodyLGBold" />
</StackPanel>
</navigation:NavigationControl>
</Border>
<StackPanel Margin="16" Orientation="Horizontal" Classes="Spacing-1">
<icons:UnifiedIcon Size="24" Value="{CompiledBinding Icon}" />
<TextBlock x:Name="NameTextBlock"
Text="{CompiledBinding Name}"
Classes="BodyLGBold" />
</StackPanel>
</navigation:NavigationControl>
</Border>

</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>

</reactive:ReactiveUserControl>
Loading