Repository navigation
feat(motion): reduced-motion fades, motion utilities, instant surfaces and web gaps - #38
Merged
Merged
Conversation
…s and web gaps The package half of the web design audit (ATL-1011), CC-1 and CC-3 to CC-18: - Under reduced motion every entrance (scale-in, card-in, card-rise, pill-in, slide-in) fades instead, closing exits fade out, and endless loops stop. - New utilities: pressable, glass, glass-bar, surface-card, page-title, thinking-shimmer, stream-caret, animate-card-rise, animate-pulse-ring and animate-jump-flash; the JS tokens EASE_OUT_STRONG, EASE_IN_OUT_STRONG, EASE_DRAWER and DURATION; the opt-in SURFACE_CARD_RULE. - `instant` on Dialog, Popover, Sheet and SideDock; Sheet sizes, flush, surface and header options; Dialog `sm`; Popover `flush`. - Button loading, success and pill; IconButton alert, glass, xl and reveal; Input code and read-only; Textarea sizes; RadioCard; CopyField; SettingRow disabled; Progress by transform; cards on surface-card; Panel `index`. - Web gaps: SettingsShell phone layout, prefix-matched nav and `wide`; OrgSwitcher logos, plan, loading, invite and create callbacks, number keys and hidden shortcut hints; ProfileMenu and InfoMenu host children and onFeedback; PersonAvatar art, null image and xl/2xl; Skeleton xl radius; EmptyState page size; KpiStrip on a phone; TextLink inline. Panel's `delay` becomes `index`, as the audit specifies; web's two call sites move in its PR A.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The package half of the web design audit (ATL-1011), plus the package gaps web's lint PR (tryatlas/server#52) found. Everything is additive except Panel's
delay→index, which the audit specifies; web's two call sites move in its PR A. Not released: this is meant to ship as v0.1.18 once merged.Audit items
data-closed/data-ending-style): an unscoped swap would fade popups out as they open. icon-send and bell-ring run at 0.01ms rather thananimation: none, so theironAnimationEndhandlers still fire.pressablescaleproperty plus colour transitions, as Button does, and is skipped when disabled (:disabled,data-disabled,aria-disabled).glass,glass-barprefers-reduced-transparency.EASE_OUT_STRONG,EASE_IN_OUT_STRONG,EASE_DRAWER,DURATION, plusMotionConfig reducedMotion="user"guidance.thinking-shimmer,stream-caretandanimate-pulse-ring, plusSkeleton inline. All three are inINFINITE_ANIMATIONSas utility rows, with a test..session-caretis replaced bystream-caret; nothing outside the package used it.surface-cardis used by Panel, StatGrid, DataTable, SettingCard and KpiStrip. The ratchet rule ships as an exported, opt-inSURFACE_CARD_RULE, not instrictRules, so adopting the new version doesn't fail web's suite until it opts in.pb-4dropped; newpage-titleutility.size="sm",--app-vwwidths,instant(overlay included).flush,instant. The glass surface already existed.size,flush,instant, bottom-sheet defaults, full-edge translates, slow in and quick out.shape="pill",elevated,success,success-subtle,loading. While loading, the label goes transparent (text-transparent *:opacity-0) rather thanopacity-0, which has no effect on adisplay: contentsbox. It also isn'tinvisible, which would drop the button's accessible name.alert,glass,xl.xlissize-[48px], notsize-12:remfollows the app's root font size, sosize-12measured 39px at the 13px root. 48px is what the story asserts.pointer-coarse:text-lg,variant="code", read-only look. The read-only look is scoped withnot-disabledso it doesn't override the disabled look.disabled/disabledReason,RadioCard,RadioGroup density="compact",CopyField,TableRow data-muted, SettingsShellwideand phone rail.animate-card-risewithindex, TimelineCalendar's date fades. On KpiStrip, a wide strip shows as many columns as cells (up to six), not a fixed four, because fixed columns left empty slots for 3, 5 or 6 cells. On a phone an odd last cell spans the row.topBarActions, Escape to close, an always-mounted scrim and close ona[href]only. Also:SideDock instant, the AuthSplit layout, no width transition on the composer, and CommsMessageRowdata-editing.AvatarGroupCount size="lg", PersonAvatar2xs,EmptyState size="page",CheckGlyph,animate-jump-flash,TextLink variant="inline". jump-flash animatesbackground-coloron purpose: a tint fading out has no transform equivalent.Web gaps (from tryatlas/server#52)
Organisation.logo,plan,loadingonCreateOrg,onInvite. WithoutonInvite, the item still links tomembersHref.numberKeys(switches and closes the menu),shortcuts={false}childrenon both,InfoMenu onFeedbackart,image={null},xl,2xlxlradiusreveal, which uses opacity and stays in the tab order and the accessibility tree. It shows on group hover or focus-within, on its own focus, while its popup is open, and always on touch screens.surface="glass")surface="card"|"background",SheetHeader divided/compactsizeadded; Input already hadxstolgEvery new variant has a story. The foundations pages cover the new utilities and the JS tokens. No new focus outlines.
Gates
bun run typecheck,bun run test(659),bun run test:storybook(908, with axe colour-contrast) andbun run format:checkall pass locally.