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.

crop search, dialogs and citations to their surface while they open

Eric Brownrout753db07ae1cc
diff --git a/app/src/renderer/src/components/MotionPopup.tsx b/app/src/renderer/src/components/MotionPopup.tsx
index cc77acb6..27e4eb8a 100644
--- a/app/src/renderer/src/components/MotionPopup.tsx
+++ b/app/src/renderer/src/components/MotionPopup.tsx
@@ -15,7 +15,7 @@ export const MotionPopup = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<t
if (!el || !shell || !body) return
const running = animations.current.some(animation => animation.playState === 'running')
const shape = getComputedStyle(shell), text = getComputedStyle(body)
- const transform = shape.transform, opacity = shape.opacity, textOpacity = text.opacity
+ const transform = shape.transform, opacity = shape.opacity, textOpacity = text.opacity, clip = text.clipPath
const popupOpacity = getComputedStyle(el).opacity
animations.current.forEach(animation => animation.cancel())
animations.current = []
@@ -33,8 +33,23 @@ export const MotionPopup = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<t
{ transform: running ? transform : 'none', opacity: running ? opacity : 1 },
{ transform: 'translateY(6px) scale(.98, .96)', opacity: 0 },
]
+ // The content stays at its final size, cropped to the stretching surface so it never shows past the surface's edge.
+ const box = body.getBoundingClientRect(), round = getComputedStyle(el).borderRadius
+ const cropped = (y: number, sx: number, sy: number) => {
+ const side = (1 - sx) / 2 * box.width, edge = (1 - sy) / 2 * box.height
+ return `inset(${edge + y}px ${side}px ${edge - y}px ${side}px round ${round})`
+ }
+ const crops: Keyframe[] = open ? [
+ { clipPath: running && clip !== 'none' ? clip : cropped(12, .94, .86), easing: surfaceMotion.settleEase },
+ { clipPath: cropped(-1, 1.008, 1.018), offset: surfaceMotion.settleAt, easing: 'ease-out' },
+ { clipPath: cropped(0, 1, 1) },
+ ] : [
+ { clipPath: running && clip !== 'none' ? clip : cropped(0, 1, 1) },
+ { clipPath: cropped(6, .98, .96) },
+ ]
animations.current = [
shell.animate(frames, { duration, easing: open ? 'linear' : 'ease-out', fill: 'both' }),
+ body.animate(crops, { duration, easing: open ? 'linear' : 'ease-out', fill: open ? 'backwards' : 'forwards' }),
body.animate([{ opacity: running ? textOpacity : open ? 0 : 1 }, { opacity: open ? 1 : 0 }], {
duration: open ? 150 : 90, delay: open ? 35 : 0, easing: 'ease-out', fill: 'both',
}),
diff --git a/app/src/renderer/src/workspace.css b/app/src/renderer/src/workspace.css
index 68a74512..8ff38284 100644
--- a/app/src/renderer/src/workspace.css
+++ b/app/src/renderer/src/workspace.css
@@ -321,7 +321,7 @@
.citation-open:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
.citation-card[data-morph=true] .citation-liquid { filter:var(--citation-filter); }
.citation-card[data-morph=true] .citation-mass { animation:citation-pull 280ms linear both; }
-.citation-card[data-morph=true] .citation-content { animation:citation-in 130ms ease-out 90ms both; }
+.citation-card[data-morph=true] .citation-content { animation:citation-in 130ms ease-out 90ms both,citation-crop 280ms linear backwards; }
.citation-card[data-morph=true] .citation-edge { animation:citation-in 160ms ease-out 120ms both; }
@keyframes citation-pull {
0% { transform:translate(var(--from-x),var(--from-y)) scale(var(--from-sx),var(--from-sy));border-radius:12px;animation-timing-function:cubic-bezier(.18,.8,.25,1); }
@@ -329,6 +329,12 @@
100% { transform:none;border-radius:12px; }
}
@keyframes citation-in { from { opacity:0; } to { opacity:1; } }
+/* the text stays at its final size, cropped to the growing mass (origin top left) so it never shows past its edge */
+@keyframes citation-crop {
+ 0% { clip-path:inset(var(--from-y) calc(100% - var(--from-x) - var(--from-sx) * 100%) calc(100% - var(--from-y) - var(--from-sy) * 100%) var(--from-x) round 9px);animation-timing-function:cubic-bezier(.18,.8,.25,1); }
+ 72% { clip-path:inset(-2px .8% calc(2px - 1.8%) 0 round 14px);animation-timing-function:cubic-bezier(.2,0,.25,1); }
+ 100% { clip-path:inset(0 round 12px); }
+}
@media(prefers-reduced-motion:reduce) { .citation-card { transition:none; }.citation-card * { animation:none!important; }.citation-liquid { filter:none!important; } }
.chat-rename-input { width:100%;height:34px;padding:0 8px;border:1px solid var(--focus);border-radius:6px;background:var(--float);color:var(--ink); }
::highlight(citation-target) { background:color-mix(in srgb,var(--accent-soft) 70%,transparent); }