Leave row labels at their default width

Each group_by level is its own row-header column, so fitting the first to
its longest label pushes the second to start after it — and the default
spacing reads better than the fitted result, cap or no cap. Fit now sizes
the data columns only, which is what it was doing when it was useful.

fitRowLabels is kept, unused, one call away: the measurement was the hard
part and the judgement about whether to apply it may change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-09-17 15:13:48 -04:00
parent df8b6f56c9
commit a9062c398c

View File

@ -1069,7 +1069,11 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio
grid.resetAutoSize() grid.resetAutoSize()
await grid.draw({ invalid_columns: true }) await grid.draw({ invalid_columns: true })
await fitRowLabels(grid) // Row labels are deliberately left at their default width. Each group_by
// level is its own column, so fitting the first to its longest label pushes
// the second to start after it, and the default spacing reads better than
// the fitted one. fitRowLabels below still does it, one call away, if that
// judgement changes.
// Widths are not part of ViewConfig, so persist the layout to keep the // Widths are not part of ViewConfig, so persist the layout to keep the
// saved copy in step with what is on screen. // saved copy in step with what is on screen.