Put the row-label floor back to 3

The floor is the indentation: every row-header column sits at it, and a
level's inset is the previous column's width. Raising it to 12 to give
clipped labels room widened every level's indent by the same amount,
which is the opposite of the compact tree that was wanted. Making a
label readable means letting the text overflow its column, not growing
the column to hold it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-09-23 00:06:39 -04:00
parent 818aa5e4fc
commit 3257ac2639

View File

@ -1259,11 +1259,14 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio
// //
// The same floor goes under every row-header column, which is what makes it // The same floor goes under every row-header column, which is what makes it
// safe for the indentation: a level's indent is the previous column's width, // safe for the indentation: a level's indent is the previous column's width,
// so a uniform floor steps evenly, where a per-column fit does not. Three // so a uniform floor steps evenly, where a per-column fit does not.
// characters was too mean to read a label through; this is the one number to //
// turn if the labels are still squished, and the cost of turning it is that // It is deliberately small, and must stay small: this number IS the
// every level indents by that much more. // indentation. Raising it to give a clipped label more room to render widens
const MIN_ROW_LABEL_CHARS = 12 // every level's inset by the same amount, which is the opposite of what a
// compact tree wants. Making labels readable is a separate job -- the text
// has to overflow its column, not the column grow to hold the text.
const MIN_ROW_LABEL_CHARS = 3
async function ensureRowLabelWidth() { async function ensureRowLabelWidth() {
const grid = (await viewerRef.current?.getPlugin())?.regular_table const grid = (await viewerRef.current?.getPlugin())?.regular_table