feat(ui): render dependency-chain rail, step badge, and after-chip in TaskRowView
Reuses the existing 24px indent track (now gated on ShowAsChild OR ShowAsChainMember) instead of a second mechanism, adds a round step-number badge centered on the rail line, and a dimmed "after X" chip for chain members whose head isn't in view or that render as a planning child.
This commit is contained in:
@@ -18,15 +18,29 @@
|
||||
StrokeDashArray="4,3" Fill="Transparent" RadiusX="8" RadiusY="8"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Indent wrapper: col 0 = 24px child indent track, col 1 = content -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||
<!-- Indent wrapper: col 0 = 24px child/chain indent track, col 1 = content -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="24,*">
|
||||
|
||||
<!-- Indent track (only while the parent shares this view; orphaned children render flat) -->
|
||||
<Border Grid.Column="0" Width="24" IsVisible="{Binding ShowAsChild}" VerticalAlignment="Stretch">
|
||||
<!-- Indent track (only while the parent/chain-head shares this view; orphaned rows render flat) -->
|
||||
<Border Grid.Column="0" VerticalAlignment="Stretch">
|
||||
<Border.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||
<Binding Path="ShowAsChild"/>
|
||||
<Binding Path="ShowAsChainMember"/>
|
||||
</MultiBinding>
|
||||
</Border.IsVisible>
|
||||
<Rectangle Width="1" Fill="{DynamicResource LineBrush}"
|
||||
HorizontalAlignment="Right" Margin="0,4"/>
|
||||
</Border>
|
||||
|
||||
<!-- Chain step badge: centered on the rail line, half laid over the card's left edge -->
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="2" Classes="chain-step-badge"
|
||||
IsVisible="{Binding ShowAsChainMember}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Margin="16,0,0,0">
|
||||
<TextBlock Text="{Binding ChainStep}"/>
|
||||
</Border>
|
||||
|
||||
<!-- Main task card -->
|
||||
<Border Grid.Column="1" Classes="task-row"
|
||||
Margin="0,2"
|
||||
@@ -172,6 +186,17 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Chain-after chip: the head-relative fallback when this row isn't rendered as a
|
||||
rail member (planning child, or the head is filtered out of this view). -->
|
||||
<Border Classes="chip chip-tag"
|
||||
IsVisible="{Binding ChainAfterLabel, Converter={StaticResource NotNullToBool}}">
|
||||
<TextBlock>
|
||||
<Run Text="{loc:Tr tasks.chainAfterPrefix}"/>
|
||||
<Run Text=" "/>
|
||||
<Run Text="{Binding ChainAfterLabel}"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user