The combo drops its padding and turns portrait — a 4:5 field puts the symbol dead center

Owner's first review of the combo rework (2026-08-09): remove the face padding, make the
field taller and narrower at about a 4:5 width:height ratio, and center the symbol glyph in
its face. All three land in ComboFieldMetrics, so ColorComboControl and SymbolComboControl
stay the identical shape they were built to share.

- ComboFieldMetrics grows a width figure (height * widthToHeightRatio, 0.8), replacing
  NSView.noIntrinsicMetric — every combo now carries its own taller, narrower intrinsic size
  instead of stretching to whatever a caller's frame proposed.
- facePaddingH/facePaddingV/glyphPadding are gone; a face fills its zone edge to edge.
  glyphPointSize is now whichever of the face's own width/height is smaller, with nothing
  subtracted for padding that no longer exists.
- SymbolComboControl.drawFace centers the glyph on both axes — it only ever centered
  vertically before, despite its own doc comment claiming otherwise.
- ComboFieldControl.drawTrigger bounds its chevron square by the smaller of the trigger
  strip's own width/height, not height alone, since the strip is no longer close to square
  once the field is much taller than it is wide.
- CardSidebarSections drops the sidebar's old '* 0.55' fixed-width frame on both combo rows;
  each control now sizes itself, and both anchors (card sidebar, board popover) compose the
  narrower field with no other changes needed.
- ComboFieldMetricsTests updated for the new figures, plus a ratio-holds-at-every-size test
  and a rewritten glyph-fit test matching the no-padding rule.

Verification: xcodebuild build succeeded; xcodebuild test -only-testing:KanbanTests — 3220
tests in 559 suites, 3 failures, all PointerLatencyTests (documented locked-screen
environmental mode, confirmed unrelated by isolated rerun). Pixel verification unexercised —
same locked-screen constraint the first pass hit.

Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
2026-08-09 12:06:01 -04:00
parent fda19881de
commit 50e26efdb9
6 changed files with 136 additions and 88 deletions
+6 -6
View File
@@ -68,12 +68,12 @@ enum CardWindowMetrics {
/// What a sidebar *section* actually gets to lay out in: the column minus its two gutters.
///
/// Named because a section can need a number rather than a proposal originally the embedded
/// style editor's grids, a fixed count of fixed-size wells per row whose count had to be decided
/// before the layout ran (`StyleEditorLayout.sidebar(contentWidth:)`); the Style section's compact
/// `SymbolPicker` (2026-08-08) replaced that embed, but the Background color combo it sits beside
/// still sizes itself off this figure (`CardStyleSection.backgroundComboRow`). Everything else in
/// the sidebar simply fills what it is proposed and never asks.
/// Named because a section can need a number rather than a proposal the embedded style editor's
/// grids, a fixed count of fixed-size wells per row whose count had to be decided before the
/// layout ran (`StyleEditorLayout.sidebar(contentWidth:)`). The Style section's combos
/// (`CardStyleSection`'s background and symbol rows) no longer size off this figure since
/// 2026-08-09 they carry their own intrinsic width (`ComboFieldMetrics`) and simply fill what
/// they are proposed, like everything else in the sidebar.
static func sidebarContentWidth(bodyPointSize: CGFloat) -> CGFloat {
sidebarWidth(bodyPointSize: bodyPointSize) - 2 * gutter(bodyPointSize: bodyPointSize)
}