fix: updated keyboard shortcuts display to use tooltips#4208
fix: updated keyboard shortcuts display to use tooltips#4208Akhileshait wants to merge 3 commits intounkeyed:mainfrom
Conversation
|
|
@Akhileshait is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughReplaces hover-revealed keyboard shortcut displays with InfoTooltip wrappers around buttons. Tooltip content now shows a label plus a KeyboardButton shortcut (⌥+⇧+Q / ⌥+⇧+W); button click behavior and public props remain unchanged. Tooltip delay set to 300ms and positioned bottom-center. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as InfoTooltip / Button
participant App as Component (onToggle / onRefresh)
Note over User,UI: Hover (300ms delay)
User->>UI: hover
UI-->>User: show tooltip (label + KeyboardButton shortcut)
Note over User,App: Click action
User->>UI: click button (asChild)
UI->>App: invoke handler (onToggle / onRefresh)
App-->>UI: update state (isLive / loading)
UI-->>User: reflect new visual state (active styling, ping, disabled states)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-25T13:05:22.441ZApplied to files:
🔇 Additional comments (1)
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 |
|
Thank you for following the naming conventions for pull request titles! 🙏 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ogzhanolguncu
left a comment
There was a problem hiding this comment.
Can we do show something like this in the tooltip instead of what we have right now?
Press 'XXXXXX' to toggle. Please, address
Clear filters: ⌥+⇧+A
Focus filters: ⌥+⇧+S
Those two as well
What does this PR do?
This PR improves the UX of keyboard shortcuts in the dashboard by replacing hover-revealed containers with proper tooltip components.
Changes
Replaced hover-revealed keyboard shortcuts with tooltips in:
LiveSwitchButton (live-switch-button/index.tsx)
groupclass and animated hover-revealed containerInfoTooltipdisplaying "Toggle live updates ⌥+⇧+Q"RefreshButton (refresh-button.tsx)
InfoTooltipto show keyboard shortcut when enabledgroupclassBenefits
InfoTooltipcomponentFixes #4086
Type of change
How should this be tested?
Navigate to Gateway Logs page
Test Live Switch Button
⌥+⇧+Q(Option+Shift+Q) still toggles live modeTest Refresh Button
⌥+⇧+W(Option+Shift+W) triggers refreshAccessibility Testing
Visual Verification
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated