Skip to content

Convert Custom View Builder to modal dialog and improve UX - #7

Merged
Malcolmnixon merged 2 commits into
mainfrom
feature/view-builder-dialog
Jul 20, 2026
Merged

Convert Custom View Builder to modal dialog and improve UX#7
Malcolmnixon merged 2 commits into
mainfrom
feature/view-builder-dialog

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request updates the documentation to reflect the migration of the custom view builder from a docked panel to a new modal dialog (ViewBuilderDialog) in the SysML2Workbench AppShellSubsystem. It introduces a new design document for ViewBuilderDialog, updates integration and UI composition details, and removes references to the now-deleted docked custom view builder panel throughout the docs. The changes clarify the dialog's role, data flow, error handling, and integration with the shell, ensuring consistency across the design documentation.

Major documentation updates:

Introduction of ViewBuilderDialog:

  • Added a new design document view-builder-dialog.md detailing the purpose, data model, methods, error handling, and dependencies of ViewBuilderDialog, which replaces the docked custom view builder panel.
  • Registered the new review unit for ViewBuilderDialog in .reviewmark.yaml, including all relevant source, view, and test files.

UI and Dock Layout Changes:

  • Updated the dock layout documentation to remove references to the docked custom view builder panel, clarifying that only three tool panels remain docked and that ViewBuilderDialog is a modal dialog, not part of the persistent Dock layout. [1] [2] [3] [4] [5] [6]
  • Updated UI composition and MVVM documentation to reference ViewBuilderDialogViewModel instead of the deleted CustomViewBuilderToolViewModel. [1] [2]

Integration and Behavior Updates:

  • Documented how the dialog is opened from the View menu, how it manages its own state, and its interaction with the shell for preview and commit actions. [1] [2]
  • Clarified the single code path for SysML snippet generation and clipboard actions, now routed through the diagram tab context menu and no longer through the deleted panel. [1] [2]

Consistency and Error Handling:

  • Described how the dialog handles empty workspace states and error reporting, ensuring the user experience is consistent and recoverable. [1] [2]

These changes ensure the documentation accurately reflects the current architecture and user flow, focusing on the new ViewBuilderDialog and its integration into the AppShellSubsystem.

Malcolm Nixon added 2 commits July 20, 2026 00:35
- Add ViewBuilderDialogViewModel/View replacing CustomViewBuilderToolViewModel/View
- Add MainWindowShell.RenderCustomViewPreview for side-effect-free live preview
- Remove docked panel from WorkbenchDockFactory and View menu; wire new
  'Custom View Builder...' dialog menu item in MainWindowView
- OK commits a brand-new diagram tab via OpenNewCustomPreviewTab +
  PreviewCustomView with rollback-on-failure; Cancel has zero side effects
- Update tests: new ViewBuilderDialogViewModelTests, MainWindowShellTests,
  DockTests (three-panel layout), AvaloniaTests
- Update design/reqstream/verification docs and SysML2 model for the new
  ViewBuilderDialog unit; update .reviewmark.yaml and user guide
…clear, centered button text

- Add a draggable GridSplitter between the preview pane and tabs in
  ViewBuilderDialogView, with MinWidth guards on both sides.
- Add SvgCanvasHost.Clear() to reset SVG/zoom/pan, and call it from
  ViewBuilderDialogViewModel.RenderPreview's catch block so an invalid
  definition immediately blanks the stale preview instead of leaving the
  last valid render visible.
- Add HorizontalContentAlignment="Center" to the OK/Cancel buttons in
  ViewBuilderDialogView and the OK button in AboutDialogView so button text
  is centered instead of left-aligned.
- Add unit tests for SvgCanvasHost.Clear and for the stale-preview-clears-
  on-invalid-edit scenario, and update the corresponding reqstream/design/
  verification docs.
@Malcolmnixon
Malcolmnixon merged commit e6e86cb into main Jul 20, 2026
6 checks passed
@Malcolmnixon
Malcolmnixon deleted the feature/view-builder-dialog branch July 20, 2026 10:43
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.

1 participant