The JavaScript code in _register_shortcut_callback() has become quite complex and may require refactoring.
Issue:
• The callback currently appears untested and may not function as intended.
• The logic includes conditional behavior based on whether the annotation tab is selected, which could be a source of complexity.
Open Questions:
• Is the conditional check necessary, given that the callback is defined within the annotation_tab_controller? Is that controller only active when the annotation tab is selected?
• Would it be cleaner to move the eventListener to the video_mode_component and forward relevant events to the annotation tab when needed?
Suggested Action:
• Reevaluate whether the conditional logic is needed.
• Consider simplifying the architecture by centralizing key event handling in video_mode_component if it improves clarity or maintainability.
Raised by @domess
The JavaScript code in _register_shortcut_callback() has become quite complex and may require refactoring.
Issue:
• The callback currently appears untested and may not function as intended.
• The logic includes conditional behavior based on whether the annotation tab is selected, which could be a source of complexity.
Open Questions:
• Is the conditional check necessary, given that the callback is defined within the annotation_tab_controller? Is that controller only active when the annotation tab is selected?
• Would it be cleaner to move the eventListener to the video_mode_component and forward relevant events to the annotation tab when needed?
Suggested Action:
• Reevaluate whether the conditional logic is needed.
• Consider simplifying the architecture by centralizing key event handling in video_mode_component if it improves clarity or maintainability.
Raised by @domess