Public Access
Take the group headings out of the host grid, and drop onto a group card
A first group turned the wrap of host cards into an accordion: SidebarRows interleaves a full-width fold-away heading — chevron, name, count — between the cards, and in a grid that reads as a dropdown somebody left open. The desktop grid binds VisibleHosts now. The headings and the fold stay for the phone, whose list has no room for the row of group cards the desktop draws above the grid. What a heading said, the card says: HostRowViewModel.GroupLabel, resolved once per reload like the tag names, drawn as an accent chip and absent from a host in no group — or in one that has been deleted, which is the same thing to look at. What a heading also was is the drop target, and that moves to the group cards. Two things go with it. A host dropped onto another host card used to be filed beside it, which was legible while a heading named the band of cards it landed in and is guesswork now; it is refused. And UNGROUPED was how a host was dragged back out of a group; the way out is the picker in its own editor, which is the one place "no group" can be said in words. A drag held at either edge of the grid scrolls it. Without that the gesture only works for whoever can see both ends of it: the group cards are the first thing in the scroller, the host may be the fortieth card down, and a drag cannot use the wheel. A step per drag event rather than a timer, so it follows the pointer and stops when it stops. The two heading-shaped tests are replaced. TheHostsGridHoldsCardsAndNoGroupHeadings asserts the grid's contents rather than only measuring them, because a heading that came back would lay out perfectly cleanly. TheGroupCardsAreWhatAcceptsADroppedHost raises a real DragOver over both kinds of card and checks the effects and the mark — the nearest a headless test gets to a gesture no headless test can synthesise. manual-checks 3.1-3.2 and 7.6-7.9 follow.
This commit is contained in:
@@ -276,9 +276,12 @@
|
||||
<Setter Property="Background" Value="{StaticResource ChromeHover}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.grouphead">
|
||||
<Setter Property="Padding" Value="10,7,10,4" />
|
||||
</Style>
|
||||
<!--
|
||||
Button.grouphead was here: the padding on the fold-away group heading that used to sit between the host
|
||||
cards. The headings went when the grid became cards and the group cards above it became the thing that
|
||||
names a group — see HostsScreen.axaml — and a style with nothing wearing it is a shape somebody will
|
||||
later reintroduce by reaching for it.
|
||||
-->
|
||||
|
||||
<!-- A category in the vault's rail: the same accent strip a selected row carries, at full row height. -->
|
||||
<Style Selector="Button.cat">
|
||||
@@ -661,19 +664,31 @@
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The row a host is about to be dropped on. A wash rather than the accent strip a selection carries,
|
||||
because it is not a selection: it says "let go here", it lasts as long as the pointer is over the row,
|
||||
and it has to be legible on top of whatever that row already looks like — including the selected row,
|
||||
which is often the one being dragged onto.
|
||||
The group card a host is about to be dropped on. A wash rather than the accent strip a selection
|
||||
carries, because it is not a selection: it says "let go here", it lasts as long as the pointer is over
|
||||
the card, and it has to be legible on top of whatever that card already looks like — including the
|
||||
selected one, which is the group the grid is currently narrowed to and so often the one being dragged
|
||||
onto.
|
||||
|
||||
Painted on the tile rather than on the item's own presenter, which is where this used to go when the
|
||||
target was a full-width heading. A wash behind a 10-pixel-rounded tile is a square of colour with the
|
||||
card floating on it — the same four grey corners the tiles list clears the theme's own hover and
|
||||
selection brushes to avoid. Declared after that rule and after the selected-tile rule, because
|
||||
Avalonia has no specificity and settles two matching rules by declaration order.
|
||||
|
||||
◆ THE DOUBLED BORDER IS THE MARK, not the fill, and that is what the move to the tile forced. The fill
|
||||
a selected tile already carries is the strongest one this palette has, so a target that only filled
|
||||
would be invisible on the card the grid is narrowed to — which is the card a host most often has to be
|
||||
dragged off, into another group. Two pixels of accent is legible on both.
|
||||
|
||||
Set from the code-behind rather than by a binding, for the reason the whole gesture is code: the rows
|
||||
are rebuilt from scratch on every filter keystroke and every sync pass, so a flag on the view model
|
||||
would be state the list throws away halfway through the drag. See HostsScreen.axaml.cs.
|
||||
-->
|
||||
<Style Selector="ListBoxItem.droptarget /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource AccentWash}" />
|
||||
<Style Selector="ListBoxItem.droptarget Border.tile">
|
||||
<Setter Property="Background" Value="{StaticResource Active}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Accent}" />
|
||||
<Setter Property="BorderThickness" Value="0,0,0,2" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user