Skip to content

fix(ui-kit): respect prefers-reduced-motion on Skeleton's pulse animation#7025

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:fix/skeleton-reduced-motion
Jul 17, 2026
Merged

fix(ui-kit): respect prefers-reduced-motion on Skeleton's pulse animation#7025
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:fix/skeleton-reduced-motion

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

  • packages/loopover-ui-kit/src/components/skeleton.tsx's Skeleton used animate-pulse with no motion-reduce:animate-none companion class, unlike every other animated primitive in the kit (Spinner, button.tsx, tabs.tsx).
  • state-views.tsx's own doc comment claims "All animations respect prefers-reduced-motion" for the loading-state family, and directs callers to Skeleton for content-shaped placeholders — making Skeleton the one component that didn't actually honor that claim.
  • Adds motion-reduce:animate-none to Skeleton's className, matching the existing convention exactly. No change to base styling or prop passthrough.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves.

Closes #7016

Validation

  • git diff --check
  • npm run actionlint (backend-only check; this PR only touches packages/loopover-ui-kit + a test in apps/loopover-ui)
  • npm run typecheck (via npm run ui:typecheck, the UI-scoped equivalent — includes the ui:kit:build step)
  • npm run test:coverage (backend-only; packages/loopover-ui-kit has no standalone test runner — see Notes)
  • npm run test:workers / npm run build:mcp / npm run test:mcp-pack (not applicable to this UI-kit-only change)
  • npm run ui:openapi:check (no API/schema changes)
  • npm run ui:lint — 0 errors
  • npm run ui:typecheck — clean
  • npm --workspace @loopover/ui run test src/components/site/skeleton-reduced-motion.test.tsx — 2/2 passing
  • npm audit --audit-level=moderate (no dependency changes)
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • packages/loopover-ui-kit has no test script or vitest config of its own (confirmed via its package.json), so ui-kit components are exercised through apps/loopover-ui's test runner, importing directly from @loopover/ui-kit/components/... — the new regression test follows that same pattern (mirrors how state-views.tsx's ported components are consumed/tested). npm run test:workers, the MCP packaging checks, and actionlint have no surface to exercise for a one-class CSS change to a shared UI primitive.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — no auth/cookie/CORS/session changes.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A — no API/OpenAPI/MCP changes.)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (N/A — this is a CSS-only accessibility fix to a shared primitive, not API-data-driven.)
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots. (N/A — prefers-reduced-motion only changes animation behavior under a media-query condition a static screenshot can't show; the new test asserts the actual class is present, which is the relevant, verifiable evidence for this kind of change.)
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • packages/loopover-ui-kit/dist/ is gitignored and rebuilt locally via npm run build --workspace @loopover/ui-kit (also the ui:kit:build step inside ui:typecheck) — no generated artifact needs committing for this change.

…tion

Every other animated ui-kit primitive (Spinner, button, tabs) pairs its
animation with motion-reduce:animate-none; Skeleton was the one loading-state
component in that family that didn't, despite state-views.tsx's own doc
comment claiming the whole family respects prefers-reduced-motion.
@galuis116
galuis116 requested a review from JSONbored as a code owner July 17, 2026 18:29
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 18:34:32 UTC

2 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a minimal, well-targeted one-line fix that adds `motion-reduce:animate-none` to Skeleton's className, matching the existing convention used in Spinner, button.tsx, and tabs.tsx. It closes issue #7016 exactly as described, includes a focused test verifying both the class presence and className merge behavior, and CI passed cleanly. No scope creep, no unrelated changes.

Nits — 2 non-blocking
  • The test file's comment block duplicates the PR description almost verbatim; a shorter inline comment would suffice.
  • Consider adding a quick visual/manual check note in the PR description confirming the skeleton pulse actually stops under OS-level reduced-motion settings, since the test only checks class presence, not the resulting computed animation.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7016
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 1957 registered-repo PR(s), 1287 merged, 52 issue(s).
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 1957 PR(s), 52 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff adds `motion-reduce:animate-none` to Skeleton's className exactly matching the existing convention, without altering base styling or prop passthrough, and includes a regression test asserting the class is present on the rendered element.

Review context
  • Author: galuis116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python, Dart, TypeScript, HTML, MDX, Rust, C++
  • Official Gittensor activity: 1957 PR(s), 52 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 12d030f into JSONbored:main Jul 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skeleton's animate-pulse doesn't respect prefers-reduced-motion, unlike every other animated ui-kit primitive

1 participant