Repository navigation
[codex] Preserve visual styles on text shapes - #16
Conversation
Visual PR DiffCompared Renderer Change Ranking
Most Regressed Vs Office Reference
Most Improved Vs Office Reference
Preview Slidesnested-groups slide 1
group-transform slide 1
Artifacts include HTML side-by-side reports under |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81d9bb121e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (frame.strokeWidth && frame.strokeWidth > 0) { | ||
| element.style.borderWidth = `${frame.strokeWidth * scale}px`; | ||
| element.style.borderStyle = frame.strokeDash || "solid"; | ||
| element.style.borderColor = frame.strokeColor || "#000"; | ||
| } |
There was a problem hiding this comment.
Skip fallback border color for noFill text frames
When a text-bearing shape has an explicit line with <noFill/>, parseTextShapeFrame can still pass a positive strokeWidth but no strokeColor. This branch then renders a visible border using #000, so “no outline” shapes become black-outlined after this change. The issue reproduces on any text shape whose OOXML includes <a:ln w="..."><a:noFill/></a:ln>, and it is introduced by the new frame rendering path for text elements.
Useful? React with 👍 / 👎.






Summary
Why
Renderable text shapes in PPTX can carry both text content and visual shape styling. The parser previously returned a plain text element as soon as it found text, which meant those shapes lost their fill, stroke, and corner styling during rendering.
Impact
This improves fidelity for common business-slide text boxes without changing the public
ShapeElementmodel or broadening scope into table/theme follow-up work.Validation
pnpm run fixtures:generatepnpm run verifypnpm run pack:checkpnpm run test:browserPPTX_VISUAL_CASES=text-insets-anchor pnpm run test:visualNotes
The targeted
text-insets-anchorvisual metric only moved slightly, so the larger remaining gap looks more related to theme/color behavior than the old unstyled-text-shape bug itself.