Map editor: top-anchored command bar, and the harness must not persist the author's UI state #286
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#286
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tools panel is a floating ImGui window that
Tabhides, and the hidden state is rememberedbetween sessions. The owner opened the editor and the panel was simply gone, with nothing on screen to
say why or how to get it back — because a screenshot run had sent
ui offover the automation channel andthat flag was persisted into
editor-view.json.Owner's call: "io lo metterei come anchor in cima tipo una barra comandi apribile" — a top-anchored,
openable command bar.
It fixes a second, older problem too, already recorded in
docs/map-editor.md: the 3D view exists to judgerelief, and the panel covered most of the window, so it could not do the one thing it is for.
Tab-hidingwas the plaster. A bar one row tall removes the need for the plaster.
Agreed design
bar itself plus a status strip (cursor, Z, dirty chunks, px/cell). The state the owner hit becomes
unreachable.
Caldera and Road stack all their sliders permanently, whatever tool is selected; ~40 controls are on
screen at all times.
a pick-once-then-paint action.
Tabcollapses, it no longer hides. "Hide everything" survives only as a harness verb for cleancaptures, and it is never persisted.
EditorGame.DrawToolsWindowis ~280 lines in one method; the authoringparameters move to their own type and the drawing to its own, so
EditorGamestays the thin coordinatorits
CLAUDE.mdrequires (the editor's mirror of theScreenHARD GATE).Invariants Check
Walked against
CLAUDE.md## Design checklist, plus the editor's own guardrails. No violations.Scopeok - editor chrome plus the harness bug that caused it -Server-authoritativeN/A, the editor isoffline and issues no intent -
GM authorizationN/A -Identity modelN/A -Protocol versionedN/A, nowire type -
String catalogN/A, internal tool, not player-facing copy -Single-threaded simN/A, noWorld-World.cs HARD GATEuntouched -Screen HARD GATEthis is the point: 280 lines of ImGui inone method become focused units the coordinator orchestrates -
Client engine-independencedrawing isImGui glue and stays in
MapEditor; the one pure piece (persisted view state) moves toCoreand becomesunit-tested -
Gameplay/NetworkingN/A -Act on the instanceN/A -Extend by typeno new switch on atype -
Typed content-defN/A -Server-paced actionsN/A -PersistenceN/A:editor-view.jsonisneither the world save nor a DB -
Process separationN/A -Typed optionstunables stay typed fieldswith one default each -
Broadcasts/AoIN/A -Multi-platformImGui.NET on DesktopGL, already portable -Assetsno new art -Asset namingN/A -Walkability by slopeN/A -Occupancy contains renderN/A -Cutaway is structuralN/A -ModernUOno equivalent (its editing is in-game via GM gumps); we divergebecause ours is an offline tool -
Docs & DoDdocs/map-editor.mdControls section rewritten in the samechange.
Editor guardrails: UI stays off-the-shelf ImGui, no hand-rolled widgets; no map logic moves into drawing;
the canvas stays a bitmap.
Verification plan
Honest about this: it is chrome, and there is almost nothing unit-testable. What there is, is isolated on
purpose.
MapEditor.Core): the persisted view state becomes a pure type with one testable rule -a change that came from the harness is never written to disk. Today's bug, pinned by a test instead of
by memory.
tool selected; the bar collapsed; the contextual row for Ridge / Caldera / Road; a pending proposal with
Commit/Discard visible; and the 3D view with the bar, to show it no longer covers the relief.
Definition of Done
Beyond the base DoD (tests green, whole solution builds, zero warnings) and the multi-platform requirement:
the hide verb, quit, reopen - the bar is there, and
editor-view.jsonstill has chrome enabled.Tabcollapses to the status strip;the strip always shows cursor, Z, dirty chunk count and px/cell.
proposal exists - it is a decision the author must make, so it may never sit behind a popup.
EditorGameno longer contains the chrome drawing, and no method of it exceeds the coordinator role.docs/map-editor.mddescribes the bar, whatTabdoes, and that the harness view verbs aresession-only.