Skip to content

Conversation

@myabc
Copy link
Contributor

@myabc myabc commented Nov 4, 2025

Ensure menu positioning is complete. Make focus take place after next repaint.

Ticket

What are you trying to accomplish?

Screenshots

What approach did you choose and why?

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@myabc myabc requested a review from Copilot November 4, 2025 14:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the context menu opening flow to use promises and proper async handling instead of setTimeout. The changes improve timing control and prevent race conditions when menus are opened in rapid succession.

Key Changes

  • Replaced setTimeout with promise-based async flow using requestAnimationFrame for better DOM/style synchronization
  • Added sequence tracking (openSeq) to prevent race conditions when multiple menus are opened rapidly
  • Made reposition() return a Promise<void> for proper async chaining

@myabc myabc force-pushed the code-maintenance/rid-jquery-fix-content-menus branch from f02fe71 to f181589 Compare November 4, 2025 17:11
@myabc myabc requested a review from Copilot November 4, 2025 17:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

frontend/src/app/shared/components/op-context-menu/op-context-menu.service.ts:156

  • The reposition() method sets visibility: 'visible' on line 156, but the show() method also sets visibility: 'visible' on line 107. This creates redundant visibility toggling. Since show() now manages visibility explicitly, remove the visibility style from reposition() to avoid conflicts and maintain single responsibility.
          visibility: 'visible'

Ensure menu positioning is complete. Make focus take place after next
repaint.
@myabc myabc force-pushed the code-maintenance/rid-jquery-fix-content-menus branch from f181589 to f50eb5a Compare November 4, 2025 17:31
@myabc myabc marked this pull request as ready for review November 4, 2025 17:53
@myabc myabc merged commit 93f508e into code-maintenance/rid-jquery Nov 4, 2025
13 checks passed
@myabc myabc deleted the code-maintenance/rid-jquery-fix-content-menus branch November 4, 2025 17:53
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants