loopable / web /src /styles /wave46 /schema-viewer.css
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
06aad61 verified
Raw History Blame
14.2 kB
/* ---------------------------------------------------------------------------
W46-T45 (owner instruction 23, contract C6) β€” the schema viewer wears the
Settings modal's shape, and the "View schema" menu row gets a mark.
⭐ WHY A SEPARATE SHEET, AND WHY IT IS IMPORTED FROM `NavExtras.tsx`.
C6: a wave sheet is imported by the component that owns the surface, AFTER
that component's existing stylesheet import, so the override lands later in
the bundle than `navExtras.css` by construction. It is NEVER added to
`index.css` β€” a global sheet gives a lane-local override a global blast
radius and re-opens the seam C6 exists to close.
β›” AND ORDER ALONE IS NOT TRUSTED. Every rule below is anchored on
`.shell-schema` (or, for the drawer element itself, on its backdrop parent,
because an element cannot be its own ancestor), so each selector outranks
`navExtras.css`'s single-class rule on SPECIFICITY. A bundler that reorders
two sheets then costs nothing instead of silently reverting the panel.
β›” TOKENS ONLY. No literal font-size and no inline colour: `verify_ui.py`'s
R5 leg scans every stylesheet under `src/` and reds on a literal.
The design target is `SettingsModal.tsx`'s chrome, read out of `index.css`:
`.set-modal` `.set-body` `.set-close` `.set-h` `.set-h4` `.set-label`
`.set-card`. Each rule below names the sibling it is matching.
⚠ IT STAYS A RIGHT-SIDE DRAWER. DESIGN.md §4 puts a detail panel in a right
drawer; the contract asks for the Settings modal's computed TYPE and SURFACE
values, not its position. Only the corners facing the content are rounded,
because the drawer is flush to the viewport's right edge and rounding there
would show backdrop slivers down the seam.
--------------------------------------------------------------------------- */
/* ── the menu glyph ────────────────────────────────────────────────────────── */
/* `.shell-navmenu-item` is already `display:flex; align-items:center; gap:8px`,
so a leading glyph slots into the existing row without touching its layout.
Box, weight and tone live here and never in an inline style β€” the same shape
`.shell-newthing-plus` uses one file over. */
.shell-navmenu-item .shell-schema-glyph {
flex: none;
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
color: var(--lp-muted);
}
.shell-navmenu-item:hover .shell-schema-glyph {
color: var(--lp-ink);
}
/* ── the drawer surface: `.set-modal` ──────────────────────────────────────── */
.shell-schema-backdrop .shell-schema {
border-radius: var(--lp-r-lg) 0 0 var(--lp-r-lg);
/* `.set-modal` uses the named token; the literal rgba it replaces was the
one an anti-slop sweep never sees. */
box-shadow: var(--shell-shadow-overlay);
}
/* ── the head: `.set-h` (title) and `.set-close` ───────────────────────────── */
.shell-schema .shell-schema-head {
/* the body's horizontal rhythm, so the title sits over the content edge */
padding: 18px 26px 14px;
}
.shell-schema .shell-schema-title {
font-weight: 620;
}
.shell-schema .shell-schema-close {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border-radius: var(--lp-r-sm);
}
/* ── the body: `.set-body` ─────────────────────────────────────────────────── */
.shell-schema .shell-schema-body {
padding: 22px 26px 30px;
}
.shell-schema .shell-schema-note {
/* the literal 6px/8px radii in this drawer are the last inline geometry in
it; the note is a notice, and `.set-notice` rounds on the small token. */
border-radius: var(--lp-r-sm);
}
/* ── the section head: `.set-h4` ───────────────────────────────────────────── */
/* `.set-h4` is `--lp-fs-sm` / 620 and takes its colour from the pane, which is
ink. The kicker was `--lp-fs-2xs` / 600 / muted β€” three roles away from the
sibling it is supposed to read as. */
.shell-schema .shell-schema-kicker {
margin: 20px 0 12px;
font-size: var(--lp-fs-sm);
font-weight: 620;
color: var(--lp-ink);
}
.shell-schema .shell-schema-body > .shell-schema-kicker:first-child {
margin-top: 0;
}
/* ── the containment: `.set-card` ──────────────────────────────────────────── */
/* ONE layer, never a card inside a card: the two sections each sit in their own
`.set-card`-equivalent, which is what gives the panel the Settings modal's
read instead of two lists floating on the surface. */
.shell-schema .shell-schema-card {
padding: 16px 18px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-wash);
}
/* The first database-owned setup section. It uses the same contained-card hierarchy as the
field list, but a normal form control is clearer than a faux map-toolbar picker: this choice
belongs to the database schema, not to one currently open View. */
.shell-schema .shell-schema-map-setup {
display: grid;
gap: 8px;
}
.shell-schema .shell-schema-setup-label {
font-size: var(--lp-fs-xs);
font-weight: 620;
color: var(--lp-ink);
}
.shell-schema .shell-schema-setup-control {
display: grid;
gap: 4px;
}
.shell-schema .shell-schema-setup-control > span {
font-size: var(--lp-fs-2xs);
font-weight: 620;
color: var(--lp-muted);
}
.shell-schema .shell-schema-setup-control select {
width: 100%;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
padding: 7px 9px;
}
.shell-schema .shell-schema-setup-control select:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
.shell-schema .shell-schema-setup-control select:disabled {
color: var(--lp-muted);
opacity: 0.65;
cursor: not-allowed;
}
.shell-schema .shell-schema-setup-actions {
display: flex;
justify-content: flex-end;
margin-top: 2px;
}
.shell-schema .shell-schema-setup-actions button {
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-xs);
font-weight: 620;
padding: 6px 9px;
cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
.shell-schema .shell-schema-setup-actions button:hover:enabled {
border-color: var(--lp-blue-deep);
}
}
.shell-schema .shell-schema-setup-actions button:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
.shell-schema .shell-schema-setup-actions button:disabled {
color: var(--lp-muted);
opacity: 0.65;
cursor: not-allowed;
}
.shell-schema .shell-schema-setup-value,
.shell-schema .shell-schema-setup-help,
.shell-schema .shell-schema-setup-status,
.shell-schema .shell-schema-setup-error {
margin: 0;
font-size: var(--lp-fs-2xs);
line-height: 1.4;
}
.shell-schema .shell-schema-setup-value {
color: var(--lp-ink);
}
.shell-schema .shell-schema-setup-help,
.shell-schema .shell-schema-setup-status {
color: var(--lp-muted);
}
.shell-schema .shell-schema-setup-error {
color: var(--lp-red-deep);
}
/* `.set-card--rows`' lesson: inside a bordered card the final hairline has
nothing under it to separate and reads as a stray underline. */
.shell-schema .shell-schema-card tbody tr:last-child td {
border-bottom: 0;
}
.shell-schema .shell-schema-card .shell-schema-measure:last-child {
border-bottom: 0;
}
/* ── the micro label: `.set-label` ─────────────────────────────────────────── */
.shell-schema .shell-schema-table th {
font-size: var(--lp-fs-2xs);
}
/* ============================================================================================
W46-T46 - the Workflows strip and the agent detail header (owner instruction 22)
APPENDED SECTION. Everything below this banner belongs to W46-T46 and to
`automation/AutomationDetail.tsx`; nothing above it was read, reordered or edited. The rest of
this sheet is the shell's schema viewer and is another session's work.
THE ROOT CAUSE IS NOT HERE. `.w45-workflow-bar` was a direct child of `.auto-work`, which
`index.css` declares `display: flex` - a ROW - so the strip was laid out as a full-height
sibling COLUMN of the builder (measured 769x772 at 1440x900) and squeezed the Properties rail
to about 40px. That is fixed structurally in the TSX, by moving the strip up one level to sit
beside `.auto-batch` inside the flex-COLUMN `.auto-detail`. These rules only finish the job,
and they are anchored on `.auto-detail >` so they win on specificity as well as on the import
order C6 pins, rather than depending on order alone.
============================================================================================ */
/* The strip is a band, so it takes its own height and never grows or shrinks with the work area.
⚠ `flex-wrap` is the one addition that matters: `.w45-governance` is a `width: 100%` grid
sharing a nowrap row with a label, a select and three buttons, so before this it forced the
row far past the viewport with the browser's own overflow rules deciding what got clipped. */
.auto-detail > .w45-workflow-bar {
flex: 0 0 auto;
flex-wrap: wrap;
row-gap: 8px;
padding: 8px 16px;
background: var(--lp-surface);
}
.auto-detail > .w45-workflow-bar > label {
color: var(--lp-muted);
font-weight: 600;
}
/* Native chrome reset, DESIGN.md Β§4: both selects shipped with the browser's own border,
background and font, which is a visible part of what "mangled" describes. `.w45-quiet` already
resets its buttons correctly and is left alone. */
.auto-detail > .w45-workflow-bar select {
border: 1px solid var(--lp-line);
background: var(--lp-surface);
font: inherit;
color: inherit;
padding: 4px 8px;
border-radius: var(--lp-r-sm);
max-width: 18rem;
}
.auto-detail > .w45-workflow-bar select:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
/* The capabilities fieldset takes a row of its own once the strip wraps.
⚠ THE CAP IS NOT COSMETIC. At 1024x768 the whole work area below this strip is 640px tall, and
the grant matrix grows with the chosen database's field count, so an uncapped fieldset pushes
the builder off the screen on a wide table. It scrolls inside itself instead. */
.auto-detail > .w45-workflow-bar > .w45-governance {
flex: 1 1 100%;
margin-top: 0;
max-height: 34vh;
overflow-y: auto;
}
/* The fieldset and its legend are the last two pieces of unreset native chrome in the strip. */
.auto-detail > .w45-workflow-bar > .w45-governance > legend {
border: 0;
background: transparent;
font: inherit;
font-weight: 600;
color: var(--lp-muted);
padding: 0 4px;
}
.auto-detail > .w45-workflow-bar > .w45-governance select {
border: 1px solid var(--lp-line);
background: var(--lp-surface);
font: inherit;
color: inherit;
padding: 3px 6px;
border-radius: var(--lp-r-sm);
margin-left: 6px;
}
/* ── the detail header: it wraps rather than overlapping ────────────────────────────────────
β›” THE WORKFLOWS BUTTON WAS UNCLICKABLE AT 1024x768, which is a dead control and not a
cosmetic complaint. `.auto-head` is `space-between` with `.auto-head-actions` at `flex: 0 0
auto`, while `.auto-head-title` carries `min-width: 0`; the title was therefore allotted less
width than the view toggle draws, the toggle overflowed its box, and the save receipt
("All changes saved") landed on top of the Workflows button on the same 92-120px band.
Playwright refused the click there, naming the receipt as the interceptor.
⭐ THE HEADER ALREADY EXPECTS TO WRAP - `.auto-head-actions` is `flex-wrap: wrap` and
`verify_automation_ui` carries a check about the receipt and Run now staying together "when the
detail header wraps" - so this lets the header itself wrap instead of inventing a breakpoint,
and stops the title being allotted less than it draws. `.auto-head`'s `min-height` lets the band
grow; no height is fixed anywhere, so nothing below it is clipped. */
.auto-detail > .auto-head {
flex-wrap: wrap;
row-gap: 6px;
}
.auto-detail > .auto-head > .auto-head-title {
flex: 0 0 auto;
min-width: auto;
}
/* ⚠ THE ACTION ROW MAY SHRINK ONCE IT HAS ITS OWN LINE, and it must: at 1024 the receipt plus
Run now plus Save plus Delete is 329px against a 416px band, and a wrapped second line that
still refuses to shrink would simply move the clipping down a row instead of removing it.
⚠ `margin-left: auto` IS NOT DECORATION EITHER. `justify-content` on `.auto-head` resolves
PER FLEX LINE, so once the header wraps, line two holds only this row and `space-between` puts
it at main-START, left-aligned under the toggle. An auto margin resolves per line and keeps it
on the right where it is on one line, so wrapping changes the number of rows and nothing else.
The `justify-content` above governs this row's OWN children and is a different question. */
.auto-detail > .auto-head > .auto-head-actions {
flex: 0 1 auto;
min-width: 0;
justify-content: flex-end;
margin-left: auto;
}
/* ── end W46-T46 ──────────────────────────────────────────────────────────────────────────── */