Skip to content

Commit 43870e3

Browse files
authored
πŸ€– GitHub-like hover buttons for code review comments (#326)
## Changes Transforms code review commenting to GitHub-like interaction pattern: ### UX Flow - **Hover line** β†’ `+` button fades in - **Click +** β†’ Opens comment textarea - **Click line content** β†’ Normal text selection works ✨ - **Enter** β†’ Submit review note - **Shift+Enter** β†’ Newline - **Esc** β†’ Cancel ### Key Improvements 1. **Hover-revealed comment buttons** - Hidden by default, appear on hover - Only buttons trigger comment mode - Text selection works everywhere else 2. **Improved textarea UX** - Starts at 3 lines, auto-expands with content - Less padding (seamless background) - Consistent shortcuts with chat (Enter to submit) 3. **Performance optimization** - Extracted textarea to separate memoized component - No re-renders of diff lines while typing 4. **Infrastructure** - Enabled @emotion/babel-plugin for component selectors - Consolidated duplicate vite config (DRY) - Use Tooltip component instead of title attribute ## Testing - βœ… TypeScript compilation passes - βœ… Text selection works on diff lines - βœ… Typing is instant (no re-render lag) - βœ… All keyboard shortcuts work _Generated with `cmux`_
1 parent 70946af commit 43870e3

File tree

4 files changed

+221
-117
lines changed

4 files changed

+221
-117
lines changed

0 commit comments

Comments
Β (0)