Skip to content

Let the library rail go down to 160px - #213

Merged
vmillet-dev merged 2 commits into
mainfrom
narrow-library-rail
Sep 18, 2026
Merged

vmillet-dev merged 2 commits into
mainfrom
narrow-library-rail

Conversation

@vmillet-dev

@vmillet-dev vmillet-dev commented Sep 18, 2026

Copy link
Copy Markdown
Owner

The rail opened at 288px and would not be dragged under 220, which on a small window is a
third of it spent on a handful of short names.

That floor was never the tree's. space-editor and folder-editor both carry
min-width: 240px — what gives a dropdown a width at all — and the rail projects them
inline between its rows, so a narrower rail scrolled sideways and put the delete button
out of reach. The minimum is handed down as --editor-min-width instead, and the rail sets
it to 0: a custom property, because a rule spelled in the rail's own stylesheet is
rewritten with the rail's _ngcontent and can never reach into a component's (#207).

Fluid means the rows inside wrap rather than squeeze — .editor-form, .editor-delete-row,
.editor-colours and the rail's creation form take flex-wrap: wrap and a basis on the
field, so the button drops under it below about 230px and stays beside it above. Nothing
moves at the switchers' 240px. The floor is then 160, and so is the default: the width is
remembered like the window's own geometry, so the default is a first launch and nothing else,
and a profile that already holds 288 keeps it — asPixels clamps into the range, it does not
reset.

The ellipsis that was never there

Looking at the result rather than at the suite: a name too long came out cut mid-letter, no
ellipsis. text-overflow is a property of a block container and .node-name is a flex
one, which ignores it outright — the rule had been dead since the rail was written. It went
unseen because 288px never cut a name. The name lives in a .node-label of its own now.

Also pulled the folder panel back out of the 16px folder indent: at the floor those pixels
are the five colour swatches on one line rather than four and one.

Checks

npm run lint, npm test (1355), npm run build, npm run test:scripts, and the full e2e
suite — 22 spec files, including a new scenario in 05-spaces that narrows to the floor and
measures that the panel's controls are still inside the rail, which only a laid-out window
can say. Read the assembled application at 160px as well, panels open.

Closes #212

🤖 Generated with Claude Code

The rows line up, and the twisty is visible (second commit)

Two things the narrow rail made obvious. The sat inside the name of "all spaces",
so that one label started its own width plus a gap further right than every space under it;
it moves into the column the twisty already owns, and the two share a width, which is what
puts every name on one edge.

And is a small triangle by design — at the 12px the row's other marks use it drew a
speck nobody could identify. The size was read off the rendered pixels at 12 / 14 / 16 / 18 /
20px rather than guessed: 12 → 14 moved 72 pixels of the whole rail and changed nothing a
reader could see. It is 16px, where it reads as a triangle and still draws less ink than the
12.5px label beside it.

⚠️ Left alone deliberately: neither .node-twisty nor .node-menu takes hit-target, so
both sit under the 24×24 that WCAG 2.5.8 asks. Real, but pre-existing, and widening the first
column is the opposite of what this PR is for — worth its own ticket.

The floor was 220 and the rail opened at 288, and neither number was about
the tree: `space-editor` and `folder-editor` carry a `min-width` of 240px,
which is what gives a dropdown a width at all. Projected inline between the
rows they need no such thing, so the minimum is handed down as
`--editor-min-width` and the rail sets it to 0. The rows inside then wrap
rather than squeeze.

The name of a row was cut mid-letter rather than ellipsised on the way:
`text-overflow` is a block container's property and `.node-name` is a flex
one, which ignores it. It lives on a `.node-label` of its own now — nothing
said so for as long as the rail could not be narrow enough to cut a name.

Closes #212

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vmillet-dev vmillet-dev added this to the v0.3.1 — Room to work milestone Sep 18, 2026
The ✦ sat inside the name of "all spaces", so that one label started its own
width further right than every space under it. It moves into the column the
twisty already owns, which the two now share a width with.

⚠️ ▾ is a *small* triangle by design: at the 12px the row's other marks use,
it drew a speck nobody could identify. 16px is where it reads as a triangle —
read off the rendered pixels at five sizes, not guessed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vmillet-dev
vmillet-dev merged commit b443344 into main Sep 18, 2026
9 checks passed
@vmillet-dev
vmillet-dev deleted the narrow-library-rail branch September 18, 2026 15:25
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.

The library rail opens at 288px and will not go under 220

1 participant