Skip to content

Fix the editor's unit minus and warning colour, and tighten the gallery - #270

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3
Oct 10, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt in a Claude project thread.

Before: unit symbols with a negative exponent drew as s?¹, because the bundled JetBrains Mono NF has every superscript digit but no U+207B. This happened in the real editor as well as in the gallery. The "Warning" label in the diagnostics list was close to invisible on the dark theme, because its text was given the frame colour. The gallery frames were 1440x900 and mostly empty. The left pane cut off its tab labels, and Open Recent was disabled in "Starting a schema".

After: wherever the font lacks the superscript minus, the editor draws it as a raised bar (U+00AF), in the unit button, its tooltip and the unit picker. Once the font has the real glyph, it is drawn instead. The schema file is untouched. Warning and Error labels use EditorTheme.SeverityText, as does the code generator's save prompt, which had the same bug. Gallery pictures are now 1480x620 (1480x800 for the fixed-size theme browser). The left pane takes 27%, so every tab label is shown whole. A recent file is seeded before the File menu is photographed, and that picture is cropped to the menu. The README shows member-metadata.png as the gallery preview.

How:

  • Schema.Editor/UnitText.cs asks the current font with IsGlyphInFont.
  • UnitTextTests is a regression test. It checks that the minus drawn is one the font has, and fails when the substitution is removed (mutation-checked).
  • Full UI suite: 203/203 passing.

Not changed: the partly visible last row in the pickers. It comes from ImGui's default list-box height (7.25 rows) inside ktsu.ImGui.Popups, which lives in ImGuiApp rather than here. It is also ImGui's own hint that the list scrolls.

Feature correctness (each picture checked against the sample schema):

  • Starting a schema: correct. With nothing open, Save, Save As and Open Externally are disabled.
  • Editing a class: correct.
  • Member metadata: correct. The unit, range, default and interpolation match GallerySchema.
  • Choosing a type: correct. The member's current type is selected, but it sits below the visible part of the list. Scrolling to the selection would be a SearchableList change in ImGuiApp.
  • Choosing a unit: fixed in this PR (the superscript minus). The member is a plain Float with no quantity, so the full unit list is the right offer, and m/s is preselected.
  • Editing an enum: correct.
  • Code generators: correct.
  • Class graph: correct. The edges are Player→Inventory, Inventory.Items[]→Item and Item.Rarity→Rarity, and nothing else.
  • Diagnostics: correct. The base schema validates clean, and the three warnings are exactly those the staged untyped member and the empty data source should produce.
  • Themes: correct. The current theme (VSCode Dark) is the one applied.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB


Generated by Claude Code

- Draw a unit's superscript minus (U+207B) as a raised bar when the font
  has no glyph for it; the bundled JetBrains Mono NF lacks it, so s⁻¹
  drew as s?¹ in the unit button, its tooltip and the unit picker.
- Colour the "Warning"/"Error" label text with SeverityText rather than
  the frame colour, which drew it near-invisible on a dark background;
  the same for the code generator's save prompt.
- Gallery: photograph at 1480x620 (1480x800 for the theme browser) so
  frames are not mostly empty, widen the left pane so its tab labels are
  whole, seed a recent file so Open Recent is enabled, and crop the File
  menu picture to the menu.
- README: show member-metadata.png as the gallery preview.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 6406a4f into main Oct 10, 2026
15 checks passed
@matt-edmondson
matt-edmondson deleted the claude/project-thread-4d94d3 branch October 10, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants