feat: Add radial / hub-and-spoke Conceptual DSL diagram type#94
Merged
jongalloway merged 3 commits intomainfrom Mar 14, 2026
Merged
feat: Add radial / hub-and-spoke Conceptual DSL diagram type#94jongalloway merged 3 commits intomainfrom
jongalloway merged 3 commits intomainfrom
Conversation
Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jongalloway
March 14, 2026 18:06
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Conceptual DSL diagram type (diagram: radial) to DiagramForge, enabling hub-and-spoke (radial) diagrams end-to-end through parsing, layout, docs, and snapshot coverage.
Changes:
- Introduces
radialparsing (center:+items:) with validation and straight-routed spoke edges. - Implements a radial layout that positions items evenly around a circular center node with theme palette coloring.
- Adds unit tests, E2E fixtures/snapshot, and documentation updates for the new diagram type.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/DiagramForge/Parsers/Conceptual/ConceptualDslParser.cs |
Updates supported-diagram-type documentation to include radial. |
src/DiagramForge/Parsers/Conceptual/ConceptualDslParser.Dispatch.cs |
Registers the radial parser handler. |
src/DiagramForge/Parsers/Conceptual/ConceptualDslParser.Radial.cs |
Implements radial DSL parsing (center/items, validation, nodes, straight edges, metadata). |
src/DiagramForge/Layout/DefaultLayoutEngine.Conceptual.cs |
Registers the radial conceptual layout handler. |
src/DiagramForge/Layout/DefaultLayoutEngine.Radial.cs |
Implements radial node sizing/placement and palette-based styling. |
tests/DiagramForge.Tests/Parsers/ConceptualDslParserTests.cs |
Adds parser test coverage for radial parsing, metadata, routing, and validations. |
tests/DiagramForge.Tests/Layout/DefaultLayoutEngineTests.cs |
Adds layout tests for radial geometry and basic invariants. |
tests/DiagramForge.E2ETests/Fixtures/conceptual-radial.input |
Adds an E2E fixture input for the new radial diagram. |
tests/DiagramForge.E2ETests/Fixtures/conceptual-radial.expected.svg |
Adds the expected SVG snapshot output for radial rendering. |
doc/PackageReadme.md |
Updates supported-diagram list to include conceptual funnel + radial. |
README.md |
Adds radial to the gallery and documents syntax/usage in the Conceptual DSL section. |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+76
to
+80
| // Cycle through remaining palette entries for items | ||
| string itemFill = palette[(i + 1) % palette.Length]; | ||
| node.FillColor = itemFill; | ||
| node.StrokeColor = theme.NodeStrokePalette is { Count: > 0 } | ||
| ? theme.NodeStrokePalette[(i + 1) % theme.NodeStrokePalette.Count] |
Owner
|
@copilot address comments |
Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
Contributor
Author
Fixed in fa1bb13. Items now cycle over |
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.
Summary
Implements the
diagram: radialConceptual DSL type as specified in the issue. Hub-and-spoke diagrams are common in strategy and architecture presentations — a central concept surrounded by supporting pillars, capabilities, or themes.Syntax
Changes
Parser (
ConceptualDslParser.Radial.cs)center:as the hub label anditems:as the spoke listcenter:center) withradial:isCenter = truemetadataitem_0…item_N-1) withradial:itemIndexmetadataEdgeRouting.Straightspoke edges fromcenterto each itemLayout (
DefaultLayoutEngine.Radial.cs)Shape.Circle, sized to fit its labelpalette[0]; items cycle through remaining palette entriesdiagram.Titleis setTests
CanParse, nodes/labels, metadata keys, spoke edge creation, straight routing, item count validation (2/9 → error; 3/5/8 → ok), missing section errors, empty center error, CR/LF line endingsconceptual-radial.input+conceptual-radial.expected.svgDocs
README.md: gallery thumbnail, chooser table row,#### radialsyntax sectiondoc/PackageReadme.md: radial added to supported diagram listTest results
All 558 tests pass (497 unit + 61 E2E snapshots).
Security
No vulnerabilities found (CodeQL: 0 alerts).