Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Mermaid xychart-beta series fill colors to better match the Prism theme’s “border-carries-emphasis” style by deriving series colors from the theme’s effective palette (gradient-stop-derived for Prism) and blending them toward the background for readability, while leaving non-Prism themes on the existing accent-driven ladder.
Changes:
- Adjust
SvgRenderSupport.GetXyChartSeriesColor()to useThemePaletteResolver.ResolveEffectivePalette(...)for Prism-like themes (monochromeNodePalette+ multi-stopBorderGradientStops), then soften fills via blending. - Add a focused unit test asserting Prism xychart series colors come from the softened effective palette (and not the prior accent ladder).
- Add a Prism xychart E2E fixture + snapshot baseline to lock in the rendered SVG output.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/DiagramForge/Rendering/SvgRenderSupport.cs | Switches Prism-like xychart series fills to a softened effective-palette strategy; keeps legacy accent ladder otherwise. |
| tests/DiagramForge.Tests/DiagramRendererTests.cs | Adds a renderer test validating Prism xychart series colors use softened effective palette colors rather than accent-ladder colors. |
| tests/DiagramForge.E2ETests/Fixtures/mermaid-xychart-prism.input | New Prism-themed Mermaid xychart fixture input for snapshot coverage. |
| tests/DiagramForge.E2ETests/Fixtures/mermaid-xychart-prism.expected.svg | New snapshot baseline capturing the expected Prism xychart rendering with the updated series fill colors. |
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.
Closes #143.
Summary
NodePaletteand multi-stopBorderGradientStopsThemePaletteResolver.ResolveEffectivePalette(...)and soften them toward the background so bars stay readable without taking on the old vivid solid-blue lookValidation
dotnet test tests/DiagramForge.Tests/DiagramForge.Tests.csproj -c Release --filter "FullyQualifiedName~Render_XyChart_WithPrism_UsesSoftenedBorderGradientSeriesColors"dotnet test tests/DiagramForge.E2ETests/DiagramForge.E2ETests.csproj -c ReleaseNotes
This implements the middle-ground approach from the issue: Prism bars use lighter, softened series colors derived from the theme's border-gradient palette rather than staying fully white or using the previous accent-only ladder.