Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@klakhov
Copy link
Contributor

@klakhov klakhov commented Nov 7, 2025

Motivation and context

Applied fix for a couple of problems that can cause actions menu for cards to open twice.
Removed wrapper over actions menu button and added explicit dispatch of right click event to context menu, with this logic we will have only one menu.

Related #9949

  1. Right click on any menu item opens second menu:
    double-menu-1
  2. Left click on 'actions' then right click on 'actions' opens second menu:
    double-menu-2

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@klakhov klakhov requested a review from bsekachev as a code owner November 7, 2025 09:23
@klakhov klakhov added the ui/ux label Nov 7, 2025
@klakhov klakhov mentioned this pull request Nov 7, 2025
6 tasks
@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.53%. Comparing base (acabee6) to head (54be62c).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9986      +/-   ##
===========================================
+ Coverage    73.45%   73.53%   +0.07%     
===========================================
  Files          427      428       +1     
  Lines        46244    46254      +10     
  Branches      4132     4133       +1     
===========================================
+ Hits         33968    34011      +43     
+ Misses       12276    12243      -33     
Components Coverage Δ
cvat-ui 77.06% <100.00%> (+0.16%) ⬆️
cvat-server 70.53% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 36 to 37
const itemRef = useRef<HTMLDivElement>(null);
const handleContextMenuClick = useContextMenuClick(itemRef);
Copy link
Member

Choose a reason for hiding this comment

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

I believe you may put useRef to useContextMenuClick to reduce duplication

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants