Skip to content

fix(ui): tokenise the Mosaic Menu item's transition duration - #9460

Draft
maxyinger wants to merge 1 commit into
mainfrom
max/menu-item-durations
Draft

fix(ui): tokenise the Mosaic Menu item's transition duration#9460
maxyinger wants to merge 1 commit into
mainfrom
max/menu-item-durations

Conversation

@maxyinger

Copy link
Copy Markdown
Collaborator

Description

item was the last slot in menu.styles.ts still carrying a hardcoded 150ms / 0.01ms pair while the rest of the file moves onto motion tokens. It now takes --cl-duration-base.

--cl-duration-base is 0.15s, so the hover/active fill lands exactly as it did — the emitted stylesheet is byte-identical, and the item's transition-duration class swaps from the literal .15s to var(--cl-duration-base).

The reduced-motion branch goes rather than being tokenised alongside it. item transitions only background-color, and a fill is not the vestibular concern prefers-reduced-motion is about — tokens.stylex.ts states that rule directly ("the gate belongs on the moving property at its use site, not on every duration here"), and Button already transitions its highlight the same way with no gate. Under reduce, a menu item's fill now settles over 0.15s instead of snapping.

Scoped to item. The popup slot's motion is a separate change.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

`item` was the last slot in `menu.styles.ts` still carrying a hardcoded
`150ms` / `0.01ms` pair. `--cl-duration-base` is 0.15s, so the fill lands
identically; the reduced-motion branch goes rather than moving with it,
since `item` transitions only `background-color` and a fill is not the
vestibular concern the signal is about. `Button` already transitions its
highlight the same way, and `tokens.stylex.ts` states the rule.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a68cd17

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 14, 2026 9:23pm
swingset Ready Ready Preview Aug 14, 2026 9:23pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9460

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9460

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9460

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9460

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9460

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9460

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9460

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9460

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9460

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9460

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9460

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9460

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9460

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9460

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9460

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9460

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9460

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9460

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9460

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9460

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9460

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9460

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9460

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9460

commit: a68cd17

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 2961909a-4f7b-499d-86e6-43914e0a1773

📥 Commits

Reviewing files that changed from the base of the PR and between ab80fc4 and a68cd17.

📒 Files selected for processing (2)
  • .changeset/menu-item-durations.md
  • packages/ui/src/mosaic/components/menu/menu.styles.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/cli (auto-detected)
  • clerk/clerk-android (auto-detected)

📝 Walkthrough

Walkthrough

The menu styles import durationVars and use --cl-duration-base for menu item transitions. The previous reduced-motion-specific duration configuration is removed. An empty Changesets frontmatter block is added.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a68cd

This localized styling change preserves the existing transition duration while replacing a hardcoded value with the standard motion token; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: alexcarpenter

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the tokenization of the Mosaic Menu item's transition duration.
Description check ✅ Passed The description accurately explains the transition token change, reduced-motion behavior, and scope of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@maxyinger
maxyinger marked this pull request as draft August 14, 2026 21:24
@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-14T21:24:59.341Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on a68cd17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant