From dca4f5c5620e3abaec5af7bde3ca99344b37bf9c Mon Sep 17 00:00:00 2001 From: "Bingxi Zhao (Frank)" <13051345080@163.com> Date: Tue, 24 Nov 2026 21:24:30 +0800 Subject: [PATCH] fix(ui): keep the popover entrance off the card-lift keyframes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit globals.css defines dt-pop-in as a 6px card lift (translateY(6px) scale(.985)), but modern.css redefined the same keyframes as a popover rise (scale(.97) translateY(-2px)). A duplicate @keyframes is last-one-wins, so every .animate-pop-in consumer — the settings card added here, the notebook record menu — silently ran the popover curve instead of the lift it asked for. Rename the popover copy to dt-popover-in and point its three call sites (workspace menu, command palette, note toolbar panel) at it. Popovers keep their current motion; .animate-pop-in gets its documented 6px/0.985 lift back, verified by sampling the card transform at 0/60/120/200ms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- web/features/notes/components/notes.css | 2 +- web/features/ui-layout/modern/modern.css | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/features/notes/components/notes.css b/web/features/notes/components/notes.css index 5ab71e750..eaef616dc 100644 --- a/web/features/notes/components/notes.css +++ b/web/features/notes/components/notes.css @@ -1855,7 +1855,7 @@ 0 3px 6px rgb(15 15 15 / 0.08), 0 9px 24px rgb(15 15 15 / 0.14) ); - animation: dt-pop-in 140ms var(--dt-ease, ease-out); + animation: dt-popover-in 140ms var(--dt-ease, ease-out); } .dt-note-toolbar-panel.is-colors { left: auto; diff --git a/web/features/ui-layout/modern/modern.css b/web/features/ui-layout/modern/modern.css index 19816e7ff..6bd712a3d 100644 --- a/web/features/ui-layout/modern/modern.css +++ b/web/features/ui-layout/modern/modern.css @@ -278,7 +278,7 @@ button.dt-record-toggle:focus-visible { outline: 2px solid var(--ring); outline- .dt-popover { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; padding: 6px; border-radius: var(--dt-radius-lg); background: var(--popover); color: var(--popover-foreground); - box-shadow: var(--dt-shadow-md); transform-origin: top left; animation: dt-pop-in 140ms var(--dt-ease); + box-shadow: var(--dt-shadow-md); transform-origin: top left; animation: dt-popover-in 140ms var(--dt-ease); } .dt-workspace-panel { width: max(100%, 260px); } .dt-menu-label { padding: 6px 8px 4px; font-size: 11.5px; font-weight: 500; color: var(--muted-foreground); } @@ -292,7 +292,11 @@ button.dt-record-toggle:focus-visible { outline: 2px solid var(--ring); outline- .dt-menu-slot :is(a, button) { color: var(--foreground) !important; background: transparent; } .dt-menu-divider { height: 1px; margin: 6px 4px; background: var(--border); } .dt-menu-footer { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 0 8px; font-size: 11.5px; color: var(--muted-foreground); } -@keyframes dt-pop-in { from { opacity: 0; transform: scale(.97) translateY(-2px); } to { opacity: 1; transform: none; } } +/* Menus and palettes rise from their trigger, so they scale up a touch from a + nudged-up position. Named separately from globals' `dt-pop-in` (the card lift + used by `.animate-pop-in`): a duplicate `@keyframes` is last-one-wins, which + silently made every card entrance use this popover curve. */ +@keyframes dt-popover-in { from { opacity: 0; transform: scale(.97) translateY(-2px); } to { opacity: 1; transform: none; } } /* ---- Sidebar footer: one generous new-conversation button ------------ */ .dt-sidebar-footer { flex-shrink: 0; padding: 8px 10px 12px; } @@ -312,7 +316,7 @@ button.dt-record-toggle:focus-visible { outline: 2px solid var(--ring); outline- .dt-palette { display: flex; flex-direction: column; width: min(640px, 100%); max-height: min(560px, 76vh); overflow: hidden; border-radius: 14px; background: var(--popover); color: var(--popover-foreground); box-shadow: var(--dt-shadow-md); - animation: dt-pop-in 160ms var(--dt-ease); + animation: dt-popover-in 160ms var(--dt-ease); } .dt-palette-field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; } .dt-palette-field input { flex: 1; min-width: 0; background: transparent; font-size: 15px; outline: none; color: var(--foreground); }