fix(vtank): slice 7 round F item 5 — Monsters move-up/down arrows stay adjacent
Resemblance re-check: "Monsters' move-down arrow drifted ~67 px from move-up because the last (auto) column absorbed the new width — add a trailing filler column." docs/plugin-ui-markup.md's own "Width semantics" rule makes the LAST <column> in a <list> ALWAYS treated as auto, regardless of its own declared width — MonsterMoveDownIcons was the grid's 23rd and, until this commit, LAST column, so it silently absorbed every pixel of window growth instead of staying at its declared 23px pitch. The gap was already wrong (89.5px) at the authored 984-wide default, not just after a resize. Adds a 24th, trailing <column type="text"> with empty items (MonsterFillerColumn) so MoveDownIcons is no longer last and keeps its own real width; the filler absorbs the remainder instead — the same "fixed icon columns + trailing auto filler" shape lstMetaRules' three 16px icon columns + two auto text columns already prove out (MarkupListColumnsTests.EndToEnd_MetaShapedSixColumnList_...). The filler's onclick (MonsterFillerClick) is a real, bound no-op — MossTankMarkupContractTests.EveryInteractiveControlDeclaresARealHandlerBinding requires every <column> to declare SOME handler, so "no binding at all" (the other option this item's own spec offered) is not actually legal in this codebase; clicking blank filler space does nothing, but the binding itself is real. Mutation shown to fail first: the new MonstersMoveUpAndMoveDownIconsStayAdjacentAtEveryWidth theory (984 and 1100, MarkupDocument.Build over the real mosstank.xml with a real IMarkupIconResolver stub) failed at BOTH widths against the unmodified markup — 89.5px apart at 984, 147.5px at 1100 — then passed (fixed ~23px gap at both) once the filler column was added. MonstersGridHasVtanksTwentyThreeColumnsInOrderWithRetailHeaderTooltips' 23->24 column-count/type update is the other required change; VTank's own 23-column shape is unchanged, only a MossTank-only 24th filler is new. MossTank suite 724/724 (one test's expectations updated, no net count change); App markup/plugin filter 258 -> 260 (the new theory's two InlineData cases). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
6ef6eb7514
commit
bae34aaa8b
4 changed files with 124 additions and 2 deletions
|
|
@ -1542,6 +1542,26 @@ internal sealed partial class MossTankPanel
|
|||
public IReadOnlyList<uint> MonsterMoveDownIcons => _monsterMoveDownIconsColumn;
|
||||
public Action<int> MoveMonsterRuleUpAt => row => MoveMonsterRuleAtCore(row, -1);
|
||||
public Action<int> MoveMonsterRuleDownAt => row => MoveMonsterRuleAtCore(row, 1);
|
||||
// Round F item 5 (resemblance re-check: "Monsters' move-down arrow
|
||||
// drifted ~67 px from move-up because the last (auto) column
|
||||
// absorbed the new width — add a trailing filler column"):
|
||||
// docs/plugin-ui-markup.md's own "Width semantics" rule makes the
|
||||
// LAST <column> in a <list> ALWAYS auto regardless of its own
|
||||
// declared width, so MonsterMoveDownIcons — the grid's 23rd and, at
|
||||
// the time, LAST column — silently absorbed every pixel of window
|
||||
// growth instead of staying at its declared 23px pitch. A trailing
|
||||
// filler column (empty items) now sits after it so MoveDownIcons
|
||||
// keeps its own real width and this filler absorbs the remainder
|
||||
// instead — the same "fixed icon + trailing auto filler" shape
|
||||
// lstMetaRules already proves out
|
||||
// (EndToEnd_MetaShapedSixColumnList_AutoColumnsShareRemainder).
|
||||
// MonsterFillerClick is a real, bound no-op — MossTankMarkupContractTests'
|
||||
// EveryInteractiveControlDeclaresARealHandlerBinding requires every
|
||||
// interactive control (every <column> included) to declare SOME
|
||||
// handler; clicking blank filler space does nothing, but the binding
|
||||
// itself is real, not omitted.
|
||||
public IReadOnlyList<string> MonsterFillerColumn => Array.Empty<string>();
|
||||
public Action<int> MonsterFillerClick => static _ => { };
|
||||
|
||||
/// <summary>Vitals line, using the same numbers the character panel shows.</summary>
|
||||
public string Vitals => _vitals;
|
||||
|
|
|
|||
|
|
@ -459,6 +459,15 @@
|
|||
<column type="text" width="63" items="{MonsterPetDamageColumn}" onclick="{CycleMonsterPetDamageAt}" />
|
||||
<column type="icon" width="23" iconkind="did" values="{MonsterMoveUpIcons}" onclick="{MoveMonsterRuleUpAt}" />
|
||||
<column type="icon" width="23" iconkind="did" values="{MonsterMoveDownIcons}" onclick="{MoveMonsterRuleDownAt}" />
|
||||
<!-- Round F item 5: a genuinely inert trailing filler (empty items,
|
||||
no onclick) so MoveDownIcons is no longer the grid's LAST
|
||||
column — docs/plugin-ui-markup.md's "Width semantics" rule
|
||||
makes the last column ALWAYS auto regardless of its own
|
||||
declared width, which used to drag the down-arrow away from
|
||||
the up-arrow as the window widened. This filler absorbs the
|
||||
remainder instead; the arrows stay a fixed 23px apart at every
|
||||
width. -->
|
||||
<column type="text" width="*" items="{MonsterFillerColumn}" onclick="{MonsterFillerClick}" />
|
||||
</list>
|
||||
|
||||
<field x="8" y="171" w="388" h="16" text="{MonsterExpressionDraft}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue