fix(mosstank): drop tooltips from the Advanced Options popup

Owner's third live look (2026-09-07): "Also still have tooltips in the
advanced options, remove please." VTank's own AdvancedOptionsView has
no tooltip mechanism at all (docs/research/vtank-kb/08-ui-views.md
§1) — its own description readout (AdvancedOptionDescription, the
label under the field) is the retail in-popup info channel, not a
hover tooltip. Removes the three tooltip= attributes
mosstank-advanced.xml had grown (the option list, the category
checklist, the value field); nothing else in the file set one.

New test AdvancedOptionsPopupHasNoElementWithATooltip builds the real
mosstank-advanced.xml against a real MossTankPanel and walks the
WHOLE resolved UiElement tree checking RuntimeTooltipTextSource is
null everywhere, rather than re-checking the three known offenders —
MarkupDocument.Build only ever sets that field when the source element
declared a real tooltip= attribute, so a null source function means no
tooltip was ever bound. Shown to fail first against a targeted
mutation (a tooltip= temporarily reintroduced on the option list) —
failed with "UiMarkupList carries a tooltip" — then reverted and
restored green.

App markup/plugin filter: 261 -> 262 (one new Fact).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-07 21:12:15 +02:00
parent 6be555ad47
commit 617a9c2218
2 changed files with 49 additions and 7 deletions

View file

@ -167,12 +167,19 @@
AddRouteCheckpoint/AddRouteJump themselves) — nothing was deleted from
the plugin, only the second, redundant UI surface for it. Panel height
shrinks 450->300 to match VTank's real 392x300 AdvancedOptionsView
footprint (minh follows); minw stays 392. -->
footprint (minh follows); minw stays 392.
Owner's third live look (2026-09-07): "Also still have tooltips in the
advanced options, remove please." VTank's own AdvancedOptionsView has no
tooltip mechanism at all — its own description readout
(AdvancedOptionDescription, the label at the bottom) is the retail
in-popup info channel, not a hover tooltip. The three tooltip= attributes
this popup had grown (the option list, the category checklist, the value
field) are removed; nothing else in this file ever set one. -->
<panel x="253" y="405" w="392" h="300" title="MossTank Advanced Options"
visible="{AdvancedOptionsVisible}" resizable="true" minw="392" minh="300">
<list x="4" y="4" w="256" h="160" rowheight="17" anchor="left top right"
selected="{SelectedAdvancedOptionIndex}" onchange="{SelectAdvancedOption}"
tooltip="Select one of Virindi Tank's 137 advanced options.">
selected="{SelectedAdvancedOptionIndex}" onchange="{SelectAdvancedOption}">
<column type="text" width="187" items="{AdvancedOptionNames}" onclick="{SelectAdvancedOption}" />
<column type="text" width="69" items="{AdvancedOptionValueColumn}" onclick="{ClickAdvancedOptionValue}" />
</list>
@ -181,15 +188,13 @@
pure checklist with no real selection concept — see
SelectedAdvancedOptionCategoryIndex's own doc comment. -->
<list x="268" y="4" w="120" h="180" rowheight="18" anchor="right"
selected="{SelectedAdvancedOptionCategoryIndex}"
tooltip="Uncheck a category to hide its settings from the list on the left.">
selected="{SelectedAdvancedOptionCategoryIndex}">
<column type="check" width="20" values="{AdvancedOptionCategoryEnabled}" onchange="{ToggleAdvancedOptionCategoryAt}" />
<column type="text" width="*" items="{AdvancedOptionCategoryNames}" onclick="{ToggleAdvancedOptionCategoryAt}" />
</list>
<field x="4" y="168" w="260" h="16" text="{AdvancedOptionValueDraft}"
onchange="{SetAdvancedOptionValueDraft}" onsubmit="{SubmitAdvancedOption}"
maxlength="160" clearonsubmit="false" background="#E6000000"
tooltip="Edit the selected advanced-option value and press Enter to apply." />
maxlength="160" clearonsubmit="false" background="#E6000000" />
<label x="4" y="188" w="384" h="80" text="{AdvancedOptionDescription}" color="#FFE8DEC3"
anchor="left top right" />
</panel>

View file

@ -184,6 +184,43 @@ public sealed class MossTankMarkupBuildOverRealFilesTests
+ $"the repositioned category list (left edge {categoryList.Left}).");
}
/// <summary>
/// Owner's third live look (2026-09-07): "Also still have tooltips in
/// the advanced options, remove please." VTank's own AdvancedOptionsView
/// has no tooltip mechanism at all — its description readout is the
/// retail in-popup info channel, not a hover tooltip. Builds the real
/// mosstank-advanced.xml against a real panel (the same shape every
/// other test in this file uses) and walks the WHOLE resolved tree —
/// not just the three elements that used to carry tooltip= — so a
/// tooltip added anywhere else in this popup in the future fails this
/// pin too. <see cref="MarkupDocument.Build"/> only ever sets
/// <see cref="UiElement.RuntimeTooltipTextSource"/> when the source
/// element declared a real tooltip= attribute (MarkupDocument.cs's own
/// ApplyCommonAttributes), so a null source function here means no
/// tooltip was ever bound for that element.
/// </summary>
[Fact]
public void AdvancedOptionsPopupHasNoElementWithATooltip()
{
string xml = File.ReadAllText(
Path.Combine(MossTankMarkupDirectory, "mosstank-advanced.xml"));
var panel = new MossTankPanel(new StubHost());
UiNineSlicePanel built = MarkupDocument.Build(xml, panel, static id => (id, 32, 32));
AssertNoElementHasATooltip(built);
}
private static void AssertNoElementHasATooltip(UiElement element)
{
Assert.True(
element.RuntimeTooltipTextSource is null,
$"{element.GetType().Name} carries a tooltip — the Advanced "
+ "Options popup must have none (owner's third live look).");
foreach (UiElement child in element.Children)
AssertNoElementHasATooltip(child);
}
/// <summary>
/// D-6 (round E architecture re-check): every real-file re-layout pin
/// so far only inspects ONE named element after a resize (the