Commit 43870e3
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
4 files changed
+221
-117
lines changed
0 commit comments