@gperezmz/bb-plugin-thread-glance 0.4.2 → 0.5.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.
@@ -3,7 +3,7 @@
3
3
  "sdkVersion": "0.5.9",
4
4
  "artifactFormatVersion": 1,
5
5
  "pluginId": "thread-glance",
6
- "pluginVersion": "0.4.2",
6
+ "pluginVersion": "0.5.0",
7
7
  "builtWith": {
8
8
  "bbVersion": "0.43.4",
9
9
  "pluginSdkVersion": "0.5.9"
@@ -39,7 +39,7 @@ export const OlderRowView = memo(function OlderRowView({ row, controller }: { ro
39
39
  );
40
40
  });
41
41
 
42
- /** The settled fold: a faint label, a hairline to the row's end, and a chevron. */
42
+ /** The settled fold: a muted label, a hairline to the row's end, and a chevron. */
43
43
  export const SettledRowView = memo(function SettledRowView({ row, controller }: { row: SettledRow; controller: RowController }) {
44
44
  const { label, ariaLabel } = settledRowText(row);
45
45
  return (
@@ -48,7 +48,7 @@ export const SettledRowView = memo(function SettledRowView({ row, controller }:
48
48
  aria-expanded={row.expanded}
49
49
  aria-label={ariaLabel}
50
50
  onClick={() => controller.onToggleSettled(row)}
51
- className="group/settled relative flex h-6 w-full items-center gap-2 rounded-md pr-1 text-left text-[11px] text-muted-foreground/70 outline-none hover:text-muted-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring max-md:pointer-coarse:h-9"
51
+ className="group/settled relative flex h-6 w-full items-center gap-2 rounded-md pr-1 text-left text-xs text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring max-md:pointer-coarse:h-9"
52
52
  style={{ paddingLeft: rowIndent(0) }}
53
53
  >
54
54
  <span className="shrink-0 tabular-nums">{label}</span>
@@ -102,7 +102,7 @@ export const EnvironmentRowView = memo(function EnvironmentRowView({
102
102
  <span className="pointer-events-none relative min-w-0 flex-1 truncate">{row.label}</span>
103
103
  )}
104
104
  {row.flag !== null ? <FlagGlyph flag={row.flag} className="pointer-events-none relative size-3.5" /> : null}
105
- <span className="pointer-events-none relative text-[11px] tabular-nums">{row.threadIds.length}</span>
105
+ <span className="pointer-events-none relative text-xs tabular-nums">{row.threadIds.length}</span>
106
106
  <Icon
107
107
  name={ICONS.expand}
108
108
  aria-hidden
@@ -57,7 +57,7 @@ export const ListHeader = memo(function ListHeader({
57
57
  title={needYouOnly ? "Show every thread" : "Show only what needs you"}
58
58
  onClick={onToggleNeedYou}
59
59
  className={cn(
60
- "inline-flex h-5 shrink-0 items-center rounded-full px-1.5 text-[11px] leading-none tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
60
+ "inline-flex h-5 shrink-0 items-center rounded-full px-1.5 text-xs leading-none tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
61
61
  needYouOnly ? NEED_YOU_ON : NEED_YOU,
62
62
  )}
63
63
  >
@@ -45,7 +45,7 @@ export function ProviderBadge({
45
45
  aria-label={display.name}
46
46
  title={display.name}
47
47
  className={cn(
48
- "inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-[3px] border border-border px-px text-[8px] font-semibold leading-none tracking-tight text-muted-foreground",
48
+ "inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-[3px] border border-border px-px text-[10px] font-semibold leading-none tracking-tight text-muted-foreground",
49
49
  muted && "opacity-60",
50
50
  className,
51
51
  )}
@@ -42,7 +42,7 @@ export function PullRequestBadge({ threadId }: { threadId: string }) {
42
42
  <span
43
43
  title={pullRequestLabel(pullRequest)}
44
44
  aria-label={pullRequestLabel(pullRequest)}
45
- className={cn("shrink-0 text-[11px] tabular-nums", pullRequestTone(pullRequest.attention))}
45
+ className={cn("shrink-0 text-xs tabular-nums", pullRequestTone(pullRequest.attention))}
46
46
  >
47
47
  #{pullRequest.number}
48
48
  </span>
@@ -413,8 +413,6 @@ export const ThreadRowView = memo(function ThreadRowView({
413
413
  className={cn(
414
414
  "min-w-0 truncate",
415
415
  row.bold ? "font-semibold" : "font-normal",
416
- // Children sit a step below their parent.
417
- row.depth > 0 && "text-xs",
418
416
  // Quiet threads step back so live ones lead; hover brings them back.
419
417
  dimmed && `${QUIET_TEXT} group-hover/row:text-foreground`,
420
418
  )}
@@ -461,7 +459,7 @@ export const ThreadRowView = memo(function ThreadRowView({
461
459
  <span
462
460
  title={`On ${row.machine}`}
463
461
  aria-label={`On ${row.machine}`}
464
- className="pointer-events-none max-w-20 truncate text-[11px] text-muted-foreground"
462
+ className="pointer-events-none max-w-20 truncate text-xs text-muted-foreground"
465
463
  >
466
464
  {row.machine}
467
465
  </span>
@@ -527,7 +525,7 @@ export const ThreadRowView = memo(function ThreadRowView({
527
525
  onPointerDown={(event) => event.stopPropagation()}
528
526
  onKeyDown={(event) => event.stopPropagation()}
529
527
  className={cn(
530
- "pointer-events-auto relative z-10 inline-flex h-5 shrink-0 items-center gap-0.5 rounded-md px-0.5 text-[11px] leading-none tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
528
+ "pointer-events-auto relative z-10 inline-flex h-5 shrink-0 items-center gap-0.5 rounded-md px-0.5 text-xs leading-none tabular-nums outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
531
529
  chip.flag === null
532
530
  ? cn("text-muted-foreground hover:text-foreground", dimmed && QUIET_TEXT)
533
531
  : TONE_CLASS[chipTone(chip.flag)],
@@ -547,7 +545,7 @@ export const ThreadRowView = memo(function ThreadRowView({
547
545
  <span data-trailing-slot="" className="relative grid h-6 shrink-0 items-center">
548
546
  <span aria-hidden className="invisible w-6 [grid-area:1/1]" />
549
547
  {TRAILING_SLOT_SIZERS.map((text) => (
550
- <span key={text} aria-hidden className="invisible text-[11px] font-medium tabular-nums [grid-area:1/1]">
548
+ <span key={text} aria-hidden className="invisible text-xs font-medium tabular-nums [grid-area:1/1]">
551
549
  {text}
552
550
  </span>
553
551
  ))}
@@ -562,7 +560,7 @@ export const ThreadRowView = memo(function ThreadRowView({
562
560
  title={time.label}
563
561
  aria-label={time.label}
564
562
  className={cn(
565
- "pointer-events-none justify-self-end text-[11px] tabular-nums transition-opacity [grid-area:1/1]",
563
+ "pointer-events-none justify-self-end text-xs tabular-nums transition-opacity [grid-area:1/1]",
566
564
  // A running timer reads as work, an age as history.
567
565
  time.kind === "timer" ? "font-medium text-[var(--timeline-accent)]" : "text-muted-foreground",
568
566
  fadeClass,
@@ -13,7 +13,9 @@ export const TONE_CLASS: Record<Tone, string> = {
13
13
  destructive: "text-destructive",
14
14
  // bb's timeline accent: blue, readable on the sidebar in both themes.
15
15
  working: "text-[var(--timeline-accent)]",
16
- background: "text-muted-foreground/50",
16
+ // Full muted: bb's shine dims the glyph by about a third, and at 75% its
17
+ // dim frames fell below 3:1 against the light sidebar.
18
+ background: "text-muted-foreground",
17
19
  "muted-strong": "text-muted-foreground/75",
18
20
  muted: "text-muted-foreground",
19
21
  none: "",
@@ -36,13 +38,14 @@ export function UnreadDot({ label, className }: { label?: string; className?: st
36
38
  }
37
39
 
38
40
  // The Idle state's ring: uncoloured, smaller than the column and thinned, so
39
- // it reads as status yet stays fainter than the unread dot and the draft
40
- // pencil. Screen readers skip it, so an Idle row announces what it did before.
41
+ // it reads as status yet stays fainter than every other glyph. Its tone alone
42
+ // sets its colour, so it keeps 3:1 against the sidebar. Screen readers skip
43
+ // it, so an Idle row announces what it did before.
41
44
  export function IdleRing({ className }: { className?: string }) {
42
45
  return (
43
46
  <span
44
47
  aria-hidden
45
- className={cn("inline-block size-2.5 shrink-0 rounded-full border-[1.5px] border-current opacity-50", className)}
48
+ className={cn("inline-block size-2.5 shrink-0 rounded-full border-[1.5px] border-current", className)}
46
49
  />
47
50
  );
48
51
  }
@@ -33,8 +33,8 @@ export const FLAG_ORDER: readonly Flag[] = [
33
33
 
34
34
  /**
35
35
  * `working` is bb's timeline accent, so a running thread stands out in both
36
- * themes; `background` keeps bb's faint tone for background
37
- * activity, so the two stay apart.
36
+ * themes; `background` draws background activity in the grey `muted` has,
37
+ * and its glyph shines, which keeps it apart from a draft.
38
38
  */
39
39
  export type Tone = "attention" | "destructive" | "working" | "background" | "muted" | "muted-strong" | "none";
40
40
 
@@ -247,7 +247,7 @@ export function computeState(thread: PluginSidebarThread, inputs: StateInputs):
247
247
  }
248
248
  if (inputs.unread) return { kind: "unread", label: "Unread", glyph: glyph("dot", "none"), ...none };
249
249
  if (inputs.hasDraft) return { kind: "draft", label: "Unsubmitted draft", glyph: glyph("Edit", "muted"), ...none };
250
- return { kind: "idle", label: "Idle", glyph: glyph("ring", "muted"), ...none };
250
+ return { kind: "idle", label: "Idle", glyph: glyph("ring", "muted-strong"), ...none };
251
251
  }
252
252
 
253
253
  /**
@@ -113,7 +113,7 @@ export interface EnvironmentRow {
113
113
  depth: number;
114
114
  }
115
115
 
116
- /** A group's settled fold: the faint "Settled (N)" divider at its end. */
116
+ /** A group's settled fold: the muted "Settled (N)" divider at its end. */
117
117
  export interface SettledRow {
118
118
  type: "settled";
119
119
  key: string;
@@ -11,3 +11,10 @@
11
11
  [data-icon] {
12
12
  display: inline-block;
13
13
  }
14
+
15
+ /* bb's colour utilities read its palette variables; a test sets the ones it needs. */
16
+ @theme inline {
17
+ --color-sidebar: var(--sidebar);
18
+ --color-foreground: var(--foreground);
19
+ --color-muted-foreground: var(--muted-foreground);
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gperezmz/bb-plugin-thread-glance",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "bb": ">=0.43",