Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 26,815 Bytes
f530297 1d4419b f530297 82cdb59 f530297 82cdb59 f530297 82cdb59 f530297 82cdb59 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | /* ---------------------------------------------------------------------------
styles/wave49/sheet.css β the Sheet module's page (wave 49 Β· T01).
Imported by `sheet/SheetPage.tsx`, the same way `styles/wave45/agent-operator.css` is imported
by `connectors/ConnectorsPage.tsx` and `styles/wave46/field-panels.css` by
`customer-grid/ColumnMenu.tsx`: from the surface that needs it, never from a global entry.
β NOTHING HERE SELECTS `.shell-nav-sheet`, AND THAT IS DELIBERATE. The rail row needs no CSS of
its own β it inherits `.shell-nav-item` and `.shell-nav-icon` like every other row β and
`verify_ui.py::nav_type_drift` derives the per-row nav classes FROM THE TSX and goes red on any
rule that declares type on one of them. The rail rows render identically today (13.8125px / w500,
measured); a rule restating size or weight for one of them is exactly how they stop.
β TOKENS ONLY: no literal `font-size` (only `--lp-fs-*`), no literal colour, no literal z-index.
`verify_ui.py::font_literals` and `css_literals` scan the whole tree, not just `index.css`.
--------------------------------------------------------------------------- */
.sheet-page {
display: flex;
align-items: stretch;
width: 100%;
height: 100%;
min-height: 0;
overflow: hidden;
background: var(--lp-wash);
}
/* ββ the ordinary view rail, one kind (R2) ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SEVEN RULES WERE DELETED HERE BY W50-T19, AND THE REASON IS W50-T17. That ticket moved the
Sheet rail onto the Data rail's SHARED vocabulary (`cg-views`, `cg-view-row`, `cg-fold*`), so
`.sheet-rail`, `.sheet-rail-title`, `.sheet-view-list` and `.sheet-view-row` plus its `:hover`,
`.is-active` and `.is-active .sheet-view-icon` states no longer matched anything the tree
renders: each was verified against `src/` before it was removed. A dead rule that restates a
shipped measure is exactly what drifts from the live one the first time either is touched.
β `.sheet-view-icon` ITSELF STAYS, and it is the one that had to. `SheetRail.tsx:102` still
renders it, and `styles/wave50/sheet.css` re-aims its ACTIVE tone at `.cg-view-row.is-active`
while deliberately not repeating the size, stroke and muted tone declared below. */
.sheet-view-icon {
flex: 0 0 auto;
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.35;
stroke-linecap: round;
stroke-linejoin: round;
color: var(--lp-muted);
}
.sheet-view-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ββ the body T02 replaces ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ W50-T19 β THIS RULE IS WHY THE GRID NEVER RENDERED, AND THE MISSING LINE WAS
`flex-direction`.
It was `display: flex` with no direction, so it was a ROW: the toolbar, the notice and the grid
were laid out SIDE BY SIDE, and `align-items: flex-start` then gave `.sheet-grid-wrap` its
CONTENT height, which is `.sheet-grid-head` at 28 px plus a canvas box of zero.
β AND ZERO IS NOT A CLIPPED GRID, IT IS NO GRID. glide's
`internal/scrolling-data-grid/infinite-scroller.js` returns an EMPTY div at a measured width or
height of zero, so its two `<canvas>` children were never created at all. `column` plus
`min-height: 0` gives every box below a definite height, which is what lets `SheetGrid.tsx`'s
`height="100%"` resolve.
β THE PADDING MOVED TO `.sheet-placeholder` RATHER THAN BEING DROPPED. The 48 px of air was
always the empty state's, not the grid's; leaving it here would have inset the toolbar's own
border and floated the grid inside a frame. */
.sheet-body {
flex: 1 1 auto;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
}
.sheet-placeholder {
max-width: 520px;
margin: 48px auto;
padding: 24px;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-lg);
}
.sheet-placeholder-title {
margin: 0 0 8px;
font-size: var(--lp-fs-lg);
font-weight: 600;
color: var(--lp-ink);
}
.sheet-placeholder-note {
margin: 0;
font-size: var(--lp-fs-sm);
line-height: 1.55;
color: var(--lp-muted);
}
/* ββ W49-T05: the toolbar, the grid and the non-modal cell action bar βββββββββββββββββββββββββ
Token-only, per DESIGN.md Β§3 and Β§5: no literal colour, no literal font-size, no literal
z-index. Motion is 150 ms ease-out on opacity and transform only (Β§4). */
/* β `flex: 0 0 auto` ON EVERY CHROME ROW. `.sheet-body` is a column now, and a flex item's
default `flex-shrink: 1` would let the notice be squeezed by a tall grid.
ββ W51-T08 REMOVED `.sheet-toolbar`, `.sheet-title`, `.sheet-toolbar-right` AND `.sheet-stamp`.
Owner instructions 8 and 10: the Sheet page carries no page title, and exactly one ribbon sits
above exactly one formula bar above the canvas. The toolbar was a third band of chrome above
both, so the row and its heading are gone from the markup and their rules are gone from here.
Refresh survives the removal and moved to the ribbon's own row (R8), handed down from
`SheetPage.tsx` as `onRefresh` rather than drawn on this page. */
/* ββ `.sheet-refresh` IS NOT THE TOOLBAR'S BUTTON ANY MORE, AND IT STAYS. Seven controls in
`SheetPage.tsx` wear this class: the tab rename and tab delete dialogs, the structure band and
the R20 convert dialog. Deleting the rule with the toolbar that named it would have unstyled
every one of them, which is why the class outlived the element it was written for.
A quiet button: muted ink, hover wash, native chrome reset (Β§4). */
.sheet-refresh,
.sheet-action {
appearance: none;
border: 1px solid var(--lp-line);
background: var(--lp-surface);
color: var(--lp-ink);
font: inherit;
font-size: var(--lp-fs-xs);
padding: 5px 10px;
border-radius: var(--lp-r-md);
cursor: pointer;
transition: background-color 150ms ease-out, opacity 150ms ease-out;
}
.sheet-refresh:hover:not(:disabled),
.sheet-action:hover:not(:disabled) {
background: var(--lp-blue-tint);
}
.sheet-refresh:disabled,
.sheet-action:disabled {
opacity: 0.55;
cursor: default;
}
.sheet-notice {
flex: 0 0 auto;
margin: 0;
padding: 8px 16px;
font-size: var(--lp-fs-xs);
color: var(--lp-ink-muted);
background: var(--lp-surface-2);
border-bottom: 1px solid var(--lp-line);
}
.sheet-tab-notices {
flex: 0 0 auto;
}
.sheet-tab-notices .sheet-notice {
border-top: 1px solid var(--lp-line);
border-bottom: 0;
}
.sheet-grid-wrap {
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
}
.sheet-grid-head {
flex: 0 0 auto;
display: flex;
align-items: baseline;
gap: 12px;
padding: 6px 16px;
}
.sheet-grid-tab {
margin: 0;
font-size: var(--lp-fs-xs);
font-weight: 600;
color: var(--lp-ink);
}
/* R19: the count of hand typed values is stated, quietly, beside the tab name. */
.sheet-grid-literals {
margin: 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* β `position: relative` IS LOAD BEARING (W50-T19). The chart anchors are absolutely positioned
at glide's OWN origin plus one header row, so their containing block has to BE the canvas box.
While it was `.sheet-grid-wrap` they were already `.sheet-grid-head`'s height too low, and the
ribbon above would have added its own height to the same error.
β AND IT IS A FLEX COLUMN, SO GLIDE'S WRAPPER STRETCHES INSTEAD OF COMPUTING A PERCENTAGE.
`.gdg-wmyidgi` asks for `height: var(--wmyidgi-1)`, which this grid sets to `100%`; this box's
own 744 px comes from `flex: 1 1 auto`, and leaning on a percentage of a flex-derived height is
a bet on layout order that does not need making. As a flex ITEM the wrapper is simply given the
height, and the percentage becomes a second opinion that agrees.
β THE CHART ANCHORS ARE UNAFFECTED: they are `position: absolute`, so they are out of flow and
flex never sees them. */
.sheet-grid-canvas {
position: relative;
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
display: flex;
flex-direction: column;
}
.sheet-grid-canvas > * {
flex: 1 1 auto;
min-height: 0;
}
/* β NON-MODAL (R11): no backdrop, no focus trap. It floats above the canvas on the MENU layer,
which sits below every modal and drawer, so a drill popup opened from it covers it rather than
fighting it. The token is mandatory; a literal z-index is what broke the three-way stack before
([[z-layering-is-a-three-way-order]]). */
.sheet-action-bar {
position: fixed;
z-index: var(--cg-z-menu);
display: flex;
align-items: center;
gap: 2px;
padding: 3px;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-md);
/* A floating overlay paints its OWN surface. A transparent one over a canvas is unreadable
([[a-portal-overlay-carries-its-own-surface]]). */
background: var(--lp-surface);
box-shadow: 0 6px 18px rgba(25, 34, 46, 0.16);
animation: sheet-bar-in 150ms ease-out;
}
@keyframes sheet-bar-in {
from { opacity: 0; transform: translateY(3px); }
to { opacity: 1; transform: translateY(0); }
}
.sheet-action {
display: inline-flex;
align-items: center;
gap: 5px;
border-color: transparent;
}
.sheet-action-icon {
width: 14px;
height: 14px;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
stroke-linejoin: round;
}
/* ββ W49-T06 the binding editor, W49-T08 charts in cells βββββββββββββββββββββββββββββββββββββββ */
.sheet-binding {
position: fixed;
right: 16px;
top: 64px;
width: 420px;
max-height: calc(100vh - 96px);
overflow-y: auto;
z-index: var(--cg-z-drawer);
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-lg);
background: var(--lp-surface);
box-shadow: 0 10px 30px rgba(25, 34, 46, 0.18);
animation: sheet-bar-in 150ms ease-out;
}
.sheet-binding-title {
margin: 0;
font-size: var(--lp-fs-sm);
font-weight: 600;
color: var(--lp-ink);
}
.sheet-field {
display: flex;
flex-direction: column;
gap: 4px;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-field select,
.sheet-field input {
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
padding: 5px 8px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
/* A pair of short selects may share a line; the Year/Month pair below the period unit is the one
that still does, and it reads correctly at half of a 380px panel because each holds one word. */
.sheet-field-row {
display: flex;
gap: 10px;
}
.sheet-field-row .sheet-field { flex: 1 1 0; }
/* β W54-T30, OWNER INSTRUCTION 26: AGGREGATE AND COLUMN GET A LINE EACH. Half of a 380px panel is
176px, and the column picker is not one control but four stacked ones β a search box whose own
magnifying glass eats 27px of its width, a 168px scrolling result list, the chosen-column line
and a helper sentence. At 176px that sentence wrapped to two cramped lines under a box barely
wider than its placeholder. The Aggregate select beside it needed nothing like that room, so the
row was spending its width on the field that did not want it.
β THE TEST IS ON THE PICKER, NOT ON A ROW MODIFIER, so it cannot disagree with what is rendered:
the row stacks exactly when the column picker is inside it. `.sheet-field--pick` is load-bearing
already β `styles/wave50/sheet.css` gives it its `min-width: 0` β so it is not decoration that
can be dropped while the markup lives on.
β With Count chosen the picker is not rendered at all, this rule does not match, and the row is
a flex line holding one full-width child. Same picture, which is why no second rule is needed.
The 12px matches `.sheet-binding-scroll`'s own gap, so a stacked field joins the panel's existing
rhythm rather than sitting at a spacing only this row uses. The child override is what stops
`flex: 1 1 0` from being read down the vertical axis once the row turns. */
.sheet-field-row:has(.sheet-field--pick) {
flex-direction: column;
gap: 12px;
}
.sheet-field-row:has(.sheet-field--pick) > .sheet-field { flex: 0 0 auto; }
/* ββ ββ W54-T31 (ruling R8; owner instructions 6 and 8): THE COLUMN LIST IS A CENTRED POPUP ββ
Instruction 6, on the Sheet's Edit panel: "the navigation for adding a Column should be exactly
like how the Fields column opens under the Data module, but the popup in the middle, just like
building a Filter under 'Rows to include'". So the paint below is deliberately NOT a new
surface: `.lp-dialog` / `.lp-dialog-scrim` in `styles/wave51/kit.css` already are the centred,
token-only, portal-safe modal `SheetFilterPopup` opens beside it, and the rows are
`index.css`'s own `.cg-type-*` vocabulary. What is stated here is the geometry the kit cannot
know: how wide this particular dialog is, and how tall its list may grow.
β `.lp-dialog` is `min(420px, β¦)`, which is barely wider than the 380px panel this popup
exists to escape. 520px is what lets a column name and its key sit on two full lines without
either being cut. */
.sheet-column-popup {
width: min(520px, calc(100vw - 32px));
}
/* The heading, the find box, the list and the sentence under it, at the panel's own rhythm. */
.sheet-col-pick {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
/* β THE LABEL WRAPS IN HERE, AND THAT IS THE WHOLE POINT OF THE POPUP. `index.css` gives
`.cg-type-label` `white-space: nowrap` + `text-overflow: ellipsis`, which is right in a 176px
anchored list and wrong here: the owner's report is that several rows read as "sales.. metrics"
and could not be told apart, and an ellipsis is what MAKES two long names identical. Two
classes, so it settles by weight rather than by which stylesheet loaded last. */
.sheet-column-popup .cg-type-label {
white-space: normal;
overflow: visible;
text-overflow: clip;
}
/* `styles/wave50/sheet.css` caps this list at 168px, which is right for a box wedged inside the
panel and mean inside a dialog that has the whole viewport's height to play with. */
.sheet-column-popup .sheet-pick-list {
max-height: 320px;
}
/* β A TWO LINE ROW NEEDS A TWO LINE ROW'S GEOMETRY. `index.css` builds `.cg-type-row` around one
line: `align-items: center` and a 30px floor. With the key on a second line the glyph drifted
to the middle of the pair and the two lines closed up on each other, which is what the first
frame of this ticket showed. The name and its mark line up at the TOP, the row is given the
height the pair actually needs, and the mark takes a hair of offset so it sits on the name's
own line rather than above it. */
.sheet-column-popup .cg-type-row {
align-items: flex-start;
min-height: 40px;
padding: 7px 8px;
line-height: var(--lp-lh);
}
.sheet-column-popup .cg-type-row .cg-type-icon {
margin-top: 3px;
}
.sheet-column-popup .cg-fsel-hint {
margin-top: 1px;
line-height: var(--lp-lh-tight);
}
/* The Metric word rides at the top of the row too, beside the name it belongs to. */
.sheet-column-popup .cg-type-row .sheet-period-note {
flex: 0 0 auto;
margin-top: 2px;
}
/* The Column line's control fills its stacked row, the way the Aggregate select beside it does. */
.sheet-field--pick .sheet-col-open {
width: 100%;
}
.sheet-scope {
display: flex;
flex-direction: column;
gap: 8px;
margin: 0;
padding: 10px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
}
.sheet-scope legend {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
padding: 0 4px;
}
.sheet-radio {
display: flex;
align-items: center;
gap: 6px;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
}
.sheet-preview {
margin: 0;
padding: 8px 10px;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
background: var(--lp-blue-tint);
border-radius: var(--lp-r-md);
}
.sheet-binding-actions {
display: flex;
gap: 8px;
justify-content: flex-end;
}
/* A chart sits OVER the canvas on the column layer: above the grid, below every menu and modal. */
.sheet-chart-anchor {
position: absolute;
z-index: var(--cg-z-column);
pointer-events: none;
}
.sheet-chart {
width: 100%;
height: 100%;
overflow: hidden;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
box-shadow: 0 2px 8px rgba(25, 34, 46, 0.10);
}
.sheet-chart svg { width: 100%; height: 100%; }
.sheet-chart.is-empty {
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
text-align: center;
}
.sheet-drill-error {
position: fixed;
z-index: var(--cg-z-overlay);
left: 50%;
top: 30%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
gap: 10px;
padding: 16px;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
box-shadow: 0 10px 30px rgba(25, 34, 46, 0.18);
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
}
.sheet-grid-wrap { position: relative; }
/* ββ ββ W54-T33 (owner instruction 24): THE EDIT PANEL'S LOADING STATE ββββββββββββββββββββββ
Owner, verbatim: "In Sheet, when the Edit button is clicked and it is still loading, show the
loading animation instead of showing the user the wrong, unsaved configuration."
β ONE FLAT TONE, NO SHIMMER, AND THAT DECISION IS INHERITED RATHER THAN RETAKEN.
`shell/navExtras.css`'s `.shell-rail-skeleton*` rules are the shipped precedent and
`SheetRail.tsx::RailSkeleton` states the reason at its head: an animated sweep is a second thing
moving on a surface whose whole job is to sit still, and `prefers-reduced-motion` would then
need a third state. These rules copy that shape at this panel's measures; the rail's own classes
are NOT reused, because they live in a sheet this file may not edit and importing it here would
put the same rules in a second chunk.
β THE GEOMETRY IS THE SETTLED PANEL'S. `.sheet-binding-scroll` is a 12px-gap column inside a
380px panel, its three lead controls are `.sheet-field` label-plus-select pairs (W54-T30 gave
Aggregate and Column a line each) and the three fieldsets below them are blocks. Matching that
is what stops the column jumping when the real controls arrive.
β MOTION IS OPACITY ONLY, 150ms ease-out, which is the design contract's loading clause. The
reduced-motion branch drops even that rather than trading it for a different move. */
.sheet-binding-skeleton {
display: flex;
flex-direction: column;
gap: 12px;
animation: sheet-skeleton-in 150ms ease-out;
}
.sheet-binding-skeleton-field {
display: flex;
flex-direction: column;
gap: 6px;
}
.sheet-binding-skeleton-label,
.sheet-binding-skeleton-control,
.sheet-binding-skeleton-block {
display: block;
background: var(--lp-surface-2);
border-radius: var(--lp-r-sm);
}
/* The label bar takes the rail skeleton's own 84x9, so the two loading states read as one idea. */
.sheet-binding-skeleton-label {
width: 84px;
height: 9px;
border-radius: 4px;
}
/* A `.sheet-field select` is 5px of padding either side of one `--lp-fs-xs` line plus its border. */
.sheet-binding-skeleton-control {
height: 30px;
border-radius: var(--lp-r-md);
}
/* One `.sheet-scope` fieldset. Measured off the settled panel at the default configuration: Rows
to include is about 110px (a legend, two radios and the view select between them) and Period
about 100px with its switch and its sentence; the taller one is When dragged, whose two labelled
selects run to about 140px. */
.sheet-binding-skeleton-block {
height: 104px;
border-radius: var(--lp-r-md);
}
.sheet-binding-skeleton-block.is-tall {
height: 140px;
}
@keyframes sheet-skeleton-in {
from { opacity: 0; }
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.sheet-binding-skeleton { animation: none; }
}
/* ββ ββ W54-T34 (owner instruction 10): VIEW ROWS SAYS IT HEARD YOU βββββββββββββββββββββββββ
Owner, verbatim: "Clicking View rows still takes a long time; if it must, we need a loading
button so the user knows their click worked."
Measured, so this is not a hypothetical: `drill_cell` costs 55 to 90 ms against a `ut_*` table
and 9,248 to 9,448 ms against `customer_data`, which reads through the registry-module mirror
rather than DuckDB (`AutoWiki/waves/wave54/lanes/E/T36-baseline.md`). For all of that,
`DrillModal` rendered `null`.
β TWO HALVES, THE WAY THE DESIGN CONTRACT SPLITS THEM. The CONTROL responds at pointer-down
with press feedback that does not change layout, then wears a busy state for as long as the
request runs; the SURFACE opens as a skeleton rather than a spinner.
β THE CONTROL'S BUTTON IS IN `sheet/CellActionBar.tsx`, WHICH THIS TICKET MAY NOT EDIT, and
that is why both halves are reached from here. `:active` is a pointer-DOWN state the browser
sets without any JavaScript, so the press needs no prop at all; the sustained busy state rides
`data-drill` on `.sheet-page`, set by `SheetPage.tsx`. The action bar is a plain descendant of
that element rather than a portal, so a descendant selector reaches it - checked before it was
relied on, because the formula editor two blocks up IS portalled and would not have matched. */
/* β PRESS FEEDBACK, AT POINTER-DOWN, TRANSFORM ONLY. The design contract's own number, and it
must not change layout: a scale leaves the box the button occupies exactly where it was, which
is why it is not a padding or a border change. `.sheet-action`'s transition names background
and opacity only, so this lands on the frame of the press instead of easing in after it.
β `.sheet-action-bar` calls `preventDefault()` on mousedown to keep the grid's selection; that
suppresses focus and text selection, not `:active`. */
.sheet-refresh:active:not(:disabled),
.sheet-action:active:not(:disabled) {
transform: scale(0.97);
}
/* β AND THE SUSTAINED BUSY STATE, WHICH IS A DIFFERENT SENTENCE FROM `:disabled` ALONE.
`.sheet-action:disabled` is 0.55 opacity and it means "you cannot use this". A control whose
click WAS taken and is running means the opposite, so it stays much closer to full strength,
wears the same wash it wears on hover, and takes the progress cursor. Nothing here moves the
box: opacity, background and cursor only. */
.sheet-page[data-drill="loading"] .sheet-action-bar .sheet-action:disabled {
opacity: 0.85;
background: var(--lp-blue-tint);
cursor: progress;
}
/* ββ the surface: a skeleton shaped like the popup it stands in for βββββββββββββββββββββββββββ
β THE SKELETON LANGUAGE IS INHERITED. Same flat `--lp-surface-2` tone, same absence of shimmer
and same `sheet-skeleton-in` as `.sheet-binding-skeleton` above and `.shell-rail-skeleton*`
before it. The reason is recorded at the rail: an animated sweep is a second thing moving on a
surface whose whole job is to sit still, and `prefers-reduced-motion` would then need a third
state.
ββ AND IT CANNOT REUSE `.cg-record-backdrop` / `.cg-link-grid-modal`, WHICH IS THE OBVIOUS
SHORTCUT AND IS EXACTLY BACKWARDS. Those rules ship inside `customer-grid/RecordDetail.css`,
which belongs to the very chunk this skeleton covers the download of; on a cold cache the class
names would resolve to no rules at all and the stand-in would paint in native chrome at the one
moment it matters. The geometry is COPIED here instead, measured off `.cg-link-grid-modal`.
β `--cg-z-record`, the layer the popup itself lands on, so the surface does not jump a layer
when the real one replaces it. The token is mandatory; a literal is what broke the three-way
stack before. */
.sheet-drill-skeleton-backdrop {
position: fixed;
inset: 0;
z-index: var(--cg-z-record);
display: grid;
place-items: center;
padding: 24px;
background: rgba(25, 34, 46, 0.34);
animation: sheet-skeleton-in 150ms ease-out;
}
.sheet-drill-skeleton {
width: min(1320px, calc(100vw - 48px));
height: min(840px, calc(100vh - 48px));
min-height: 460px;
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-lg);
background: var(--lp-surface);
box-shadow: 0 30px 80px rgba(20, 30, 43, 0.24);
}
/* The popup's own head is a fixed 54px carrying a title over a "N linked records" line. */
.sheet-drill-skeleton-head {
flex: 0 0 54px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 7px;
padding: 0 18px;
border-bottom: 1px solid var(--lp-line);
}
.sheet-drill-skeleton-title,
.sheet-drill-skeleton-sub,
.sheet-drill-skeleton-row {
display: block;
background: var(--lp-surface-2);
border-radius: 4px;
}
.sheet-drill-skeleton-title { width: 132px; height: 11px; }
/* The rail skeleton's own 84x9, so every loading state in the module reads as one idea. */
.sheet-drill-skeleton-sub { width: 84px; height: 9px; }
.sheet-drill-skeleton-rows {
flex: 1 1 auto;
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px 18px;
/* The bars are a fixed count and the card is a viewport fraction, so the overflow is what keeps
a short window from scrolling and a tall one from ending in a ragged half bar. */
overflow: hidden;
}
.sheet-drill-skeleton-row {
flex: 0 0 auto;
height: 22px;
border-radius: var(--lp-r-sm);
}
/* The header row of the grid inside: shorter, and narrower than the data rows under it. */
.sheet-drill-skeleton-row.is-head {
width: 42%;
height: 12px;
}
@media (prefers-reduced-motion: reduce) {
.sheet-drill-skeleton-backdrop { animation: none; }
.sheet-refresh:active:not(:disabled),
.sheet-action:active:not(:disabled) { transform: none; }
}
|