Refine mine inbox shortcut behavior

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta 2026-03-28 16:45:44 -05:00
parent 7d81e4cb2a
commit 403aeff7f6
5 changed files with 39 additions and 19 deletions

View file

@ -136,8 +136,8 @@ describe("SwipeToArchive", () => {
const surface = container.querySelector("[data-inbox-row-surface]") as HTMLDivElement | null;
expect(surface).not.toBeNull();
expect(surface?.style.backgroundColor).toBe("hsl(var(--primary) / 0.06)");
expect(surface?.style.boxShadow).toBe("inset 3px 0 0 hsl(var(--primary))");
expect(surface?.style.backgroundColor).toBe("hsl(var(--muted))");
expect(surface?.style.boxShadow).toBe("");
act(() => {
root.unmount();

View file

@ -155,8 +155,7 @@ export function SwipeToArchive({
style={{
transform: `translate3d(${offsetX}px, 0, 0)`,
transition: isDragging ? "none" : "transform 180ms ease-out",
backgroundColor: selected ? "hsl(var(--primary) / 0.06)" : undefined,
boxShadow: selected ? "inset 3px 0 0 hsl(var(--primary))" : undefined,
backgroundColor: selected ? "hsl(var(--muted))" : undefined,
}}
>
{children}