-
Notifications
You must be signed in to change notification settings - Fork 2.6k
UI Tweak: Fade buttons on history preview (homescreen) if no interaction in progress. #3523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI Tweak: Fade buttons on history preview (homescreen) if no interaction in progress. #3523
Conversation
|
|
Ready to go. |
b6b4fb5 to
0d78e52
Compare
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a nice detail to add to the main task list.
Just rebased and looks good!
hannesrudolph
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review: UI Tweak - Fade buttons on history preview
Overview
This PR implements a minor UI improvement to reduce visual clutter by fading action buttons in the history preview section when not actively being interacted with. The change uses CSS opacity transitions to make buttons less prominent until hovered.
✅ Strengths
Code Quality:
- Clean, minimal implementation focused on a single improvement
- Proper use of TypeScript with optional prop typing
- Good use of utility class composition with
cn()helper - Maintains existing functionality while enhancing UX
UI/UX Design:
- Thoughtful approach to reducing visual noise
- Progressive disclosure pattern - buttons appear when needed
- Maintains accessibility with hover states
- Before/after screenshots clearly demonstrate the improvement
Implementation Approach:
- Uses CSS classes for styling rather than inline styles
- Leverages existing design system (Tailwind CSS)
- Proper component prop extension pattern
- Good separation of concerns
🔍 Technical Details
Changes Made:
- CopyButton.tsx: Added optional
classNameprop and merged it with existing classes - TaskItem.tsx: Added
groupclass to enable group-hover functionality - TaskItemHeader.tsx: Applied opacity classes (
opacity-20,group-hover:opacity-50,hover:opacity-100)
CSS Class Hierarchy:
Default: opacity-20 (very faded)
Group hover: opacity-50 (medium fade)
Direct hover: opacity-100 (full opacity)
✅ Code Quality Assessment
Type Safety:
- Proper TypeScript implementation with optional props
- No type errors or unsafe operations
Accessibility:
- Maintains hover states for keyboard/mouse interaction
- Buttons remain functional at all opacity levels
- Good contrast progression
Performance:
- Zero performance impact - pure CSS transitions
- No JavaScript event handlers added
- Minimal bundle size increase
🔍 Minor Considerations
- Accessibility: While functional, very low opacity (20%) might be difficult for some users to discover
- Mobile: Touch interfaces don't have hover states - buttons will remain at 20% opacity
- Consistency: Consider if this pattern should be applied to other similar UI elements
Security & Performance
- ✅ No security implications
- ✅ No performance impact
- ✅ No external dependencies added
- ✅ CSS-only implementation
Overall Assessment
LGTM ✅
This is a well-executed, focused UI improvement that reduces visual clutter effectively while maintaining full functionality. The implementation uses proper React/TypeScript patterns and follows existing code conventions.
Suggestion for future consideration: Monitor user feedback to ensure the 20% opacity isn't too subtle for discoverability, and consider applying this pattern consistently across other similar UI elements.
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Minor UI Tweak: Fades the buttons on the homescreen history preview section if there's no interaction in progress to reduce visual clutter on that screen. This makes no functional difference, it simply reduces the visual prominence of the copy buttons and 'mutes' them if the relevant item is not currently in an active/hover state.
(Before: Left / After: Right)
Type of Change
Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Screen.Recording.2025-05-12.at.7.43.56.PM.mov
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Important
UI change to fade
CopyButtoninHistoryPreviewwhen not interacted with, reducing visual clutter.CopyButtoninCopyButton.tsxnow accepts an optionalclassNameprop to customize styles.HistoryPreview.tsx,CopyButtonis givenclassNamewithopacity-20andgroup-hover:opacity-50to fade when not hovered.This description was created by
for b6b4fb5cd0f0c00d52fd038e5c4ec5192b558019. You can customize this summary. It will automatically update as commits are pushed.