From 617a9c2218d6b659720e2f8941e958c655f15348 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 7 Sep 2026 21:12:15 +0200 Subject: [PATCH] fix(mosstank): drop tooltips from the Advanced Options popup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../mosstank-advanced.xml | 19 ++++++---- .../MossTankMarkupBuildOverRealFilesTests.cs | 37 +++++++++++++++++++ 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/AcDream.Plugins.MossTank/mosstank-advanced.xml b/src/AcDream.Plugins.MossTank/mosstank-advanced.xml index 8024e7db..d73783d5 100644 --- a/src/AcDream.Plugins.MossTank/mosstank-advanced.xml +++ b/src/AcDream.Plugins.MossTank/mosstank-advanced.xml @@ -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. --> + selected="{SelectedAdvancedOptionIndex}" onchange="{SelectAdvancedOption}"> @@ -181,15 +188,13 @@ pure checklist with no real selection concept — see SelectedAdvancedOptionCategoryIndex's own doc comment. --> + selected="{SelectedAdvancedOptionCategoryIndex}"> + maxlength="160" clearonsubmit="false" background="#E6000000" /> diff --git a/tests/AcDream.App.Tests/UI/MossTankMarkupBuildOverRealFilesTests.cs b/tests/AcDream.App.Tests/UI/MossTankMarkupBuildOverRealFilesTests.cs index df6a1e5b..6f72e462 100644 --- a/tests/AcDream.App.Tests/UI/MossTankMarkupBuildOverRealFilesTests.cs +++ b/tests/AcDream.App.Tests/UI/MossTankMarkupBuildOverRealFilesTests.cs @@ -184,6 +184,43 @@ public sealed class MossTankMarkupBuildOverRealFilesTests + $"the repositioned category list (left edge {categoryList.Left})."); } + /// + /// 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. only ever sets + /// 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. + /// + [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); + } + /// /// D-6 (round E architecture re-check): every real-file re-layout pin /// so far only inspects ONE named element after a resize (the