Skip to content

Edit sections and flows on double click in WebUI - #853

Merged
briemla merged 4 commits into
mainfrom
webui/07-table-double-click
Oct 15, 2026
Merged

briemla merged 4 commits into
mainfrom
webui/07-table-double-click

Conversation

@briemla

@briemla briemla commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

OP#10518

Problem

In the customtkinter GUI, double-clicking a section or flow opens its properties dialog (frame_sections.py / frame_flows.py, _on_double_click -> ViewModel.edit_selected_section_metadata() / edit_selected_flow()). The WebUI section and flow tables did not support this.

Solution

  • CustomTable (nicegui/elements/table.py) accepts an optional on_row_double_click_method, registered on Quasar's rowDblclick event. The handler is called with the double-clicked row and may be sync or async. Row extraction is shared with the existing row click handling.
  • SectionsForm and FlowForm use it: a double click selects the row (via set_selected_section_ids / set_selected_flow_ids, as for a single click) and then opens the properties dialog.
  • While a form is disabled because of a running action (disable()/enable()), double clicks are ignored.
  • FlowForm._select_flow is now annotated with the list of rows it actually receives (needed for mypy).

Tests

  • New: tests/unit/OTAnalytics/plugin_ui/nicegui_gui/nicegui/elements/test_table.py (async handler gets the row, sync handler works, no handler does not raise).
  • New: tests/unit/OTAnalytics/plugin_ui/nicegui_gui/pages/sections_and_flow_form/test_sections_form.py and test_flow_form.py (double click -> selection set -> edit method awaited; ignored while disabled; works again after enable).
  • Test helper tests/utils/nicegui_table.py simulates rowDblclick with row arguments, because User.trigger sends no arguments.
  • pytest tests/unit/OTAnalytics/plugin_ui: 223 passed, 5 skipped.
  • pre-commit run --all-files: black, isort, flake8 and mypy pass. end-of-file-fixer (a test data .otflow file), update-mypy-dependencies and shellcheck (start_gui.sh, no .venv in the worktree) report issues in files this PR does not touch. Those changes were not included.

🤖 Generated with Claude Code

briemla and others added 4 commits October 13, 2026 13:41
CustomTable accepts an optional on_row_double_click_method that is called
with the double-clicked row on Quasar's rowDblclick event. Synchronous and
asynchronous handlers are supported. Row extraction is shared with the
existing row click handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Double-clicking a section in the section table selects it and opens the
properties dialog, as in the customtkinter GUI. Double clicks are ignored
while the form is disabled during a running action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Double-clicking a flow in the flow table selects it and opens the
properties dialog, as in the customtkinter GUI. Double clicks are ignored
while the form is disabled during a running action. The selection handler
is annotated with the list of rows it actually receives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@briemla
briemla enabled auto-merge October 15, 2026 07:23
@briemla
briemla requested a review from schubsen October 15, 2026 07:24
@briemla
briemla merged commit 649801e into main Oct 15, 2026
15 checks passed
@briemla
briemla deleted the webui/07-table-double-click branch October 15, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants