feat(silo): replace modal new-item dialog with MDI pre-document tab #176

Merged
forbes merged 1 commits from feat/editing-context-system into main 2026-02-11 21:51:08 +00:00
Owner

Summary

Converts the modal Silo_New dialog into a non-blocking MDI tab that lives alongside document tabs in the viewport. Each Ctrl+N invocation opens a new "pre-document" tab. On successful item creation, the tab closes and the real document opens in its place.

Changes

mods/silo/freecad/schema_form.py

  • Extracted SchemaFormWidget(QWidget) from SchemaFormDialog — a plain widget with item_created/cancelled signals that can be embedded in any container
  • SchemaFormDialog preserved as a thin modal wrapper for backward compatibility (exec_and_create() still works)
  • Errors shown inline instead of modal QMessageBox
  • Live window title updates from part number preview (propagates to MDI tab label)

mods/silo/freecad/silo_commands.py

  • Silo_New.Activated() now creates a SchemaFormWidget and adds it as an MDI subwindow (follows the _SiloStartCommand pattern from silo_start.py)
  • Multiple pre-document tabs can coexist
  • Selection is read at creation time (when Create is clicked), not when the tab opens
  • No more blocking QMessageBox for success/error

Behavior

  1. Ctrl+N opens a new "New Item" tab in the MDI tab bar
  2. Tab title updates live as category is selected (e.g. "New: F01-2024-0042")
  3. Clicking Create calls the API, closes the tab, and opens the real document
  4. Clicking Cancel closes the tab
  5. Multiple tabs can be open simultaneously
## Summary Converts the modal `Silo_New` dialog into a non-blocking MDI tab that lives alongside document tabs in the viewport. Each Ctrl+N invocation opens a new "pre-document" tab. On successful item creation, the tab closes and the real document opens in its place. ## Changes ### `mods/silo/freecad/schema_form.py` - Extracted `SchemaFormWidget(QWidget)` from `SchemaFormDialog` — a plain widget with `item_created`/`cancelled` signals that can be embedded in any container - `SchemaFormDialog` preserved as a thin modal wrapper for backward compatibility (`exec_and_create()` still works) - Errors shown inline instead of modal `QMessageBox` - Live window title updates from part number preview (propagates to MDI tab label) ### `mods/silo/freecad/silo_commands.py` - `Silo_New.Activated()` now creates a `SchemaFormWidget` and adds it as an MDI subwindow (follows the `_SiloStartCommand` pattern from `silo_start.py`) - Multiple pre-document tabs can coexist - Selection is read at creation time (when Create is clicked), not when the tab opens - No more blocking `QMessageBox` for success/error ## Behavior 1. Ctrl+N opens a new "New Item" tab in the MDI tab bar 2. Tab title updates live as category is selected (e.g. "New: F01-2024-0042") 3. Clicking Create calls the API, closes the tab, and opens the real document 4. Clicking Cancel closes the tab 5. Multiple tabs can be open simultaneously
forbes added 1 commit 2026-02-11 21:15:50 +00:00
feat(silo): replace modal new-item dialog with MDI pre-document tab
Some checks failed
Build and Test / build (pull_request) Failing after 15m49s
70118201b0
Update silo submodule to include the new pre-document tab for item
creation.  Silo_New now opens an MDI tab instead of a blocking modal
dialog, allowing multiple items to be prepared in parallel.
forbes merged commit 056c8fe129 into main 2026-02-11 21:51:08 +00:00
forbes deleted branch feat/editing-context-system 2026-02-11 21:51:09 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#176