Skip to content

Move inspector hints and Fallauswahl path helpers out of ContentView - #16

Merged
code4teaching merged 14 commits into
palette-viewfrom
inspector-helpers
Oct 19, 2026
Merged

code4teaching merged 14 commits into
palette-viewfrom
inspector-helpers

Conversation

@code4teaching

Copy link
Copy Markdown
Owner

Requested by Holger · project thread

Before: ContentView computed the inspector's placeholder and hint texts and searched the enclosing Fallauswahl for the add/remove case buttons itself.

After: the hint texts live in Inspector/InspectorElementHints.swift, and the Fallauswahl path search is in VisuStructCore (multiwayAncestorPath, caseIndex(of:inMultiwayAt:)) with tests. The inspector should behave exactly as before.

How: the inspector view (InspectorPanelBody) was already its own struct, so this part of step 5 moves the remaining pure logic it is fed with. An unused helper, statementIOModeIfApplicable(), is removed. Stacked on #15.

Check on Mac and iPad: placeholder and hint line in the inspector for statement (also input/output), if, while, do-while, switch, call, break; in a switch, add case and remove case, also in a nested switch.


Generated by Claude Code

- VisuStructCore: VisuStructDocumentEditing.multiwayAncestorPath and
  caseIndex(of:inMultiwayAt:), with tests.
- Inspector/InspectorElementHints.swift: line editor placeholder and
  condition hint line per element type.
- Remove the unused statementIOModeIfApplicable().

No behavior change intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cp4EQgFQyGbM8MVLiWbJKQ
@code4teaching code4teaching self-assigned this Oct 18, 2026
The four export actions in ContentView each rendered the diagram and
mapped errors themselves. Export/DiagramExporter.swift now does that;
ContentView only stores the share payloads it returns.

No behavior change intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cp4EQgFQyGbM8MVLiWbJKQ
claude and others added 12 commits October 18, 2026 22:28
- DiagramCanvasView.swift: inputs, state, layout and body, clipboard.
- DiagramCanvasDropZones.swift: drop bands, tap insert targets and
  applying drops.
- DiagramCanvasRenderer.swift: Canvas drawing of cells, lines and text.

The two new files are extensions of DiagramCanvasView, so members they
share lose their `private`. Code is moved unchanged otherwise.

No behavior change intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cp4EQgFQyGbM8MVLiWbJKQ
Carries the VoiceOver block labels from main into
DiagramCanvasDropZones.swift.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cp4EQgFQyGbM8MVLiWbJKQ
Split DiagramCanvasView into view, drop zones and renderer
Bundle PNG, file, PDF and print export in DiagramExporter
@code4teaching
code4teaching merged commit 74ec7ac into palette-view Oct 19, 2026
2 checks passed
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.

2 participants