refactor(ui): tokenize DetailsIslandView

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-30 16:33:46 +02:00
parent f40de4bbe0
commit bff15c9bf3

View File

@@ -22,7 +22,7 @@
</Button> </Button>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Text="{Binding Task.CreatedAtFormatted}" Text="{Binding Task.CreatedAtFormatted}"
FontFamily="{DynamicResource MonoFont}" FontSize="10" FontFamily="{DynamicResource MonoFont}" FontSize="{StaticResource FontSizeEyebrow}"
Foreground="{DynamicResource TextFaintBrush}" Foreground="{DynamicResource TextFaintBrush}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -50,11 +50,11 @@
</Button> </Button>
<StackPanel Grid.Column="1" Spacing="0"> <StackPanel Grid.Column="1" Spacing="0">
<TextBlock Text="{Binding TaskIdBadge}" <TextBlock Text="{Binding TaskIdBadge}"
FontFamily="{DynamicResource MonoFont}" FontSize="10" FontFamily="{DynamicResource MonoFont}" FontSize="{StaticResource FontSizeEyebrow}"
Foreground="{DynamicResource TextFaintBrush}" Foreground="{DynamicResource TextFaintBrush}"
Margin="0,0,0,4"/> Margin="0,0,0,4"/>
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}" <TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
FontSize="14" FontWeight="Medium" FontSize="{StaticResource FontSizeTaskTitle}" FontWeight="Medium"
BorderThickness="0" Background="Transparent" BorderThickness="0" Background="Transparent"
Foreground="{DynamicResource TextBrush}" Foreground="{DynamicResource TextBrush}"
TextWrapping="Wrap" TextWrapping="Wrap"
@@ -77,7 +77,7 @@
IsEnabled="{Binding IsAgentSectionEnabled}" IsEnabled="{Binding IsAgentSectionEnabled}"
VerticalAlignment="Top" VerticalAlignment="Top"
Margin="6,0,0,0"> Margin="6,0,0,0">
<TextBlock Text="⚙" FontSize="14"/> <TextBlock Text="⚙" FontSize="{StaticResource FontSizeTaskTitle}"/>
<Button.Flyout> <Button.Flyout>
<Flyout Placement="BottomEdgeAlignedRight" ShowMode="Standard"> <Flyout Placement="BottomEdgeAlignedRight" ShowMode="Standard">
<StackPanel Width="340" Spacing="10" Margin="4"> <StackPanel Width="340" Spacing="10" Margin="4">
@@ -89,7 +89,7 @@
SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}" SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<TextBlock Text="{Binding EffectiveModelHint, StringFormat='Effective if inherited: {0}'}" <TextBlock Text="{Binding EffectiveModelHint, StringFormat='Effective if inherited: {0}'}"
Opacity="0.6" FontSize="11"/> Opacity="0.6" FontSize="{StaticResource FontSizeMono}"/>
</StackPanel> </StackPanel>
<StackPanel Spacing="2"> <StackPanel Spacing="2">
@@ -111,7 +111,7 @@
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
<TextBlock Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}" <TextBlock Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}"
Opacity="0.6" FontSize="11"/> Opacity="0.6" FontSize="{StaticResource FontSizeMono}"/>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Flyout> </Flyout>
@@ -136,7 +136,7 @@
<TextBlock Classes="section-label" Text="MERGE" Margin="0,0,0,2"/> <TextBlock Classes="section-label" Text="MERGE" Margin="0,0,0,2"/>
<StackPanel Spacing="4"> <StackPanel Spacing="4">
<TextBlock Text="Merge target" <TextBlock Text="Merge target"
FontSize="11" FontSize="{StaticResource FontSizeMono}"
Foreground="{DynamicResource TextFaintBrush}"/> Foreground="{DynamicResource TextFaintBrush}"/>
<ComboBox ItemsSource="{Binding MergeTargetBranches}" <ComboBox ItemsSource="{Binding MergeTargetBranches}"
SelectedItem="{Binding SelectedMergeTarget, Mode=TwoWay}" SelectedItem="{Binding SelectedMergeTarget, Mode=TwoWay}"
@@ -151,7 +151,7 @@
ToolTip.Tip="{Binding MergeAllDisabledReason}"/> ToolTip.Tip="{Binding MergeAllDisabledReason}"/>
</StackPanel> </StackPanel>
<TextBlock Text="{Binding MergeAllError}" <TextBlock Text="{Binding MergeAllError}"
Foreground="OrangeRed" Foreground="{DynamicResource BloodBrush}"
TextWrapping="Wrap" TextWrapping="Wrap"
IsVisible="{Binding MergeAllError, Converter={x:Static ObjectConverters.IsNotNull}}"/> IsVisible="{Binding MergeAllError, Converter={x:Static ObjectConverters.IsNotNull}}"/>
</StackPanel> </StackPanel>
@@ -169,7 +169,7 @@
Background="{DynamicResource Surface2Brush}" Background="{DynamicResource Surface2Brush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="1" BorderThickness="1"
CornerRadius="6"> CornerRadius="8">
<TextBox.KeyBindings> <TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/> <KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/>
</TextBox.KeyBindings> </TextBox.KeyBindings>
@@ -195,7 +195,7 @@
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Classes="subtask-title" Classes="subtask-title"
Text="{Binding Title}" Text="{Binding Title}"
FontSize="13" FontSize="{StaticResource FontSizeBody}"
Foreground="{DynamicResource TextDimBrush}" Foreground="{DynamicResource TextDimBrush}"
VerticalAlignment="Center" VerticalAlignment="Center"
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
@@ -220,10 +220,10 @@
Margin="0,0,6,2" Margin="0,0,6,2"
VerticalAlignment="Center"> VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Spacing="6"> <StackPanel Orientation="Horizontal" Spacing="6">
<TextBlock Text="▾" FontSize="10" <TextBlock Text="▾" FontSize="{StaticResource FontSizeEyebrow}"
IsVisible="{Binding IsDescriptionExpanded}" IsVisible="{Binding IsDescriptionExpanded}"
Foreground="{DynamicResource TextDimBrush}"/> Foreground="{DynamicResource TextDimBrush}"/>
<TextBlock Text="▸" FontSize="10" <TextBlock Text="▸" FontSize="{StaticResource FontSizeEyebrow}"
IsVisible="{Binding !IsDescriptionExpanded}" IsVisible="{Binding !IsDescriptionExpanded}"
Foreground="{DynamicResource TextDimBrush}"/> Foreground="{DynamicResource TextDimBrush}"/>
<TextBlock Classes="section-label" Text="DETAILS"/> <TextBlock Classes="section-label" Text="DETAILS"/>
@@ -242,7 +242,7 @@
Classes="icon-btn" Classes="icon-btn"
Command="{Binding ToggleEditDescriptionCommand}" Command="{Binding ToggleEditDescriptionCommand}"
Padding="6,2" Padding="6,2"
FontSize="10" FontSize="{StaticResource FontSizeEyebrow}"
ToolTip.Tip="Toggle edit/preview" ToolTip.Tip="Toggle edit/preview"
IsVisible="{Binding IsDescriptionEditorVisible}"> IsVisible="{Binding IsDescriptionEditorVisible}">
<TextBlock Text="Preview"/> <TextBlock Text="Preview"/>
@@ -251,7 +251,7 @@
Classes="icon-btn" Classes="icon-btn"
Command="{Binding ToggleEditDescriptionCommand}" Command="{Binding ToggleEditDescriptionCommand}"
Padding="6,2" Padding="6,2"
FontSize="10" FontSize="{StaticResource FontSizeEyebrow}"
ToolTip.Tip="Toggle edit/preview" ToolTip.Tip="Toggle edit/preview"
IsVisible="{Binding IsDescriptionPreviewVisible}"> IsVisible="{Binding IsDescriptionPreviewVisible}">
<TextBlock Text="Edit"/> <TextBlock Text="Edit"/>
@@ -266,11 +266,11 @@
PlaceholderText="Add task details (markdown supported)..." PlaceholderText="Add task details (markdown supported)..."
Padding="8" Padding="8"
FontFamily="{DynamicResource MonoFont}" FontFamily="{DynamicResource MonoFont}"
FontSize="12" FontSize="{StaticResource FontSizeBody}"
Background="{DynamicResource Surface2Brush}" Background="{DynamicResource Surface2Brush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="1" BorderThickness="1"
CornerRadius="6" CornerRadius="8"
IsVisible="{Binding IsDescriptionEditorVisible}"/> IsVisible="{Binding IsDescriptionEditorVisible}"/>
<ctl:MarkdownView Markdown="{Binding EditableDescription}" <ctl:MarkdownView Markdown="{Binding EditableDescription}"