🧹 Refactor button hover interactions to remove code duplication#19
🧹 Refactor button hover interactions to remove code duplication#19dynamikdev wants to merge 1 commit into
Conversation
- Removed duplicated `Interaction::Hovered` code from multiple UI systems. - Added a generic `button_hover_system` to handle hover styles globally. - Corrected missing `Interaction::None` match arm in `sequence_control_button_system`. - Enforced system ordering to allow toggle-state buttons to safely override generic background restorations. Co-authored-by: dynamikdev <717692+dynamikdev@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: Removed duplicated hover-handling code across UI button systems and introduced a single generic hover system. Fixed a state bug where the sequence control button failed to reset its base color when un-hovered.
💡 Why: Code duplication makes maintenance harder. A single generic hover system centralizes the hover style (GHOST_BORDER), making it easier to tweak the design system globally. Addressing the
sequence_control_button_system's missingInteraction::Noneblock resolves a visual bug where it would "stick" to the hover state instead of restoring to the activePRIMARY_EMISSIVEcolor.✅ Verification:
cargo checklocally after installing Linux Bevy dependencies.CI=true cargo testpass successfully.✨ Result: Improved UI maintainability and visual consistency, all while shrinking the codebase and fixing an interaction bug.
PR created automatically by Jules for task 7089390449446674377 started by @dynamikdev