Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

recorder pill hugs its content with even 12px spacing

Eric Brownrout5e7208711236
diff --git a/app/e2e/widget.spec.ts b/app/e2e/widget.spec.ts
index 6210f2aa..78ae3d7c 100644
--- a/app/e2e/widget.spec.ts
+++ b/app/e2e/widget.spec.ts
@@ -304,7 +304,9 @@ test('hover stays stationary and pointer-down movement drags immediately without
try {
const w = await record(app, page)
const widget = w.getByTestId('widget')
- await expect(widget).toHaveCSS('width', '127px')
+ // the pill hugs its content: the same space at both ends
+ const ends = await widget.evaluate(el => { const r = el.getBoundingClientRect(), a = el.firstElementChild!.getBoundingClientRect(), z = el.lastElementChild!.getBoundingClientRect(); return [Math.round(a.left - r.left), Math.round(r.right - z.right)] })
+ expect(ends[0]).toBe(ends[1])
const before = (await snap(app)).bounds!
const presented = (await fake<{ presented: number }>(app, 'main')).presented
await w.mouse.move(50, 20)
diff --git a/app/src/renderer/src/styles.css b/app/src/renderer/src/styles.css
index ccd2ea5b..d59d64bb 100644
--- a/app/src/renderer/src/styles.css
+++ b/app/src/renderer/src/styles.css
@@ -174,7 +174,8 @@ html.widget { --pill:#232326;--pill-ink:#F7F7FA;--accent:#B780FF;--pill-accent:v
box-shadow:none;
touch-action: none;
}
-.widget-strip { grid-template-columns:18px minmax(27px,1fr) auto; }
+/* the pill hugs its content: 12px at each end and between items; tabular figures keep it still as seconds tick, and it grows only when the timer gains a digit */
+.widget-strip { grid-template-columns:18px 27px max-content; }
.widget-pill:focus-visible { outline: 2px solid var(--pill-accent); outline-offset: -3px; }
.widget-btn { color:#fff;background:#6F00FF;transition: transform 120ms ease, background-color 120ms ease; }
.widget-btn-secondary { color:var(--pill-ink);background:#39393E; }
diff --git a/app/src/renderer/src/windows/Widget.tsx b/app/src/renderer/src/windows/Widget.tsx
index daa6dbb9..e33dd1a3 100644
--- a/app/src/renderer/src/windows/Widget.tsx
+++ b/app/src/renderer/src/windows/Widget.tsx
@@ -133,12 +133,12 @@ function Recording({ view, cardRef }: { view: WidgetView; cardRef: React.RefObje
const press = useDragOrClick(() => window.yogurt.widget.open(), hover)
const note = view.note
return (
- <div ref={cardRef} data-testid="widget" data-kind="recording" role="button" tabIndex={0} className="widget-pill widget-strip grid h-[42px] w-max min-w-[127px] shrink-0 cursor-pointer select-none items-center gap-3 rounded-[10px] px-3 text-[var(--pill-ink)]"
+ <div ref={cardRef} data-testid="widget" data-kind="recording" role="button" tabIndex={0} className="widget-pill widget-strip grid h-[42px] w-max shrink-0 cursor-pointer select-none items-center gap-3 rounded-[10px] px-3 text-[var(--pill-ink)]"
{...press} onPointerEnter={hover.enter} onPointerLeave={hover.leave}
aria-label={t('Open {title}', { title: view.title })} title={note?.text ?? t('Recording {title}', { title: view.title })}>
<Swap show={note ? 'warning' : 'logo'} className="text-[var(--pill-accent)]" options={{ logo: <Logo size={18} />, warning: <TriangleAlert data-testid="widget-warning" size={18} /> }} />
<LevelBars testId="widget-wave" height={16} className="justify-self-center text-[var(--pill-accent)]" />
- <span data-testid="widget-time" className="min-w-[32px] shrink-0 whitespace-nowrap text-end text-[10px] font-medium tabular-nums opacity-80">
+ <span data-testid="widget-time" className="shrink-0 whitespace-nowrap text-[10px] font-medium tabular-nums opacity-80">
{time}
</span>
</div>