@design.estate/dees-catalog 22.1.0 → 22.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist_bundle/bundle.js +2372 -1369
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VIN4YGID.js → chunk-IGD4DLG4.js} +3 -3
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-6I3PIV5F.js → chunk-MK42UYWT.js} +10 -6
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-6I3PIV5F.js.map → chunk-MK42UYWT.js.map} +1 -1
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3SSZ4CDV.js → chunk-RITCTBBY.js} +2 -2
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-STYNV6A3.js → de-TN6FRTSU.js} +10 -6
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-TN6FRTSU.js.map +1 -0
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-PULP7K3X.js → dees-modal-PLLCPO5V.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-KEQHBOYE.js → dees-workspace-terminal-7N6EXGH6.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.d.ts +16 -2
  13. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.demo.js +458 -57
  14. package/dist_ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.js +67 -34
  15. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.d.ts +22 -2
  16. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.js +61 -7
  17. package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +273 -27
  18. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +12 -0
  19. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.js +24 -2
  20. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +54 -7
  21. package/dist_ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.d.ts +13 -1
  22. package/dist_ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.js +80 -12
  23. package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.d.ts +10 -0
  24. package/dist_ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.js +72 -4
  25. package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.d.ts +12 -0
  26. package/dist_ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.js +73 -3
  27. package/dist_ts_web/elements/00group-kanban/kanban.firstload.d.ts +23 -0
  28. package/dist_ts_web/elements/00group-kanban/kanban.firstload.js +51 -0
  29. package/dist_ts_web/elements/00group-kanban/kanban.styles.d.ts +8 -0
  30. package/dist_ts_web/elements/00group-kanban/kanban.styles.js +47 -1
  31. package/dist_ts_web/i18n/de.d.ts +24 -8
  32. package/dist_ts_web/i18n/de.js +9 -5
  33. package/dist_ts_web/i18n/messages.d.ts +24 -8
  34. package/dist_ts_web/i18n/messages.js +9 -5
  35. package/package.json +1 -1
  36. package/readme.md +38 -5
  37. package/ts_web/00_commitinfo_data.ts +1 -1
  38. package/ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.demo.ts +504 -98
  39. package/ts_web/elements/00group-harness/dees-harness-resource-list/dees-harness-resource-list.ts +68 -33
  40. package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.ts +41 -2
  41. package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +271 -25
  42. package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.demo.ts +23 -1
  43. package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +60 -6
  44. package/ts_web/elements/00group-kanban/dees-kanban-activity/dees-kanban-activity.ts +88 -11
  45. package/ts_web/elements/00group-kanban/dees-kanban-card/dees-kanban-card.ts +60 -2
  46. package/ts_web/elements/00group-kanban/dees-kanban-column/dees-kanban-column.ts +61 -1
  47. package/ts_web/elements/00group-kanban/kanban.firstload.ts +54 -0
  48. package/ts_web/elements/00group-kanban/kanban.styles.ts +47 -0
  49. package/ts_web/i18n/de.ts +8 -4
  50. package/ts_web/i18n/messages.ts +8 -4
  51. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-STYNV6A3.js.map +0 -1
  52. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-VIN4YGID.js.map → chunk-IGD4DLG4.js.map} +0 -0
  53. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3SSZ4CDV.js.map → chunk-RITCTBBY.js.map} +0 -0
  54. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-PULP7K3X.js.map → dees-modal-PLLCPO5V.js.map} +0 -0
  55. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-KEQHBOYE.js.map → dees-workspace-terminal-7N6EXGH6.js.map} +0 -0
@@ -12,6 +12,7 @@ import {
12
12
  } from '@design.estate/dees-element';
13
13
  import { dcLocalize } from '../../../i18n/localize.js';
14
14
  import { themeDefaultStyles } from '../../00theme.js';
15
+ import { visuallyHidden } from '../../00visuallyhidden.js';
15
16
  import { ScrollEdgeShadowController, scrollEdgeShadowStyles } from '../../00scrolledges.js';
16
17
  import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
17
18
  import { harnessActivityStyles } from '../harness.styles.js';
@@ -47,6 +48,15 @@ type TKnownHarness = keyof typeof harnessGlyphs;
47
48
  const isKnownHarness = (harnessArg: string): harnessArg is TKnownHarness => Object.hasOwn(harnessGlyphs, harnessArg);
48
49
  const unknownHarnessGlyph = 'lucide:Bot';
