Skip to content
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

CNV-54208: The dropdown menu of "Actions" is not closed by clicking somewhere else #2332

Conversation

avivtur
Copy link
Member

@avivtur avivtur commented Dec 25, 2024

📝 Description

This regression was introduced when we changed the actions dropdown to a Popper component that needs to add an effect to make this behavior happen (which comes out of the box when using Select component with onOpenChange prop).
Enhancing the useClickOutside hook that we already have for this cases to get more than one ref (the menu and the toggle components refs) to solve this issue.

🎥 Demo

Before:

actions-dropdown-doesnt-close-when-clicking-outside.mp4

After:

actions-dropdown-doesnt-close-when-clicking-outside-after.mp4

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Dec 25, 2024

@avivtur: This pull request references CNV-54208 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

📝 Description

This regression was introduced when we changed the actions dropdown to a Popper component that needs to add an effect to make this behavior happen (which comes out of the box when using Select component with onOpenChange prop).
Enhancing the useClickOutside hook that we already have for this cases to get more than one ref (the menu and the toggle components refs) to solve this issue.

🎥 Demo

Before:

actions-dropdown-doesnt-close-when-clicking-outside.mp4

After:

actions-dropdown-doesnt-close-when-clicking-outside-after.mp4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from metalice and pcbailey December 25, 2024 10:03
@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Dec 25, 2024
@avivtur avivtur force-pushed the action-dropdown-doesnt-close-click-outside branch 2 times, most recently from 3d5ed64 to de9230f Compare December 31, 2024 11:41
.gitignore Outdated
*.json-*
.codegpt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@avivtur avivtur force-pushed the action-dropdown-doesnt-close-click-outside branch from de9230f to e6ebc76 Compare December 31, 2024 12:44
@avivtur avivtur force-pushed the action-dropdown-doesnt-close-click-outside branch from e6ebc76 to 101f9a0 Compare December 31, 2024 12:45
@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Dec 31, 2024
Copy link
Contributor

openshift-ci bot commented Dec 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avivtur, metalice

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit acdac42 into kubevirt-ui:main Dec 31, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue is something we want to fix jira/valid-reference lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants