ICRAR / EAGLE

Editor for the Astronomical Graph Language Environment
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Eagle 1286 #736

Closed M-Wicenec closed 2 months ago

M-Wicenec commented 2 months ago

Summary by Sourcery

Enhance the right-click context menu navigation by updating the keyboard event handling logic to better manage focus and scrolling for menu items, including handling sub-menus and search results.

Enhancements:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request implements significant improvements to the keyboard navigation and visual presentation of the right-click context menu in the application. The changes focus on enhancing user experience by providing more intuitive navigation, better handling of edge cases, and improved visual feedback.

File-Level Changes

Change Details Files
Refactored and enhanced keyboard navigation for the right-click context menu
  • Improved handling of ArrowUp and ArrowDown key events
  • Added support for navigating through sub-menus
  • Implemented cycling through menu items when reaching the end of the list
  • Added logic to skip over header (h5) elements during navigation
  • Improved focus management for different menu states (with/without search)
  • Added scrolling functionality to keep the focused item in view
src/RightClick.ts
Enhanced visual presentation of the context menu
  • Added max-height and overflow-y properties to the search results container
  • Styled the scrollbar track for the search results
static/base.css

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.