Skip to content

feat: WPS text box#3369

Merged
dolanmiu merged 8 commits intomasterfrom
wps-text-box
Feb 22, 2026
Merged

feat: WPS text box#3369
dolanmiu merged 8 commits intomasterfrom
wps-text-box

Conversation

@dolanmiu
Copy link
Owner

@dolanmiu dolanmiu commented Feb 22, 2026

Following up from #3182 as I cannot push to that branch

  • Add WPS (WordProcessing Shape) text box support as a modern DrawingML-based alternative to legacy VML text boxes
  • Introduce WpsShapeRun for inline/floating text boxes with solid fills, outlines, rotation, and body property controls
  • Introduce WpgGroupRun for grouping shapes together
  • Refactor Drawing, Inline, Graphic, and GraphicData to handle WPS/WPG graphic types alongside existing picture data
  • Add BodyProperties with vertical anchor and margin options, NonVisualShapeProperties, WpsTextBox, and WpsShape components
  • Add demo 99 showcasing basic, styled, rotated, floating, and vertically-aligned text boxes

New Public API

  • WpsShapeRun — creates a text box run with children (paragraphs), transformation (width/height/rotation), and optional solidFill, outline, floating, bodyProperties
  • WpgGroupRun — creates a grouped shape run containing multiple child shapes
  • VerticalAnchor enum — TOP, CENTER, BOTTOM for text box vertical alignment

Test plan

  • Unit tests for WpsShapeRun (inline, floating, rotation, fill, outline, body properties)
  • Unit tests for WpgGroupRun (inline, floating, multiple children)
  • Unit tests for BodyProperties (defaults, margins, vertical anchor, noAutoFit)
  • Run npm run demo 99 and verify all 5 text boxes render in Word/LibreOffice
  • Run npm run demo 94 (legacy VML) to confirm no regressions

pbu-fidgate and others added 7 commits February 22, 2026 01:43
# Conflicts:
#	src/file/drawing/anchor/anchor.ts
#	src/file/drawing/drawing.ts
#	src/file/drawing/inline/graphic/graphic-data/graphic-data.ts
#	src/file/drawing/inline/graphic/graphic.ts
#	src/file/drawing/inline/inline.ts
#	src/file/media/data.ts
@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (10bd1f3) to head (2744419).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #3369    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          305       313     +8     
  Lines         9510      9748   +238     
  Branches      1517      1557    +40     
==========================================
+ Hits          9510      9748   +238     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dolanmiu dolanmiu merged commit 7d70f50 into master Feb 22, 2026
11 checks passed
@dolanmiu dolanmiu deleted the wps-text-box branch February 22, 2026 02:29
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.

2 participants