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

[ui] GraphEditor: Address Key Event Conflicts in Node Menu #2622

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

waaake
Copy link
Contributor

@waaake waaake commented Dec 19, 2024

Description

This PR addresses the Key Handling issue in the Node Creation Menu within the GraphEditor.
The changes ensure that the Enter and Return key events are correctly captured and handled by the Item first and then forwarded to the specified Item i.e. SearchBar.textField.

Details

Default priority ordering is Keys.BeforeItem and has the key event processing as:
1. Items specified in forwardTo
2. Specific key handlers, e.g. onReturnPressed, onPressed, onReleased handlers
3. Item specific key handling (Key handling of the parent item)

Keys.AfterItem has the key event processing as:
1. Item specific key handling (Key handling of the parent item)
2.  Items specified in forwardTo
3. Specific key handlers, e.g. onReturnPressed, onPressed, onReleased handlers

Thus, Keys.AfterItem as the priority ensures the Item's own key events are handled before Forwarding it to specified items. This handles all defined Enter and Return key presses and is more suitable for our use-case here.

Keys.AfterItem as the priority ensures the Item's own key events are handled before Forwarding it to specified items. This handles all defined Enter and Return key presses
@waaake waaake requested review from yann-lty and cbentejac December 19, 2024 05:18
@waaake waaake self-assigned this Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.90%. Comparing base (6e99f9d) to head (b31da19).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2622   +/-   ##
========================================
  Coverage    69.90%   69.90%           
========================================
  Files          121      121           
  Lines         7078     7078           
========================================
  Hits          4948     4948           
  Misses        2130     2130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Dec 19, 2024
@cbentejac cbentejac merged commit aeb77d8 into develop Dec 19, 2024
5 checks passed
@cbentejac cbentejac deleted the fix/NodeMenuKeys branch December 19, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants