Frontend motion & touch: honor prefers-reduced-motion; contain overscroll in drawer/dialog #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
prefers-reduced-motion is not honored anywhere
grep -rn 'prefers-reduced-motion' web/src web/index.html→ zero hits. Every animation runs unconditionally for users who've asked the OS for reduced motion:data-open:animate-in …insrc/components/ui/)animate-pulseskeletonstransition-[width]expand/collapse (src/shell/sidebar.tsx)Simplest global fix in
src/index.css:(or the more surgical Tailwind
motion-safe:/motion-reduce:prefixes on thedata-open/data-closedanimation classes — the global rule is less churn and covers future additions.)Modal surfaces don't contain overscroll
grep -rn overscroll web/src→ zero hits. On touch devices, scrolling past the end of the drawer body or a scrollable dialog chains to the page beneath, breaking the modal illusion:web/src/components/ui/drawer.tsx— addoverscroll-y-containto theDrawerContentpopup (the detail drawer scrolls long object records).web/src/components/ui/alert-dialog.tsx— same onAlertDialogContent.web/src/components/ui/combobox.tsx/menu.tsx/select.tsxpopups (overflow-autolists) — same, so flicking past the end of a long term list doesn't scroll the page.Both changes are CSS-only inside
src/components/ui/, no bundle-size impact.Fixed in
9a896bb(merged as3a57c0a).prefers-reduced-motion: reducerule inindex.css@layer base— collapses all animation/transition durations to 0.01ms, covering the kit'sdata-open/closedanimations,animate-pulseskeletons, and the sidebartransition-[width]with one rule (and any future additions for free).overscroll-y-containonDrawerContent,SelectContent, andComboboxPopup(the scrollable surfaces), plusAlertDialogContentdefensively for when it gains scrollable content.MenuPopupwas skipped deliberately: it has nomax-height/overflow, so it can never scroll — containment there would be a no-op.Verified in the built output:
dist/assets/*.csscontains both theprefers-reduced-motionmedia query andoverscroll-behavior-y:contain.