feat: SVG renderer for worksheet visual output#27
Merged
Conversation
Nebu1eto
commented
Feb 10, 2026
Nebu1eto
left a comment
Owner
Author
There was a problem hiding this comment.
Review finding (blocking): RGB values that already include a leading # can become invalid ##RRGGBB in SVG output.
Relevant path: crates/sheetkit-core/src/render.rs (style_color_to_hex). Combined with accepted inputs in packages/sheetkit/src/conversions.rs (parse_style_color accepts #RRGGBB), this can generate invalid color attributes.
Please normalize colors before rendering (strip leading # or handle it explicitly).
Nebu1eto
commented
Feb 10, 2026
Nebu1eto
left a comment
Owner
Author
There was a problem hiding this comment.
Detailed review notes (blocking):
Renderer foundation is solid, but there is an SVG color correctness bug.
Blocking concern:
parse_style_coloraccepts#RRGGBBinput, whilestyle_color_to_hexblindly prepends#.- This can emit invalid values like
##RRGGBBin SVG attributes.
Relevant areas:
crates/sheetkit-core/src/render.rs(style_color_to_hex)packages/sheetkit/src/conversions.rs(parse_style_color)
Additional issues worth fixing in this PR:
- If both underline and strikethrough are true,
text-decorationis emitted twice; output should be merged into one valid value. - Validate
scale > 0to avoid invalid/negative dimensions.
Please add direct tests for these rendering edge cases.
Implement render module that generates SVG from worksheet data including cell values, column widths, row heights, cell styles (fonts, fills, borders, alignment), gridlines, and row/column headers. Expose via Workbook.renderToSvg() in both Rust and Node.js APIs. - 29 Rust unit tests covering all rendering features - 12 Node.js integration tests for the renderToSvg binding - Fix parse_style_color to accept raw ARGB/RGB hex strings - EN/KO rendering guide documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nebu1eto
force-pushed
the
dev/phase-d-renderer
branch
from
February 10, 2026 08:47
849a9f3 to
b90ffa1
Compare
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
rendermodule insheetkit-corethat generates SVG from worksheet data (cell values, column widths, row heights, fonts, fills, borders, alignment, gridlines, headers)Workbook.renderToSvg()method in both Rust facade and Node.js (napi-rs + TypeScript wrapper)parse_style_colorin napi conversions to accept raw ARGB/RGB hex strings (e.g."FFFFFF00")Test plan
cargo build --workspacepassescargo test --workspacepasses (1300+ tests)cargo clippy --workspacepasses (no warnings)cargo fmt --checkpassespnpm buildpasses (napi + typecheck + tsdown)pnpm testpasses (265 tests)Generated with Claude Code