Repository navigation
Panel sections that fold and fill cleanly, a shaded canvas well, and light by default - #134
Merged
Merged
Conversation
…panels
Collapsing and expanding the Workspace sections turned up a run of layout
faults; each is fixed at its cause and pinned by a test.
- The States filter stretched to ~300px tall whenever States took the
panel's spare height (Transitions folded) or was torn off into a tall
window: `.search-field { flex: 1 }` grew on the column axis.
- The dock fill grew to the panel's bottom whatever it held, so five states
stood over five hundred pixels of empty panel with the folded header
pinned to the bottom. It is content-sized now and shrinks only when its
rows are taller than the room; panel-list publishes the list's and the
section's floors, since a flex or grid item's automatic minimum is its
whole content.
- A header's grip and pop-out stayed lit after a mouse click (`:focus-within`
on a tabindex header); they reveal on hover and keyboard focus only.
- The grip lives in the header's left padding, with room before the title,
instead of reserving 18px of the row; at the 220px minimum that had pushed
the Transitions arrow past the edge. Titles, status chips and the machine
badge share shrink by priority, so a narrow row truncates chips first.
- The delta table's header was framed a gutter wider than its rows, and the
whole table sat a gutter narrower than the fields with nothing to scroll.
The header row draws the frame and is padded by the measured scrollbar.
- Section rules stopped ~10px short of the panel edge: the panel bodies no
longer reserve a stable scrollbar gutter.
- A folded multi-alphabet section says "Σ2 · Γ3 · Δ2" instead of nothing.
- Transition rows keep state names whole and truncate the label first.
- Both panels' section bodies share one padding token, and the Language
badge matches the count chips' 16px.
Also: a light shadow where the header, the panels and the sill meet the
canvas (an overlay above the diagram, below every control), and the status
pill takes the shadow the rest of the floating canvas chrome already had.
A reader who has never picked a theme now opens on Light; a stored choice, dark included, is kept. The base `:root` block is the default theme's, so the swap is structural: the base now holds the light palette beside the tokens no theme varies, and Dark is an override block like every other theme. Every theme already restated all 72 colour variables, so none inherits a light value by omission. The first paint follows: the theme-color meta and the Electron window's background are the light frame rather than a dark one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Left panel: collapsing and expanding sections
.search-fieldhadflex: 1, which grows on the column axis.panel-list.jspublishes the list's floor and the section's floor (--lw-floor,--dock-fill-min), because Chrome takes a flex or grid item's automatic minimum from its whole content (12,000px for a 200-state list).:focus-withinon atabindex="0"header; now they show on hover and keyboard focus only.scrollbar-gutter: stable, which reserved an empty 10px strip.Σ2 · Γ3 · Δ2instead of a bare "ALPHABETS".carry 0, notca…), truncating the label first.Both panels: consistency
I measured every docked section header across both panels and all tabs. Height, padding, title type and position, arrow, grip and borders now match. Two real drifts are fixed:
3px 14px 12px, right4px 14px 14px. Both use one token now.The filter text size now matches the other entry fields.
Canvas
--tab-overflow-shadow.Light is the default theme
:rootblock is now the light palette plus the shared tokens, and Dark is an override block like every other theme.theme-colormeta and the Electron window background are light.Tests
npm test: 2,790 pass.tests/panel-sections-css.test.js(9 stylesheet-level pins, since the DOM stub computes no styles). All of them fail against the old CSS.tests/workspace-sections.test.js.tests/themes.test.jsnow takes the dark block as its reference for "every override restates the same variables".npm run buildsucceeds.Not in this PR
deriveRegexthrowsRangeError: Invalid string lengthon a 60-state cross-linked DFA. The regex expands past V8's string limit well underREGEX_DERIVE_MAX_STATES = 120. Found while testing; left for its own change.