feat: rename TemplateDotNetLibrary to Rendering#1
Merged
Malcolmnixon merged 2 commits intoJul 1, 2026
Conversation
- Rename solution, project folders/files, and test files - Update C# namespaces from TemplateDotNetLibrary to DemaConsulting.Rendering - Rename test class TemplateDotNetLibraryTests to RenderingTests with updated method names - Rename docs directories from template-dot-net-library to rendering - Update all content references in docs, YAML, and markdown files - Update GitHub workflows, issue templates, and CI configuration - All 16 tests pass across .NET 8, 9, and 10
Copilot
AI
changed the title
[WIP] Rename items in project from TemplateDotNetLibrary to Rendering
feat: rename TemplateDotNetLibrary to Rendering
Jul 1, 2026
Malcolmnixon
marked this pull request as ready for review
July 1, 2026 17:19
Malcolmnixon
deleted the
copilot/rename-template-dot-net-library-to-rendering
branch
July 1, 2026 17:40
Malcolmnixon
pushed a commit
that referenced
this pull request
Jul 8, 2026
…match
Two related fixes for the left port's long label ("a rather long
incoming data label") in ports-showcase-horizontal.svg:
1. LayeredLayoutAlgorithm's auto-grow floor computation now adds a
further minWidth floor for nodes with a labeled port on the left or
right side: box width must be at least 2 * (widest same-side port
label width + PortLabelClearance), so ResolveMaxLabelWidth's
width/2 - clearance cap naturally ends up >= the actual label width
and never needlessly squeezes it. Combined via Math.Max with the
existing title/inset and parallel-edge label-spacing floors.
2. Reconciled a second, independent mismatch: SvgRenderer.FitTextLength
used its own cruder glyph-width heuristic (length * fontSize * 0.6)
to decide whether to emit a textLength/lengthAdjust squeeze
attribute for port labels, disagreeing with the layout engine's more
accurate PortLabelWidthEstimator measurement - so even after fix #1
grew the box enough, the SVG still emitted an inert-but-present
textLength attribute. Moved PortLabelWidthEstimator from
Rendering.Layout to Rendering.Abstractions (public, following the
NotationMetrics/BoxMetrics precedent) so Rendering.Svg can use the
same accurate measurement; FitTextLength gained a
useAccurateEstimator mode used only for the RenderPort call site,
leaving box-title/other label rendering unchanged. Skia already used
real font measurement and needed no change.
Adds tests for both fixes (auto-grow floor, no-squeeze regression, and
moved PortLabelWidthEstimator unit tests), updates ROADMAP.md and the
full reqstream/design/verification documentation set including a new
PortLabelWidthEstimator unit triad, and updates .reviewmark.yaml for
the moved files. Regenerates ports-showcase-horizontal.svg; all other
gallery examples are unaffected.
Malcolmnixon
added a commit
that referenced
this pull request
Jul 8, 2026
* Document parallel-edge, named-port, and text-measurement roadmap design Captures the design discussion for preserving parallel edges between the same node pair, adding named ports (modeled after ELK's ElkPort/ ElkConnectableShape), automatic text-measurement-based content margins, and the phased implementation plan (flat-graph phase now, hierarchy/ boundary-port phase later). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Implement Phase 1 parallel-edge and named-port support in layered algorithm Adds CoreOptions.MergeParallelEdges/AssumedFontSize/TextMeasurer, a port model (ILayoutConnectable/LayoutGraphPort) on LayoutGraphNode, ITextMeasurer with a dependency-free HeuristicTextMeasurer and a Skia-backed SkiaTextMeasurer (shared SkiaTypefaces refactor), auto-computed LayoutBox.ContentInset* margins, and CycleBreaker/LayeredLayoutAlgorithm/InterconnectionLayoutEngine support for routing, deduping, and emitting parallel edges and port labels. SvgRenderer and SkiaRasterRenderer read ContentInset* for title/compartment placement and draw each port's glyph and inward-reading label. Companion reqstream requirements, design docs, and verification docs added for every new public surface, mirroring the NodeSpacing precedent. New gallery examples (parallel-edges-merged/preserved, ports-showcase-horizontal/vertical) exercise MergeParallelEdges and all four PortSide values (split across two diagrams since PortSide is purely geometric per Direction - documented as a Phase 1 judgment call in ROADMAP.md). ROADMAP.md Phase 1 marked implemented. * docs: document parallel edges and named ports in user guide * docs: add missing SkiaTextMeasurer unit to introduction.md software structure tree * fix: add missing reviewmark path coverage for phase 1 files Adds explicit path entries to .reviewmark.yaml review-sets for files flagged as uncovered in quality-validation report (quality-parallel-edges-phase1-9f3a1c2e.md): - ITextMeasurer.cs and CoreOptionsTests.cs to Rendering-Model-Options - LayoutGraphPortTests.cs to Rendering-Model-LayoutGraph - HeuristicTextMeasurer.cs and HeuristicTextMeasurerTests.cs to Rendering-Layout-LayeredLayoutAlgorithm Metadata-only change; no source/test/doc modifications. * Remove ITextMeasurer abstraction; replace with PortLabelWidthEstimator heuristic Removes ITextMeasurer, SkiaTextMeasurer, HeuristicTextMeasurer, and CoreOptions.TextMeasurer entirely. Replaces the crude length*fontSize*0.6 estimate with a self-contained per-character Noto-Sans-approximate advance-width table (PortLabelWidthEstimator) living solely in DemaConsulting.Rendering.Layout with zero external dependencies. - Deletes ITextMeasurer.cs, SkiaTextMeasurer.cs, HeuristicTextMeasurer.cs - Adds PortLabelWidthEstimator.cs with full per-character width table - Updates LayeredLayoutAlgorithm to call PortLabelWidthEstimator directly - Moves SkiaTypefaces_Resolve_ReturnsStableDistinctTypefacesPerVariant test to new SkiaTypefacesTests.cs, now owned by the SkiaRasterRenderer unit - Adds Rendering-Skia-SkiaRasterRenderer-SharedTypefaces requirement (renamed from Rendering-Skia-SkiaTypefaces-SharedResolution) - Removes SkiaTextMeasurer wiring from gallery diagrams - Updates reqstream/design/verification docs for options, layered-layout- algorithm, and rendering-skia units; deletes the skia-text-measurer unit docs entirely - Updates ROADMAP.md and user guide wording, superseding stale sections - Updates .reviewmark.yaml: removes ITextMeasurer.cs path, renames HeuristicTextMeasurer paths to PortLabelWidthEstimator, adds SkiaTypefaces.cs/SkiaTypefacesTests.cs to SkiaRasterRenderer review set, deletes the Rendering-Skia-SkiaTextMeasurer review-set entry - Removes stale docs/reqstream/rendering-skia/skia-text-measurer.yaml reference from requirements.yaml (deviation from plan: not explicitly called out, but required for dotnet reqstream --lint to pass) Verified: dotnet build succeeds with 0 warnings/errors; Layout, Skia, and core Tests projects all pass (240+29+65 tests); Gallery ports-showcase tests pass; dotnet reqstream --lint and dotnet reviewmark --lint both pass clean. * Fix 4 gallery-reported issues in parallel-edges/named-ports feature 1. Merged-edge midpoint label is now always omitted (never a first-survivor label) when 2+ raw parallel edges collapse into one rendered line via CoreOptions.MergeParallelEdges. 2. Connector labels nudged by ConnectorLabelPlacer can no longer be clipped off-canvas: SvgRenderer/SkiaRasterRenderer now expand the rendered canvas to include every placed label's full bounding box. 3. Box titles now center on the ContentInset-adjusted content area instead of the box's full geometric width, in both renderers. 4. Port labels are squeezed to fit within roughly half the box's inner width so a long label on one side can no longer overlap the opposite side's label. 5. Box Width/Height now auto-grow (never shrink below caller-supplied) to comfortably fit the title plus reserved ContentInset margins, integrated with layer packing so growth never causes sibling overlap. Updates ROADMAP.md, design/reqstream/verification docs, and the user guide to reflect the corrected behavior, adds regression tests for all five fixes, and regenerates the affected gallery artifacts (parallel-edges-merged/preserved, ports-showcase-horizontal/vertical, gallery README). * Fix 3 gallery regressions in parallel-edges/named-ports feature 1. Parallel-edge labels no longer displaced from their own connector lines: LayeredLayoutAlgorithm now widens lane spacing for labeled parallel edges to at least the label bounding-box height, so ConnectorLabelPlacer's first (no-nudge) placement succeeds for every label instead of relying on its generic perpendicular-nudge fallback. ConnectorLabelPlacer's core collision/nudge logic is unchanged; only an additive EstimateLabelHeight helper was added. 2. Reverted the previous round's inset-aware box title centering: Hub and other box titles are back to full geometric box-center (box.X + box.Width/2.0) with LabelPadding-only available width for squeeze, since titles and left/right port labels never share a vertical band and never needed to dodge each other sideways. ContentInsetTop handling for title Y position is unchanged. 3. Port glyph squares now get a theme.BackgroundColor outline stroke so they remain visually distinguishable from the overlapping connector arrowhead, which is otherwise completely unchanged. Updates ROADMAP.md, design/reqstream/verification docs, and tests (added/renamed/removed) to match, and regenerates the affected gallery artifacts (parallel-edges-preserved, ports-showcase-horizontal/vertical). * Fix vertical-flow gap in parallel-edge lane-spacing auto-grow The previous round's lane-spacing fix (0842ae1) widened parallel-edge spacing to fit label bounding-box height and correctly grew box HEIGHT to accommodate it, but only for horizontal-flow diagrams (Left/Right box faces, where PortDistributor spreads anchors vertically). It did not handle vertical-flow diagrams (Top/Bottom faces, e.g. Direction.Down), where PortDistributor spreads anchors horizontally and box WIDTH needs to grow instead, compared against label width rather than height. - ConnectorLabelPlacer gains a new EstimateLabelWidth helper mirroring the existing EstimateLabelHeight (purely additive). - LayeredLayoutAlgorithm's auto-grow floor computation now branches by PortSide: Left/Right faces still grow minHeight exactly as before (unchanged), Top/Bottom faces now grow minWidth using the new helper. - Adds a new gallery example (parallel-edges-preserved-vertical) exercising 3+ parallel labeled edges in a Direction.Down diagram, verified to show box width auto-growing and all labels landing on their own line with zero displacement. - No regression to the existing horizontal parallel-edges-preserved.svg gallery output (byte-identical). Updates ROADMAP.md, design/reqstream/verification docs, and the user guide to describe the axis-aware auto-grow behavior, and adds tests for both the new helper and the Direction.Down auto-grow path. * Fix port-label auto-grow floor and render-time textLength squeeze mismatch Two related fixes for the left port's long label ("a rather long incoming data label") in ports-showcase-horizontal.svg: 1. LayeredLayoutAlgorithm's auto-grow floor computation now adds a further minWidth floor for nodes with a labeled port on the left or right side: box width must be at least 2 * (widest same-side port label width + PortLabelClearance), so ResolveMaxLabelWidth's width/2 - clearance cap naturally ends up >= the actual label width and never needlessly squeezes it. Combined via Math.Max with the existing title/inset and parallel-edge label-spacing floors. 2. Reconciled a second, independent mismatch: SvgRenderer.FitTextLength used its own cruder glyph-width heuristic (length * fontSize * 0.6) to decide whether to emit a textLength/lengthAdjust squeeze attribute for port labels, disagreeing with the layout engine's more accurate PortLabelWidthEstimator measurement - so even after fix #1 grew the box enough, the SVG still emitted an inert-but-present textLength attribute. Moved PortLabelWidthEstimator from Rendering.Layout to Rendering.Abstractions (public, following the NotationMetrics/BoxMetrics precedent) so Rendering.Svg can use the same accurate measurement; FitTextLength gained a useAccurateEstimator mode used only for the RenderPort call site, leaving box-title/other label rendering unchanged. Skia already used real font measurement and needed no change. Adds tests for both fixes (auto-grow floor, no-squeeze regression, and moved PortLabelWidthEstimator unit tests), updates ROADMAP.md and the full reqstream/design/verification documentation set including a new PortLabelWidthEstimator unit triad, and updates .reviewmark.yaml for the moved files. Regenerates ports-showcase-horizontal.svg; all other gallery examples are unaffected. --------- Co-authored-by: Malcolm Nixon <Malcolm.Nixon@hiarc.inc> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Pull Request
Description
Renames all project items from
TemplateDotNetLibrarytoRenderingthroughout the repository.Files/Folders Renamed
TemplateDotNetLibrary.slnx→Rendering.slnxsrc/DemaConsulting.TemplateDotNetLibrary/→src/DemaConsulting.Rendering/(including.csproj)test/DemaConsulting.TemplateDotNetLibrary.Tests/→test/DemaConsulting.Rendering.Tests/(including.csproj)test/.../TemplateDotNetLibraryTests.cs→test/.../RenderingTests.csdocs/{design,reqstream,verification}/template-dot-net-library/→.../rendering/(including inner filenames)Content Updated
TemplateDotNetLibrary→DemaConsulting.Renderingacross all source and test filesTemplateDotNetLibraryTests→RenderingTests;TemplateDotNetLibrary_*method prefix →Rendering_*TemplateDotNetLibrary→DemaConsulting.Rendering.reviewmark.yaml(review IDs, paths, evidence URL),.fileassert.yaml(PDF filenames),requirements.yaml(includes)build.yamlSonarCloud project key, artifact paths, PDF output namestitle.txt,introduction.md, design, verification, and user guide filesREADME.md,CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md, issue templatesType of Change
Related Issues
Pre-Submission Checklist
Build and Test
pwsh ./build.ps1Code Quality
Quality Checks
pwsh ./lint.ps1Testing
Documentation
Additional Notes
Test method names in
RenderingTests.cswere updated fromTemplateDotNetLibrary_*toRendering_*— the reqstream YAML files referencing those test names have been updated accordingly to keep traceability intact.Original prompt