-
Notifications
You must be signed in to change notification settings - Fork 46.2k
feat(frontend): add hover state to edge delete button in FlowEditor #11601
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
base: dev
Are you sure you want to change the base?
feat(frontend): add hover state to edge delete button in FlowEditor #11601
Conversation
### Changes 🏗️ - Added `useState` to manage hover state for the CustomEdge component. - Updated button opacity to transition based on hover state, improving user interaction feedback. - Refactored button class to utilize `cn` for conditional styling. ### Checklist 📋 - [x] Implemented hover effects for better UX - [x] Tested hover functionality to ensure proper visibility of the button
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 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 |
✅ Deploy Preview for auto-gpt-docs canceled.
|
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
|
Here's the code health analysis summary for commits Analysis Summary
|
|
Thank you for enhancing the CustomEdge component with hover effects! The implementation looks good, but there's an issue with your PR description: Your PR description has a custom checklist at the top, followed by an unfilled template at the bottom. Instead, you should fill out the template checklist completely. Please update your PR description to:
Once you've updated the description with a properly filled out checklist, we can proceed with the review. |
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Thanks for adding this UI improvement to the edge delete button! The hover state will definitely enhance the user experience. I noticed you've included both your own custom checklist (which is properly filled out) and the PR template checklist (which is not checked off). For future PRs, please either complete the template checklist or remove it entirely when you're using a custom format. The code changes look good and focused on the stated goal. Nice work with the transition effect implementation! |
| className={`absolute h-fit min-w-0 p-1`} | ||
| className={cn( | ||
| "absolute h-fit min-w-0 p-1 transition-opacity", | ||
| isHovered ? "opacity-100" : "opacity-0", |
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.
I would use hidden / block. With opacity, the button is still there. A quick misclick on that area will trigger the delete action, making the user think it is a bug 🐛
The delete button on flow editor edges is always visible, which creates visual clutter. This change makes the button only appear on hover, improving the UI while keeping it accessible.
Changes 🏗️
useStateto track when the edge delete button is hoveredonMouseEnterandonMouseLeavehandlers to the button to control hover statecnutility for conditional className managementopacity-0(still clickable for better UX)Checklist 📋
For code changes: