Skip to content

fix(pptx): import-fidelity fixes for brand-template decks - #79

Closed
karthikmudunuri wants to merge 1 commit into
mainfrom
karthikmudunuri/run-dev-server-v1
Closed

karthikmudunuri wants to merge 1 commit into
mainfrom
karthikmudunuri/run-dev-server-v1

Conversation

@karthikmudunuri

Copy link
Copy Markdown
Member

Summary

Seven independent PPTX import-fidelity fixes, each found by diffing a real brand-template deck against PowerPoint's render. Every fix ships with its own changeset (all patch) and a focused regression test.

# Fix Symptom it cures
1 grpFill inheritance Shapes using <a:grpFill/> collapsed to transparent — decorative custGeom line-art vanished. Now inherit the enclosing group's fill.
2 gradient text Runs with <a:gradFill> resolved to black and disappeared on dark slides. Now render as a CSS gradient via background-clip: text; edited runs degrade to a representative stop on export.
3 underlay z-order Layout/master decorations were emitted grouped by tag, so an opaque full-slide background <p:pic> painted over the gradient and washed out the slide. Now emitted in document order.
4 flowChartTerminator The pill-shaped "Learn More" button imported as a sharp rect. Now a rounded pill (radius = min(w,h)/2).
5 font weights Google Fonts loaded only weight 400, so bold titles rendered thin. Now requests the deck's actual weights (family=Name:wght@400;700).
6 shape drop shadows <a:outerShdw> was never parsed, so white cards on a white slide became invisible. Now parsed into ShadowSpec for shapes and card-backed text.
7 fontRef text colour An uncoloured run ignored the shape's <p:style><a:fontRef> colour and fell back to dark — a white-on-card label (lt1) showed as stray dark text. Now inherits the fontRef colour (non-placeholder shapes outrank the master default).

Files

  • lib/pptx/pptxToDeck.ts — import logic for 1, 2, 3, 4, 6, 7
  • components/editor/ElementView.tsx — gradient-text rendering (2), card box-shadow (6)
  • lib/pptx/deckToPptx.ts — gradient-text export degradation (2)
  • lib/fonts.ts + compound/SlidewiseRoot.tsx — weight-aware Google Fonts request (5)

Testing

  • New regression tests: grpfill, gradient-text, gradient-text-export, underlay-zorder, flowchart-terminator, font-weights, shape-shadow, fontref-color.
  • Full suite: 110 passed, 9 skipped; tsc typecheck clean.
  • Round-trip verified (import → export → re-import) for fixes 1–3 on their source decks; shadows/gradients also survive via the existing source-XML round-trip + effectLstXml writer.

Notes

  • Branch name (run-dev-server-v1) is incidental — the content is the PPTX fixes above.
  • Local eslint couldn't run (missing @eslint/js in this workspace), unrelated to these changes.
  • Each fix is independently revertable via its changeset/commit-hunk if you'd prefer to split into multiple PRs.

Each fix has a changeset and a regression test.

- grpFill inheritance: shapes using <a:grpFill/> now inherit the enclosing
  group's fill instead of collapsing to transparent (decorative custGeom
  line-art was vanishing).
- gradient text: runs with <a:gradFill> render as a CSS gradient via
  background-clip:text instead of falling back to black; edited runs degrade
  to a representative stop on export.
- underlay z-order: layout/master decorations are emitted in document order, so
  a full-slide background <p:pic> stays behind the gradient drawn over it.
- flowChartTerminator: imports as a rounded pill (radius = min(w,h)/2) instead
  of a sharp rect.
- font weights: Google Fonts requests the actual weights the deck uses
  (family=Name:wght@400;700), so bold titles aren't rendered thin.
- shape drop shadows: parse <a:outerShdw> into ShadowSpec for shapes and
  card-backed text, so white-on-white cards keep their silhouette.
- fontRef text colour: an uncoloured run inherits the shape's
  <p:style><a:fontRef> colour (e.g. lt1/white), fixing stray dark labels.
@karthikmudunuri

Copy link
Copy Markdown
Member Author

Superseded by a 5-PR stack splitting these fixes into reviewable units (merge in order 1→5): #83 → #80 → #84 → #81 → #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant