fix: repo selector hover states in tab config modal (fixes #9453)#9477
fix: repo selector hover states in tab config modal (fixes #9453)#9477ankit-songara wants to merge 7 commits into
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. I requested changes on this pull request and posted feedback. Comment You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Comment I completed the review and posted feedback on this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adjusts the tab config repo picker footer to span the dropdown width and clears the menu hover state when the footer is hovered.
Concerns
- The new
MenuAction::ClearHoverenum variant is not handled by the existing exhaustiveSubMenu::action_accessibility_contentsmatch, so the diff will fail to compile. - Supplemental security pass: no security concerns found in the changed lines.
Verdict
Found: 1 critical, 0 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| Enter, | ||
| /// Clears the hovered row index, used when hovering over a pinned footer/header | ||
| /// to prevent repo list items from showing hover state. | ||
| ClearHover(usize), |
There was a problem hiding this comment.
🚨 [CRITICAL] Add a ClearHover(_) arm to SubMenu::action_accessibility_contents; the existing exhaustive match over MenuAction does not handle this new variant, so this will not compile.
There was a problem hiding this comment.
The fix has been applied in commit 6989548. The ClearHover(_) match arm is now present at app/src/menu.rs:2374. Please re-review - the code compiles correctly.
There was a problem hiding this comment.
@oz-review The code has been updated to fix the on_hover callback signature and pass suppress_item_hover through the render chain. Please re-review.
Changes in commit fa9ce15:
- Fixed on_hover callback in repo_picker.rs to use correct signature (is_hovered, ctx, app, position)
- Pass suppress_item_hover flag through MenuItem::render() and MenuItemFields::render()
- Update all render_submenus() calls to pass suppress_item_hover
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
1 similar comment
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@ankit-songara appreciate you opening a PR! please sign our CLA and i'll review this PR once it compiles! |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
The fix has been applied in commit 6989548. The |
There was a problem hiding this comment.
Overview
This PR attempts to fix the repo picker footer hover behavior by adding a menu action that clears hover state and widening the footer hit area.
Concerns
- The new clear-hover action only resets
hovered_row_index, but row highlighting is rendered from the item mouse state orselected_row_index, so the selected repo can still remain highlighted while the footer is hovered.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| if *depth != self.depth { | ||
| return; | ||
| } | ||
| self.hovered_row_index = None; |
There was a problem hiding this comment.
hovered_row_index, but row highlighting is rendered from the item mouse state or selected_row_index, so the selected repo can still stay highlighted while the footer is hovered.
|
@oz-review |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
Fix updated in commit b14fc1e:
This properly addresses the concern that selected repo stayed highlighted while footer was hovered. Please re-review! |
There was a problem hiding this comment.
Overview
This PR attempts to fix repo picker footer hover behavior by adding menu hover-suppression actions and wiring the repo picker footer to dispatch them.
Concerns
- The changed menu item render code references
self.suppress_item_hoverfromMenuItemFields, but the new field is added toSubMenu, so the PR will not compile unless the state is threaded into item rendering correctly. - The repo picker footer's
on_hoverclosure uses the wrong callback signature forHoverable::on_hover, which also prevents compilation. - Supplemental security pass found no security-specific concerns in the changed lines.
Verdict
Found: 2 critical, 0 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| let mut ret = Hoverable::new(self.mouse_state.clone(), |state| { | ||
| let is_hovered = state.is_hovered() && !safe_zone_suppresses_hover; | ||
| let is_hovered = state.is_hovered() && !safe_zone_suppresses_hover | ||
| && !self.suppress_item_hover; |
There was a problem hiding this comment.
🚨 [CRITICAL] This references self.suppress_item_hover from MenuItemFields, but the new field is on SubMenu; thread the flag through the render calls or this will not compile.
| .on_click(|ctx, _, _| { | ||
| ctx.dispatch_typed_action(RepoPickerAction::AddNewRepo); | ||
| }) | ||
| .on_hover(|ctx, is_hovering, _| { |
There was a problem hiding this comment.
🚨 [CRITICAL] Hoverable::on_hover callbacks take (is_hovered, ctx, app, position), so this three-argument closure with ctx first will not compile.
…render chain - Fix on_hover callback in repo_picker.rs to use correct signature (is_hovered, ctx, app, position) - Pass suppress_item_hover flag through MenuItem::render() and MenuItemFields::render() - Update all render_submenus() calls to pass suppress_item_hover - Fixes review bot comments on PR warpdotdev#9477
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@oz-review Please re-review the latest changes (commit fa9ce15). The on_hover callback signature has been fixed and suppress_item_hover is now properly passed through the render chain. |
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @invalid-email-address on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
The cla-bot has been summoned, and re-checked this pull request! |
…render chain - Fix on_hover callback in repo_picker.rs to use correct signature (is_hovered, ctx, app, position) - Pass suppress_item_hover flag through MenuItem::render() and MenuItemFields::render() - Update all render_submenus() calls to pass suppress_item_hover - Fixes review bot comments on PR warpdotdev#9477
fa9ce15 to
d7318a9
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Ankitsongara2003 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Ankitsongara2003 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
The cla-bot has been summoned, and re-checked this pull request! |
…#9453) - Make 'Add new repo...' footer extend full width of dropdown by using Flex::row with MainAxisSize::Max - Clear repo list hover state when footer is hovered by dispatching MenuAction::ClearHover(0) to the underlying Menu - Add ClearHover action to MenuAction enum to allow clearing hovered row index from external components Fixes warpdotdev#9453
- Add suppress_item_hover flag to SubMenu - Set suppress_item_hover=true on ClearHover, clear on ClearHoverDone - Check suppress_item_hover in render to disable hover highlighting - Add ClearHoverDone action to clear the suppress flag when pointer leaves footer - Update repo_picker.rs to dispatch ClearHoverDone when footer is no longer hovered Fixes warpdotdev#9453, addresses review feedback
…render chain - Fix on_hover callback in repo_picker.rs to use correct signature (is_hovered, ctx, app, position) - Pass suppress_item_hover flag through MenuItem::render() and MenuItemFields::render() - Update all render_submenus() calls to pass suppress_item_hover - Fixes review bot comments on PR warpdotdev#9477
|
@cla-bot check |
d7318a9 to
bc263c2
Compare
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hi @ankit-songara — a reviewer requested changes on this PR and it hasn't had activity from you in 24 days. When you get a chance, please push updates or reply to the review so a reviewer can take another look. Without activity, this PR will be automatically closed after 30 days of inactivity. |
|
Hi @ankit-songara — final reminder: a reviewer requested changes on this PR and it has been inactive for 26 days. It will be automatically closed in about 4 day(s) unless you push updates or reply. Maintainers can apply the |
Fixes #9453 - Repo selector in tab config modal has incorrect hover states.
Changes Made:
app/src/menu.rs- AddedClearHover(usize)action toMenuActionenum and handling logic to clear hovered row index when footer is hovered.app/src/tab_configs/repo_picker.rs- Fixed both issues:Flex::row()withMainAxisSize::MaxMenuAction::ClearHover(0)to the underlying Menu.Testing: