Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
0d2f658 to
5a352fb
Compare
c177449 to
f37acec
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a guided tour feature to the main BEC application, enabling interactive UI walkthroughs. The implementation extends the GuidedTour class to support QRect objects in addition to QWidget and QAction, which is necessary for highlighting specific regions of complex widgets like QTableWidget headers. The tour system registers UI components from various views and provides navigation controls with forward/backward functionality.
Changes:
- Extended
GuidedTour.register_widget()to acceptQRectparameters for highlighting arbitrary screen regions - Added
ViewTourStepsmodel to structure tour step information from views - Integrated guided tour initialization and menu actions in
BECMainApp - Implemented tour step registration in
DeviceManagerView,DeveloperView, andBECDockArea - Added ESC key shortcut to close tours and improved button state management
- Enhanced navigation to skip invalid/invisible tour steps in both forward and backward directions
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
bec_widgets/utils/guided_tour.py |
Core guided tour functionality: added QRect support, direction-aware navigation, QMenu support in action highlighting, Escape key shortcut, and QTableWidgetItem handling |
bec_widgets/applications/views/view.py |
Added ViewTourSteps model and register_tour_steps() base method for view tour registration |
bec_widgets/applications/views/device_manager_view/device_manager_view.py |
Implemented tour steps for device manager including table headers and state-dependent steps |
bec_widgets/applications/views/developer_view/developer_view.py |
Implemented tour steps for IDE components (toolbar, explorer, editor, console, plotting area) |
bec_widgets/widgets/containers/dock_area/dock_area.py |
Added tour step registration for dock area toolbar |
bec_widgets/applications/main_app.py |
Integrated guided tour system: initialization, setup, menu integration with F1 shortcut |
tests/unit_tests/test_guided_tour.py |
Added tests for invalid step handling, QRect support, and direction parameter |
tests/unit_tests/test_main_app.py |
Added comprehensive tests for tour initialization, registration, and start/stop functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR adds a guided tour to the main app. It extends the guided_tour to also support
QRectto be passed to theregister_widgetmethod. This is needed to support Tour on for example QTableWidgets, which are essentially very big paintEvents, and information about positioning of sub-widgets may be unlinked from positions in the table ( QHeaderView is one example).Currently, the guided tour works with stateless widgets, thus, if a widget is stateful tour steps may be skipped. In the future, we would like to implement on_enter and on_exit hooks for the tour to make it more flexible. (#1050)
Definition of Done