|
1 | 1 | .root { |
2 | | - --site-list-row-height: 32px; |
| 2 | + --site-list-row-height: 34px; |
3 | 3 | --site-list-row-background-hover: rgb(0 0 0 / 4%); |
4 | 4 | --site-list-row-background-active: rgb(0 0 0 / 7%); |
5 | | - |
6 | | - /* Left padding matches the sidebar footer (user-menu) so |
7 | | - the row highlight boxes share the same left edge as the rest of the |
8 | | - sidebar chrome. The right side is smaller: rows carry `sm` of their |
9 | | - own right padding, and `xl + sm` keeps the row icons (site status, |
10 | | - actions) visually aligned with the header's drawer icon. */ |
11 | | - padding: var(--wpds-dimension-padding-xl) var(--wpds-dimension-padding-xl) |
12 | | - var(--wpds-dimension-padding-xl) var(--wpds-dimension-padding-2xl); |
| 5 | + --site-list-row-leading-inset: var(--wpds-dimension-padding-xs); |
| 6 | + --site-list-row-outer-inset: calc( |
| 7 | + var(--wpds-dimension-padding-lg) - var(--site-list-row-leading-inset) |
| 8 | + ); |
| 9 | + --site-list-icon-size: 18px; |
| 10 | + --site-list-icon-gap: calc(var(--wpds-dimension-gap-sm) + 2px); |
| 11 | + --site-list-chat-status-size: 14px; |
| 12 | + --site-list-chat-status-offset-adjust: 2px; |
| 13 | + --site-list-chat-status-offset: var(--site-list-row-leading-inset); |
| 14 | + --site-list-pending-indicator-bg: color-mix( |
| 15 | + in srgb, |
| 16 | + var(--wpds-color-bg-interactive-error-strong) 34%, |
| 17 | + var(--wpds-color-bg-surface-caution) |
| 18 | + ); |
| 19 | + --site-list-pending-indicator-dot: var(--wpds-color-fg-content-error); |
| 20 | + |
| 21 | + /* Pull the row shape slightly left, then add the inset back inside rows so |
| 22 | + icons and labels keep their column while selected rows have breathing room. */ |
| 23 | + padding: 0 var(--site-list-row-outer-inset) var(--wpds-dimension-padding-xl) |
| 24 | + var(--site-list-row-outer-inset); |
13 | 25 | display: flex; |
14 | 26 | flex-direction: column; |
15 | 27 | gap: var(--wpds-dimension-padding-sm); |
|
20 | 32 | .root { |
21 | 33 | --site-list-row-background-hover: rgb(255 255 255 / 8%); |
22 | 34 | --site-list-row-background-active: rgb(255 255 255 / 12%); |
| 35 | + --site-list-pending-indicator-bg: #facc15; |
| 36 | + --site-list-pending-indicator-dot: #422006; |
23 | 37 | } |
24 | 38 | } |
25 | 39 |
|
26 | 40 | .sites { |
27 | 41 | display: flex; |
28 | 42 | flex-direction: column; |
29 | | - gap: 2px; |
| 43 | + gap: 0; |
30 | 44 | } |
31 | 45 |
|
32 | 46 | .site { |
|
41 | 55 | min-width: 0; |
42 | 56 | box-sizing: border-box; |
43 | 57 | height: var(--site-list-row-height); |
44 | | - /* No inline-start padding: the row's leading content (site icon / title) |
45 | | - sits flush with the sidebar content edge (`.root`'s 2xl inline padding), |
46 | | - lining the title up with the macOS window traffic lights. The button |
47 | | - inside (`.siteToggle`) also drops its inline-start padding to match. */ |
| 58 | + /* The row shape extends left of the content column; this padding keeps the |
| 59 | + icon/title column aligned while giving selected rows breathing room. */ |
48 | 60 | padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-sm) |
49 | | - var(--wpds-dimension-padding-xs) 0; |
| 61 | + var(--wpds-dimension-padding-xs) var(--site-list-row-leading-inset); |
50 | 62 | border-radius: 6px; |
51 | 63 | } |
52 | 64 |
|
|
72 | 84 | display: inline-grid; |
73 | 85 | place-items: center; |
74 | 86 | flex-shrink: 0; |
75 | | - inline-size: 0; |
76 | | - margin-inline-end: 0; |
77 | | - opacity: 0; |
78 | | - transform: translateX(-4px) scale(0.75); |
79 | | - transform-origin: left center; |
| 87 | + inline-size: var(--site-list-icon-size); |
| 88 | + /* The footer gravatar is 20px wide while site icons are 18px, so the extra |
| 89 | + 2px lives after the icon to keep titles aligned with the display name. */ |
| 90 | + margin-inline-end: var(--site-list-icon-gap); |
80 | 91 | overflow: hidden; |
81 | | - transition: inline-size 120ms ease, margin-inline-end 120ms ease, opacity 120ms ease, |
82 | | - transform 120ms ease; |
83 | 92 | } |
84 | 93 |
|
85 | | -.siteActive .siteIconSlot { |
86 | | - inline-size: 16px; |
87 | | - /* Gap between the site icon and its title. Kept in sync with the chat-row |
88 | | - indent below (`.sessionLink` padding-inline-start), which carries the same |
89 | | - +4px so chat labels stay aligned under the site title. */ |
90 | | - margin-inline-end: calc(var(--wpds-dimension-padding-xs) + 4px); |
91 | | - opacity: 1; |
92 | | - transform: translateX(0) scale(1); |
| 94 | +.siteIcon { |
| 95 | + --site-icon-size: var(--site-list-icon-size); |
93 | 96 | } |
94 | 97 |
|
95 | | -@media (prefers-reduced-motion: reduce) { |
96 | | - .siteIconSlot { |
97 | | - transition: none; |
98 | | - } |
| 98 | +.siteIconStopped { |
| 99 | + opacity: 0.5; |
99 | 100 | } |
100 | 101 |
|
101 | 102 | .siteName { |
|
371 | 372 | margin: 0; |
372 | 373 | display: flex; |
373 | 374 | flex-direction: column; |
374 | | - gap: 2px; |
| 375 | + gap: 0; |
375 | 376 | } |
376 | 377 |
|
377 | 378 | .sessionItem { |
|
388 | 389 | --wp-ui-button-border-color-active: transparent; |
389 | 390 | --wp-ui-button-height: var(--site-list-row-height); |
390 | 391 |
|
| 392 | + position: relative; |
391 | 393 | width: 100%; |
392 | 394 | box-sizing: border-box; |
393 | 395 | height: var(--site-list-row-height); |
394 | | - /* Chat labels align under the active site's title text. The site row now |
395 | | - starts flush with the sidebar edge, and its title begins one icon width |
396 | | - (16px) plus the icon→title gap past that edge — so this indent mirrors |
397 | | - `.siteActive .siteIconSlot`'s inline-size + margin-inline-end. */ |
| 396 | + /* Chat labels align under the parent site's title text and the footer |
| 397 | + display name while the row shape extends left for the status indicator. */ |
398 | 398 | padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-sm) |
399 | | - var(--wpds-dimension-padding-xs) calc(16px + var(--wpds-dimension-padding-xs) + 4px); |
| 399 | + var(--wpds-dimension-padding-xs) |
| 400 | + calc( |
| 401 | + var(--site-list-row-leading-inset) + var(--site-list-icon-size) + |
| 402 | + var(--site-list-icon-gap) |
| 403 | + ); |
400 | 404 | border-radius: 6px; |
401 | 405 | background-color: var(--session-link-background); |
402 | 406 | color: var(--wpds-color-fg-content-neutral-weak); |
|
408 | 412 | transition: color 80ms ease, background-color 80ms ease; |
409 | 413 | } |
410 | 414 |
|
411 | | -.sessionLinkRunning { |
412 | | - position: relative; |
413 | | -} |
414 | | - |
415 | 415 | .sessionLabel { |
416 | 416 | flex: 1; |
417 | 417 | min-width: 0; |
| 418 | + font-weight: var(--wpds-typography-font-weight-regular); |
418 | 419 | overflow: hidden; |
419 | 420 | text-overflow: ellipsis; |
420 | 421 | white-space: nowrap; |
|
434 | 435 | transition: opacity 100ms ease; |
435 | 436 | } |
436 | 437 |
|
437 | | -/* The running spinner and question indicator sit in the indent gutter to |
438 | | - the left of the chat label. */ |
| 438 | +/* The running spinner and question indicator sit inside the active row shape, |
| 439 | + inset from its edge while the chat label keeps its shared title column. */ |
439 | 440 | .sessionInlineSpinner { |
| 441 | + --spinner-size: var(--site-list-chat-status-size); |
| 442 | + |
| 443 | + box-sizing: border-box; |
440 | 444 | position: absolute; |
441 | 445 | inset-block-start: 50%; |
442 | | - inset-inline-start: calc(var(--wpds-dimension-padding-sm) + 6px); |
443 | | - margin-block-start: -6px; |
| 446 | + inset-inline-start: calc( |
| 447 | + var(--site-list-chat-status-offset) + var(--site-list-chat-status-offset-adjust) |
| 448 | + ); |
| 449 | + inline-size: var(--site-list-chat-status-size); |
| 450 | + block-size: var(--site-list-chat-status-size); |
| 451 | + margin-block-start: calc(var(--site-list-chat-status-size) / -2); |
444 | 452 | } |
445 | 453 |
|
446 | 454 | .sessionQuestionIndicator { |
447 | 455 | position: absolute; |
448 | 456 | inset-block-start: 50%; |
449 | | - inset-inline-start: calc(var(--wpds-dimension-padding-sm) + 4px); |
| 457 | + inset-inline-start: calc( |
| 458 | + var(--site-list-chat-status-offset) + var(--site-list-chat-status-offset-adjust) |
| 459 | + ); |
450 | 460 | display: inline-flex; |
451 | 461 | align-items: center; |
452 | 462 | justify-content: center; |
453 | | - inline-size: 16px; |
454 | | - block-size: 16px; |
455 | | - border-radius: 50%; |
456 | | - background-color: #facc15; |
457 | | - color: #422006; |
458 | | - font-size: 11px; |
459 | | - font-weight: 700; |
460 | | - line-height: 1; |
| 463 | + inline-size: var(--site-list-chat-status-size); |
| 464 | + block-size: var(--site-list-chat-status-size); |
461 | 465 | transform: translateY(-50%); |
| 466 | + isolation: isolate; |
| 467 | +} |
| 468 | + |
| 469 | +.sessionQuestionIndicator::before { |
| 470 | + content: ''; |
| 471 | + position: absolute; |
| 472 | + inset: 0; |
| 473 | + z-index: -1; |
| 474 | + clip-path: path( |
| 475 | + 'M 7 1.7 C 7.55 1.7 8.05 2 8.3 2.5 L 12.8 11.8 C 13.2 12.65 12.6 13.2 11.75 13.2 L 2.25 13.2 C 1.4 13.2 0.8 12.65 1.2 11.8 L 5.7 2.5 C 5.95 2 6.45 1.7 7 1.7 Z' |
| 476 | + ); |
| 477 | + background-color: var(--site-list-pending-indicator-bg); |
| 478 | +} |
| 479 | + |
| 480 | +.sessionQuestionIndicator::after { |
| 481 | + content: ''; |
| 482 | + position: absolute; |
| 483 | + inset-block-start: calc(58% - 1.5px); |
| 484 | + inset-inline-start: calc(50% - 1.5px); |
| 485 | + inline-size: 3px; |
| 486 | + block-size: 3px; |
| 487 | + border-radius: 50%; |
| 488 | + background-color: var(--site-list-pending-indicator-dot); |
462 | 489 | } |
463 | 490 |
|
464 | 491 | .sessionLink:hover, |
|
0 commit comments