Repository navigation
Bundle PNG, file, PDF and print export in DiagramExporter - #17
Merged
Merged
Conversation
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
- 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
code4teaching
marked this pull request as ready for review
October 18, 2026 22:28
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Holger · project thread
Before: ContentView had four export functions (PNG, document file, PDF, print), three of which repeated the same render call and error handling.
After:
Export/DiagramExporter.swiftdoes the rendering, temporary files, printing and error messages. ContentView only puts the result into the share sheet or the PDF preview. Export should behave exactly as before.How:
DiagramExporteris a small value built from the document, size class, canvas scale, language and display scale, withsetErrorfor messages. It sits next to the existingDiagramSnapshotExportandDiagramExportFilenamein Export/. Step 6 of the plan; stacked on #16.Check on Mac and iPad: share PNG, share document, export PDF (preview opens), print; an empty or tiny diagram shows the "too small" message.
Generated by Claude Code