feat(webapp): restyle the modal and sheet close buttons - #4603
Conversation
Replace the close button on Dialog and Sheet with a square icon-only button
using the project's CrossIcon. The esc key label moves out of the button and
into a hover tooltip ("Close" + the Esc key) delayed by 500ms.
Both surfaces are Radix Dialog underneath, so the treatment lives in one new
ModalCloseButton primitive. Each surface keeps its existing height (size-7 for
dialogs, size-6 for sheets) so nothing repositions - the buttons only get
narrower.
The tooltip is driven by its own hover timer rather than Radix's: Radix opens
tooltips instantly on focus, and both surfaces autofocus the close button when
they hold no other tabbable content, which would otherwise pop the tooltip open
on mount and leave it there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (21)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{packages/core,apps/webapp}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/webapp/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)
Files:
🧠 Learnings (19)📓 Common learnings📚 Learning: 2026-07-28T21:57:20.061ZApplied to files:
📚 Learning: 2026-08-08T17:54:15.083ZApplied to files:
📚 Learning: 2026-01-28T16:57:47.620ZApplied to files:
📚 Learning: 2026-02-11T16:37:32.429ZApplied to files:
📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-06-13T19:53:13.759ZApplied to files:
📚 Learning: 2026-06-17T17:13:49.929ZApplied to files:
📚 Learning: 2026-06-23T13:04:21.413ZApplied to files:
📚 Learning: 2026-04-16T14:21:15.229ZApplied to files:
📚 Learning: 2026-05-08T21:00:20.973ZApplied to files:
📚 Learning: 2026-06-25T18:21:55.847ZApplied to files:
📚 Learning: 2026-05-12T21:04:05.815ZApplied to files:
📚 Learning: 2026-06-25T18:21:51.905ZApplied to files:
📚 Learning: 2026-07-03T17:10:21.498ZApplied to files:
📚 Learning: 2026-06-25T18:21:54.729ZApplied to files:
🔇 Additional comments (3)
WalkthroughAdded the shared 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
The close button on modals and slide-over panels is now a simpler icon-only button. The
Esckey label moves out of the button and into a hover tooltip, delayed by 500ms.Verified
Both surfaces, driven in a real browser: no tooltip on open despite autofocus, hidden at 300ms of hover, "Close · Esc" at 700ms, hides on pointer leave,
Escapecloses, clicking the X closes with no orphaned tooltip, and the button stays keyboard-focusable (tabIndex 0). Thefullscreendialog variant flips the tooltip below to stay on-screen.typecheck --filter webapppasses;formatandlintare clean.🤖 Generated with Claude Code
Open workspace in Conductor