49
50
 
51
+ /** The skeleton's placeholder rows: name and excerpt widths, and whether a chip stands in the row. */
52
+ const skeletonRows: readonly { name: string; excerpt: string; chip: boolean }[] = [
53
+ { name: '11rem', excerpt: '72%', chip: true },
54
+ { name: '8rem', excerpt: '54%', chip: false },
55
+ { name: '13rem', excerpt: '64%', chip: true },
56
+ { name: '9.5rem', excerpt: '46%', chip: true },
57
+ { name: '7rem', excerpt: '58%', chip: false },
58
+ ];
59
+
50
60
  /** The roving-focus key of the Completed group's "more"/"fewer" button. */
51
61
  const moreStopKey = 'more:completed';
52
62
 
@@ -64,8 +74,14 @@ interface IFocusStop {
64
74
  * Each row is the harness glyph, which is also the status indicator (needs input: attention colour
65
75
  * and a blink; working: a slow pulse; failed: red; completed: muted and still), the name, the first
66
76
  * ticket as a chip ("+N" for more), and the age. The latest message excerpt joins the line only
67
- * while the list's own container is wide. Under reduced motion the indicator keeps its colour and
68
- * stops moving.
77
+ * while the list's own container is wide. Every row of every group shares one set of column tracks,
78
+ * so names, excerpts, chips and ages each start on one edge; the name column is as wide as the
79
+ * longest name up to `--dees-harness-session-name-max` (20rem), and longer names end in an
80
+ * ellipsis. Under reduced motion the indicator keeps its colour and stops moving.
81
+ *
82
+ * The first load, `loading` without rows, draws placeholder rows on the same columns once it has
83
+ * taken 200 ms, so a quick load never flashes them, and says it is still loading after
84
+ * `stillLoadingAfter`. Rows that are already there stay while more load.
69
85
  *
70
86
  * The list is fed, never arranged: there is no add, group or reorder. Click, Enter or Space on a
71
87
  * row emits `harness-session-row-select`; the chip emits `harness-session-ticket-select`. Right-click,
@@ -78,6 +94,9 @@ export class DeesHarnessSessionList extends DeesElement {
78
94
  public static demo = demoFunc;
79
95
  public static demoGroups = ['Agent Chat'];
80
96
 
97
+ /** How long a first load runs, in milliseconds, before the list says it is still loading. */
98
+ public static stillLoadingAfter = 10_000;
99
+
81
100
  private readonly t = dcLocalize(this);
82
101
 
83
102
  @property({ attribute: false })
@@ -100,6 +119,10 @@ export class DeesHarnessSessionList extends DeesElement {
100
119
  @state()
101
120
  accessor completedExpanded: boolean = false;
102
121
 
122
+ /** The first load has run past `stillLoadingAfter`. */
123
+ @state()
124
+ private accessor stillLoading: boolean = false;
125
+
103
126
  /** The keyboard stop that takes Tab into the list. */
104
127
  @state()
105
128
  private accessor activeKey: string = '';
@@ -108,6 +131,7 @@ export class DeesHarnessSessionList extends DeesElement {
108
131
  private readonly scrollbars = new OverlayScrollbarController(this, () => this.scrollContainer);
109
132
  /** The row focused before an update, focused again if the update moved it to another group. */
110
133
  private focusBeforeUpdate: { key: string; part: 'main' | 'ticket' } | undefined;
134
+ private stillLoadingTimer: ReturnType<typeof setTimeout> | undefined;
111
135
 
112
136
  public static styles = [
113
137
  themeDefaultStyles,
@@ -142,6 +166,28 @@ export class DeesHarnessSessionList extends DeesElement {
142
166
  box-sizing: border-box;
143
167
  }
144
168
 
169
+ /*
170
+ * One grid for every group: rows and their main buttons are subgrids, so each column (glyph,
171
+ * name, excerpt, chip, age) starts on one edge across all rows. The excerpt column exists only
172
+ * in the wide layout below.
173
+ */
174
+ .columns {
175
+ display: grid;
176
+ grid-template-columns:
177
+ [glyph] auto
178
+ [name] minmax(0, 1fr)
179
+ [ticket] fit-content(50%)
180
+ [age] auto;
181
+ column-gap: var(--dees-spacing-sm);
182
+ }
183
+
184
+ .groupHeader,
185
+ .rows,
186
+ .moreButton,
187
+ .emptyNote {
188
+ grid-column: 1 / -1;
189
+ }
190
+
145
191
  .groupHeader {
146
192
  display: flex;
147
193
  align-items: baseline;
@@ -165,7 +211,8 @@ export class DeesHarnessSessionList extends DeesElement {
165
211
 
166
212
  .rows {
167
213
  display: grid;
168
- gap: 1px;
214
+ grid-template-columns: subgrid;
215
+ row-gap: 1px;
169
216
  margin: 0;
170
217
  padding: 0;
171
218
  list-style: none;
@@ -173,9 +220,10 @@ export class DeesHarnessSessionList extends DeesElement {
173
220
 
174
221
  .row {
175
222
  position: relative;
176
- display: flex;
223
+ display: grid;
224
+ grid-column: 1 / -1;
225
+ grid-template-columns: subgrid;
177
226
  align-items: center;
178
- gap: var(--dees-spacing-sm);
179
227
  min-width: 0;
180
228
  min-height: var(--dees-control-height-lg);
181
229
  padding: 0 var(--dees-spacing-sm) 0 0;
@@ -192,10 +240,10 @@ export class DeesHarnessSessionList extends DeesElement {
192
240
 
193
241
  .rowMain {
194
242
  appearance: none;
195
- display: flex;
196
- flex: 1 1 auto;
243
+ display: grid;
244
+ grid-column: glyph / ticket;
245
+ grid-template-columns: subgrid;
197
246
  align-items: center;
198
- gap: var(--dees-spacing-sm);
199
247
  min-width: 0;
200
248
  align-self: stretch;
201
249
  margin: 0;
@@ -210,6 +258,15 @@ export class DeesHarnessSessionList extends DeesElement {
210
258
  cursor: inherit;
211
259
  }
212
260
 
261
+ /* A row without a chip lends the chip's cell to its last text, as the line did before columns. */
262
+ .row:not(:has(.ticket)) .rowMain {
263
+ grid-column: glyph / age;
264
+ }
265
+
266
+ .row:not(:has(.ticket)) .name {
267
+ grid-column: name / age;
268
+ }
269
+
213
270
  .rowMain:focus-visible {
214
271
  outline: none;
215
272
  }
@@ -221,7 +278,6 @@ export class DeesHarnessSessionList extends DeesElement {
221
278
 
222
279
  .indicator {
223
280
  display: grid;
224
- flex: 0 0 auto;
225
281
  place-items: center;
226
282
  width: 22px;
227
283
  height: 22px;
@@ -257,7 +313,6 @@ export class DeesHarnessSessionList extends DeesElement {
257
313
  }
258
314
 
259
315
  .name {
260
- flex: 0 1 auto;
261
316
  min-width: 0;
262
317
  overflow: hidden;
263
318
  text-overflow: ellipsis;
@@ -270,7 +325,6 @@ export class DeesHarnessSessionList extends DeesElement {
270
325
 
271
326
  .excerpt {
272
327
  display: none;
273
- flex: 1 1 0;
274
328
  min-width: 0;
275
329
  overflow: hidden;
276
330
  color: var(--dees-color-text-muted);
@@ -281,10 +335,12 @@ export class DeesHarnessSessionList extends DeesElement {
281
335
  .ticket {
282
336
  appearance: none;
283
337
  display: inline-flex;
284
- flex: 0 0 auto;
338
+ grid-column: ticket;
339
+ justify-self: end;
285
340
  align-items: center;
286
341
  gap: var(--dees-spacing-xs);
287
- max-width: 50%;
342
+ min-width: 0;
343
+ max-width: 100%;
288
344
  height: 20px;
289
345
  margin: 0;
290
346
  padding: 0 var(--dees-spacing-xs);
@@ -315,7 +371,7 @@ export class DeesHarnessSessionList extends DeesElement {
315
371
  }
316
372
 
317
373
  .age {
318
- flex: 0 0 auto;
374
+ grid-column: age;
319
375
  min-width: 3ch;
320
376
  color: var(--dees-color-text-muted);
321
377
  font-size: var(--dees-font-caption1-size, 12px);
@@ -348,6 +404,110 @@ export class DeesHarnessSessionList extends DeesElement {
348
404
  outline-offset: calc(-1 * var(--dees-line-width-focus-ring));
349
405
  }
350
406
 
407
+ .loadingStatus {
408
+ ${visuallyHidden}
409
+ }
410
+
411
+ /*
412
+ * The first load: placeholder rows on the rows' own columns and heights, so the real rows take
413
+ * their place without a shift. They stay invisible for 200 ms, so a quick load never flashes.
414
+ */
415
+ .skeleton,
416
+ .skeletonRows,
417
+ .skeletonRow,
418
+ .skeletonMain {
419
+ display: grid;
420
+ grid-template-columns: subgrid;
421
+ align-items: center;
422
+ }
423
+
424
+ .skeleton {
425
+ grid-column: 1 / -1;
426
+ animation: harness-session-skeleton-reveal 1ms linear 200ms both;
427
+ --skeleton-base: var(--dees-color-fill-secondary);
428
+ --skeleton-glint: color-mix(in srgb, var(--dees-color-fill-secondary), var(--dees-color-text-primary) 12%);
429
+ }
430
+
431
+ @keyframes harness-session-skeleton-reveal {
432
+ from { visibility: hidden; }
433
+ to { visibility: visible; }
434
+ }
435
+
436
+ .skeleton .groupHeader {
437
+ align-items: center;
438
+ }
439
+
440
+ /* A line of header text, unseen, so the placeholder header is as tall as a real one. */
441
+ .skeleton .groupHeader::before {
442
+ content: '\\200b';
443
+ }
444
+
445
+ .skeletonRows {
446
+ grid-column: 1 / -1;
447
+ row-gap: 1px;
448
+ }
449
+
450
+ .skeletonRow {
451
+ grid-column: 1 / -1;
452
+ min-height: var(--dees-control-height-lg);
453
+ padding: 0 var(--dees-spacing-sm) 0 0;
454
+ }
455
+
456
+ .skeletonMain {
457
+ grid-column: glyph / ticket;
458
+ padding: 0 0 0 var(--dees-spacing-xs);
459
+ }
460
+
461
+ .skeletonBar {
462
+ display: block;
463
+ max-width: 100%;
464
+ height: 10px;
465
+ border-radius: var(--dees-radius-full);
466
+ background: linear-gradient(
467
+ 90deg,
468
+ var(--skeleton-base) 35%,
469
+ var(--skeleton-glint) 50%,
470
+ var(--skeleton-base) 65%
471
+ ) 100% 0 / 300% 100%;
472
+ animation: harness-session-shimmer 1.6s linear infinite;
473
+ }
474
+
475
+ .skeletonGlyph {
476
+ width: 22px;
477
+ height: 22px;
478
+ border-radius: var(--dees-radius-sm);
479
+ corner-shape: var(--dees-corner-shape);
480
+ }
481
+
482
+ .skeletonExcerpt {
483
+ display: none;
484
+ }
485
+
486
+ .skeletonChip {
487
+ grid-column: ticket;
488
+ justify-self: end;
489
+ width: 3.5rem;
490
+ height: 20px;
491
+ border-radius: var(--dees-radius-xs);
492
+ corner-shape: var(--dees-corner-shape);
493
+ }
494
+
495
+ .skeletonAge {
496
+ grid-column: age;
497
+ justify-self: end;
498
+ width: 4ch;
499
+ }
500
+
501
+ /* A first load that takes long says so, and the placeholders hold still. */
502
+ .skeleton.stalled .skeletonBar {
503
+ animation: none;
504
+ }
505
+
506
+ @keyframes harness-session-shimmer {
507
+ from { background-position: 100% 0; }
508
+ to { background-position: 0 0; }
509
+ }
510
+
351
511
  .emptyNote {
352
512
  padding: var(--dees-spacing-lg);
353
513
  color: var(--dees-color-text-secondary);
@@ -355,16 +515,32 @@ export class DeesHarnessSessionList extends DeesElement {
355
515
  text-align: center;
356
516
  }
357
517
 
358
- /* Wide enough to read a line of the conversation beside its name. */
518
+ /*
519
+ * Wide enough to read a line of the conversation beside its name: the name column is as wide
520
+ * as the longest name, up to the maximum, and every excerpt starts on the edge after it.
521
+ */
359
522
  @container harness-session-list (min-width: 720px) {
360
- .name {
361
- flex: 0 1 auto;
362
- max-width: 40%;
523
+ .columns {
524
+ grid-template-columns:
525
+ [glyph] auto
526
+ [name] fit-content(var(--dees-harness-session-name-max, 20rem))
527
+ [excerpt] minmax(0, 1fr)
528
+ [ticket] fit-content(50%)
529
+ [age] auto;
363
530
  }
364
531
 
365
- .excerpt {
532
+ .excerpt,
533
+ .skeletonExcerpt {
366
534
  display: block;
367
535
  }
536
+
537
+ .row:not(:has(.ticket)) .name {
538
+ grid-column: name;
539
+ }
540
+
541
+ .row:not(:has(.ticket)) .excerpt {
542
+ grid-column: excerpt / age;
543
+ }
368
544
  }
369
545
 
370
546
  @media (hover: hover) {
@@ -403,7 +579,8 @@ export class DeesHarnessSessionList extends DeesElement {
403
579
 
404
580
  @media (prefers-reduced-motion: reduce) {
405
581
  .indicator,
406
- .row {
582
+ .row,
583
+ .skeletonBar {
407
584
  animation: none;
408
585
  transition: none;
409
586
  }
@@ -454,25 +631,62 @@ export class DeesHarnessSessionList extends DeesElement {
454
631
  public render(): TemplateResult {
455
632
  const stops = this.focusStops();
456
633
  const activeKey = this.resolveActiveKey(stops);
634
+ const firstLoad = this.isFirstLoad();
457
635
  return html`
458
636
  <div class="listFrame">
459
637
  <div
460
638
  class="list"
461
639
  role="region"
462
640
  aria-label=${this.t('sessionlist.label')}
641
+ aria-busy=${this.loading ? 'true' : 'false'}
463
642
  @keydown=${this.handleKeydown}
464
643
  >
465
- ${this.loading
466
- ? html`<div class="emptyNote">${this.t('sessionlist.loading')}</div>`
467
- : this.rows.length
644
+ <div class="columns">
645
+ ${this.rows.length
468
646
  ? [...this.groupedRows].map(([stateArg, rows]) => this.renderGroup(stateArg, rows, activeKey))
469
- : html`<div class="emptyNote">${this.emptyText || this.t('sessionlist.empty')}</div>`}
647
+ : firstLoad
648
+ ? this.renderSkeleton()
649
+ : html`<div class="emptyNote">${this.emptyText || this.t('sessionlist.empty')}</div>`}
650
+ </div>
651
+ </div>
652
+ <div class="loadingStatus" role="status">
653
+ ${firstLoad ? this.t(this.stillLoading ? 'sessionlist.stillLoading' : 'sessionlist.loading') : ''}
470
654
  </div>
471
655
  ${this.scrollEdges.renderShadows()}
472
656
  </div>
473
657
  `;
474
658
  }
475
659
 
660
+ /** The first load: loading, with no rows to show yet. Rows already there stay while more load. */
661
+ private isFirstLoad(): boolean {
662
+ return this.loading && this.rows.length === 0;
663
+ }
664
+
665
+ /** Placeholder rows, hidden from assistive technology, which hears the loading status instead. */
666
+ private renderSkeleton(): TemplateResult {
667
+ return html`
668
+ ${this.stillLoading
669
+ ? html`<div class="emptyNote" aria-hidden="true">${this.t('sessionlist.stillLoading')}</div>`
670
+ : ''}
671
+ <div class="skeleton ${this.stillLoading ? 'stalled' : ''}" aria-hidden="true">
672
+ <div class="groupHeader"><span class="skeletonBar" style="width: 5rem"></span></div>
673
+ <div class="skeletonRows">
674
+ ${skeletonRows.map((row) => html`
675
+ <div class="skeletonRow">
676
+ <div class="skeletonMain">
677
+ <span class="skeletonBar skeletonGlyph"></span>
678
+ <span class="skeletonBar" style=${`width: ${row.name}`}></span>
679
+ <span class="skeletonBar skeletonExcerpt" style=${`width: ${row.excerpt}`}></span>
680
+ </div>
681
+ ${row.chip ? html`<span class="skeletonBar skeletonChip"></span>` : ''}
682
+ <span class="skeletonBar skeletonAge"></span>
683
+ </div>
684
+ `)}
685
+ </div>
686
+ </div>
687
+ `;
688
+ }
689
+
476
690
  private renderGroup(
477
691
  stateArg: THarnessSessionRowState,
478
692
  rowsArg: IHarnessSessionRow[],
@@ -547,7 +761,7 @@ export class DeesHarnessSessionList extends DeesElement {
547
761
  >
548
762
  <dees-icon icon=${glyph} iconSize="14" aria-hidden="true"></dees-icon>
549
763
  </span>
550
- <span class="name">${rowArg.name}</span>
764
+ <span class="name" title=${rowArg.name}>${rowArg.name}</span>
551
765
  ${rowArg.excerpt ? html`<span class="excerpt">${rowArg.excerpt}</span>` : ''}
552
766
  </button>
553
767
  ${firstTicket
@@ -673,8 +887,40 @@ export class DeesHarnessSessionList extends DeesElement {
673
887
  return stop;
674
888
  }
675
889
 
890
+ public async connectedCallback(): Promise<void> {
891
+ await super.connectedCallback();
892
+ // A first load under way when the list left the page counts again from now.
893
+ if (this.isFirstLoad()) this.requestUpdate();
894
+ }
895
+
896
+ public async disconnectedCallback(): Promise<void> {
897
+ this.clearStillLoadingTimer();
898
+ this.stillLoading = false;
899
+ await super.disconnectedCallback();
900
+ }
901
+
902
+ /** Counts a first load towards `stillLoadingAfter`, and forgets it once rows arrive or loading ends. */
903
+ private syncStillLoading(): void {
904
+ if (!this.isConnected || !this.isFirstLoad()) {
905
+ this.clearStillLoadingTimer();
906
+ this.stillLoading = false;
907
+ return;
908
+ }
909
+ if (this.stillLoading || this.stillLoadingTimer) return;
910
+ this.stillLoadingTimer = setTimeout(() => {
911
+ this.stillLoadingTimer = undefined;
912
+ this.stillLoading = true;
913
+ }, DeesHarnessSessionList.stillLoadingAfter);
914
+ }
915
+
916
+ private clearStillLoadingTimer(): void {
917
+ if (this.stillLoadingTimer) clearTimeout(this.stillLoadingTimer);
918
+ this.stillLoadingTimer = undefined;
919
+ }
920
+
676
921
  public willUpdate(changedArg: Map<PropertyKey, unknown>): void {
677
922
  super.willUpdate(changedArg);
923
+ this.syncStillLoading();
678
924
  const focused = this.shadowRoot?.activeElement as HTMLElement | null | undefined;
679
925
  if (!focused) {
680
926
  this.focusBeforeUpdate = undefined;
@@ -46,14 +46,36 @@ export const demoFunc = () => {
46
46
  demo.actAs(mara);
47
47
  await board.refresh();
48
48
  };
49
+ // The host owns `loading`. A first load starts without tickets and draws the board's placeholders
50
+ // until it finishes, saying it is still loading after ten seconds; a refresh keeps the tickets.
51
+ const startFirstLoad = (event: Event) => {
52
+ const board = boardOf(event);
53
+ board.tickets = [];
54
+ board.loading = true;
55
+ };
56
+ const finishLoading = async (event: Event) => {
57
+ const board = boardOf(event);
58
+ await board.refresh();
59
+ board.loading = false;
60
+ };
61
+ const refreshWithTickets = async (event: Event) => {
62
+ const board = boardOf(event);
63
+ board.loading = true;
64
+ await new Promise(resolve => setTimeout(resolve, 1500));
65
+ await board.refresh();
66
+ board.loading = false;
67
+ };
49
68
  // The server sets the AutoLabels: once a question is asked or answered, the board fetches the tickets again.
50
69
  const questionSaved = (event: Event) => void (event.currentTarget as DeesKanban).refresh();
51
70
  // The bar keeps its height and the board fills the rest; its columns scroll their own cards.
52
71
  return demoApp(html`<div style="display: flex; flex-direction: column; height: 100%">
53
72
  <div class="dees-demo-row" style="flex: none; padding: 0 24px 4px">
54
- <p class="dees-demo-caption">Signed in as Mara Chen. Jonas and Alex work on the same board; Alex waits for Mara's answer on CAT-103. To see a refused stale edit, start editing CAT-102, close it, let Jonas rename it and save.</p>
73
+ <p class="dees-demo-caption">Signed in as Mara Chen. Jonas and Alex work on the same board; Alex waits for Mara's answer on CAT-103. To see a refused stale edit, start editing CAT-102, close it, let Jonas rename it and save. A first load shows placeholders until it finishes, and says it is still loading after ten seconds.</p>
55
74
  <dees-button type="outline" size="sm" text="Simulate a teammate's change" @clicked=${simulate}></dees-button>
56
75
  <dees-button type="outline" size="sm" text="Jonas renames CAT-102" @clicked=${rename}></dees-button>
76
+ <dees-button type="outline" size="sm" text="Start a first load" @clicked=${startFirstLoad}></dees-button>
77
+ <dees-button type="outline" size="sm" text="Finish loading" @clicked=${finishLoading}></dees-button>
78
+ <dees-button type="outline" size="sm" text="Refresh with tickets" @clicked=${refreshWithTickets}></dees-button>
57
79
  </div>
58
80
  <dees-kanban
59
81
  heading="Product workspace"
@@ -80,6 +80,8 @@ import { visuallyHidden } from '../../00visuallyhidden.js';
80
80
  import { nextFrame } from '../../00overlay.js';
81
81
  import { demoFunc } from './dees-kanban.demo.js';
82
82
  import { KanbanDragController } from '../kanban.dragcontroller.js';
83
+ import { KanbanFirstLoadController } from '../kanban.firstload.js';
84
+ import { kanbanSkeletonStyles } from '../kanban.styles.js';
83
85
  import '../dees-kanban-column/dees-kanban-column.js';
84
86
  import '../../00group-overlay/dees-popover/dees-popover.js';
85
87
  import '../../00group-utility/dees-icon/dees-icon.js';
@@ -134,6 +136,9 @@ type TKanbanInteraction = {
134
136
  [K in keyof IKanbanInteractionMap]: { type: K; detail: IKanbanInteractionMap[K] }
135
137
  }[keyof IKanbanInteractionMap];
136
138
 
139
+ /** How many placeholder cards each placeholder column holds on a first load, column after column. */
140
+ const placeholderCards = [3, 2, 3, 1];
141
+
137
142
  /** The board's filters in the filter bubble, by their `IKanbanFilterValues` key. */
138
143
  type TKanbanFilterKey = 'project' | 'epic' | 'assignee' | 'label' | 'autoLabel' | 'mine';
139
144
 
@@ -148,6 +153,9 @@ export class DeesKanban extends DeesElement {
148
153
  public static demo = demoFunc;
149
154
  public static demoGroups = ['Kanban'];
150
155
 
156
+ /** How long a first load runs, in milliseconds, before the board says it is still loading. */
157
+ public static stillLoadingAfter = 10_000;
158
+
151
159
  private readonly t = dcLocalize(this);
152
160
 
153
161
  /** The board's heading; while empty, the catalog's word (`kanban.board`). */
@@ -166,6 +174,13 @@ export class DeesKanban extends DeesElement {
166
174
  @property({ attribute: false })
167
175
  accessor provider: IKanbanProvider = {};
168
176
 
177
+ /**
178
+ * The host is loading the board. The first load, `loading` without tickets, draws placeholder
179
+ * columns and cards on the board's own layout once it has taken 200 ms, so a quick load never
180
+ * flashes them, and says it is still loading after `stillLoadingAfter`, beside the heading where
181
+ * the totals come; columns already set show
182
+ * their names. Tickets that are already there stay while a refresh loads.
183
+ */
169
184
  @property({ type: Boolean, reflect: true })
170
185
  accessor loading = false;
171
186
 
@@ -267,6 +282,11 @@ export class DeesKanban extends DeesElement {
267
282
  input => this.persistMove(input),
268
283
  () => !this.pendingTicketId,
269
284
  );
285
+ private readonly firstLoad = new KanbanFirstLoadController(
286
+ this,
287
+ () => this.isFirstLoad(),
288
+ () => DeesKanban.stillLoadingAfter,
289
+ );
270
290
  /** The columns' scrollbar, shown while they scroll sideways. */
271
291
  private readonly scrollbars = new OverlayScrollbarController(
272
292
  this,
@@ -292,6 +312,7 @@ export class DeesKanban extends DeesElement {
292
312
  activeFilterBarStyles,
293
313
  overlayScrollbarStyles,
294
314
  scrollEdgeInlineFadeStyles,
315
+ kanbanSkeletonStyles,
295
316
  css`
296
317
  /*
297
318
  * The board takes the height its host gives it, as a flex column's remaining space or a sized
@@ -361,10 +382,15 @@ export class DeesKanban extends DeesElement {
361
382
  corner-shape: var(--dees-corner-shape);
362
383
  }
363
384
 
364
- .filterStatus {
385
+ .filterStatus,
386
+ .loadingStatus {
365
387
  ${visuallyHidden}
366
388
  }
367
389
 
390
+ .placeholderTotals {
391
+ width: 14ch;
392
+ }
393
+
368
394
  .actions {
369
395
  display: flex;
370
396
  gap: 8px;
@@ -481,10 +507,18 @@ export class DeesKanban extends DeesElement {
481
507
  const count = active.filter(filter => filter.key !== 'text').length;
482
508
  const filterLabel = count ? this.t('kanban.filtersActive', { count }) : this.t('kanban.filters');
483
509
  const projects = kanbanProjects(this.projects, this.tickets);
510
+ const firstLoad = this.isFirstLoad();
511
+ const stillLoading = this.firstLoad.stillLoading;
484
512
  return html`<header class="heading">
485
513
  <div class="identity">
486
514
  <h2>${this.heading || this.t('kanban.board')}</h2>
487
- <span class="totals">${this.t('kanban.totals', { tasks: tasks.length, epics: epics.length })}</span>
515
+ ${firstLoad && stillLoading
516
+ ? html`<span class="totals" aria-hidden="true">${this.t('kanban.stillLoading')}</span>`
517
+ : firstLoad
518
+ ? html`<span class="totals skeleton" aria-hidden="true"><span
519
+ class="skeletonFill skeletonBar placeholderTotals"
520
+ ></span></span>`
521
+ : html`<span class="totals">${this.t('kanban.totals', { tasks: tasks.length, epics: epics.length })}</span>`}
488
522
  </div>
489
523
  <div class="filters">
490
524
  <div class="searchField">
@@ -569,7 +603,10 @@ export class DeesKanban extends DeesElement {
569
603
  </header>
570
604
  ${this.renderActiveFilters(active)}
571
605
  <p class="filterStatus" role="status">${this.filterAnnouncement}</p>
572
- ${this.loading || this.openingTicket
606
+ <p class="loadingStatus" role="status">${firstLoad
607
+ ? this.t(stillLoading ? 'kanban.stillLoading' : 'kanban.loading')
608
+ : ''}</p>
609
+ ${!firstLoad && (this.loading || this.openingTicket)
573
610
  ? html`<p class="caption" role="status">${this.loading
574
611
  ? this.t('kanban.loading')
575
612
  : this.t('kanban.opening')}</p>`
@@ -577,10 +614,22 @@ export class DeesKanban extends DeesElement {
577
614
  ${this.error || this.operationError
578
615
  ? html`<p class="error" role="alert">${this.error || this.operationError}</p>`
579
616
  : ''}
580
- ${!this.columns.length
617
+ ${!this.columns.length && !firstLoad
581
618
  ? html`<p class="empty">${this.t('kanban.noColumns')}</p>`
582
- : html`<div class="columns ${this.scrollEdges.fadeClasses()}" aria-label=${this.heading || this.t('kanban.board')}>
583
- ${directives.repeat(this.columns, column => column.id, column => html`<dees-kanban-column
619
+ : html`<div
620
+ class="columns ${this.scrollEdges.fadeClasses()}"
621
+ aria-label=${this.heading || this.t('kanban.board')}
622
+ aria-busy=${this.loading ? 'true' : 'false'}
623
+ >
624
+ ${!this.columns.length
625
+ ? placeholderCards.map(cards => html`<dees-kanban-column
626
+ .placeholderCards=${cards}
627
+ .placeholderStalled=${stillLoading}
628
+ ></dees-kanban-column>`)
629
+ : ''}
630
+ ${directives.repeat(this.columns, column => column.id, (column, index) => html`<dees-kanban-column
631
+ .placeholderCards=${firstLoad ? placeholderCards[index % placeholderCards.length] : 0}
632
+ .placeholderStalled=${stillLoading}
584
633
  .column=${column}
585
634
  .columns=${this.columns}
586
635
  .pointerManaged=${true}
@@ -598,6 +647,11 @@ export class DeesKanban extends DeesElement {
598
647
  </div>`}`;
599
648
  }
600
649
 
650
+ /** The board's first load runs: loading, with no tickets yet and nothing failed. */
651
+ private isFirstLoad(): boolean {
652
+ return this.loading && this.tickets.length === 0 && !this.error;
653
+ }
654
+
601
655
  /**
602
656
  * The active-filter bar: below the header, a chip for each filter off its default and for the
603
657
  * search, each removing what it names, then "Clear all". Nothing filtered, no bar.