Skip to content

refactor(painter-dom): rename rtl-paragraph feature to inline-direction (SD-2779)#3307

Merged
caio-pizzol merged 2 commits into
mainfrom
caio-pizzol/SD-2779-rename-rtl-paragraph-feature
May 14, 2026
Merged

refactor(painter-dom): rename rtl-paragraph feature to inline-direction (SD-2779)#3307
caio-pizzol merged 2 commits into
mainfrom
caio-pizzol/SD-2779-rename-rtl-paragraph-feature

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

The painter-dom feature module at features/rtl-paragraph/ handles two related but distinct OOXML elements: w:pPr/w:bidi (paragraph bidirectional flag) and w:rPr/w:rtl (run-level RTL trigger). Both belong to paragraph/run inline bidi handling. The rtl-paragraph folder name was inherited from earlier work and is now misleading - table visual direction (w:bidiVisual, §17.4.1) and writing mode (w:textDirection, §17.3.1.41 paragraph / §17.4.72 cell; values in §17.18.93 ST_TextDirection) are separate orthogonal axes owned elsewhere.

Rename the folder, import path, and feature-registry entry to inline-direction so the module name matches the axis. Add an explicit note (registry comment + index.ts JSDoc) calling out the orthogonal axes the module does NOT own, so a future reader who reaches for this folder for table direction or writing-mode work lands on the right pointer.

Internal file (rtl-styles.ts) and exported function names (applyRtlStyles, shouldUseSegmentPositioning, isRtlParagraph, resolveTextAlign) keep their RTL framing because they describe RTL detection and styling specifically. Only the feature folder name changes.

Tests: painter-dom 1070 pass. pnpm --filter @superdoc/painter-dom... build (transitive type check) clean.

Closes the direction-taxonomy cleanup wave alongside SD-2777 (#3279 + #3285) and SD-2778 (#3289 + #3290).

…on (SD-2779)

The painter-dom feature module previously called `features/rtl-paragraph/`
handles two related but distinct OOXML elements: w:pPr/w:bidi
(paragraph inline direction) and w:rPr/w:rtl (run inline direction).
Both belong to the inline-direction axis. Table visual direction
(w:bidiVisual) and writing mode (w:textDirection) are separate
orthogonal axes owned elsewhere.

Rename the folder + import path + feature-registry entry to
`inline-direction` so the module name matches the axis, and add an
explicit note (registry comment + index.ts JSDoc) calling out the
two orthogonal axes the module does NOT own.

Internal file (`rtl-styles.ts`) and exported function names
(`applyRtlStyles`, `shouldUseSegmentPositioning`, `isRtlParagraph`,
`resolveTextAlign`) keep their RTL framing because they describe RTL
detection and styling specifically. Only the feature folder name
changes.

Tests: painter-dom 1070 pass. Build sweep
(`pnpm --filter @superdoc/painter-dom... build`) clean.
…note

§17.18.93 is ST_TextDirection (the enum values), not the element location.
w:textDirection lives at §17.3.1.41 (paragraph) and §17.4.72 (cell).

Also soften the "inline direction" framing to "paragraph/run inline bidi
handling": w:rPr/w:rtl is a run-level bidi/RTL/CS trigger, not strictly a
paragraph base-direction signal.

Comment-only; no code change.
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 14, 2026 17:45
@linear
Copy link
Copy Markdown

linear Bot commented May 14, 2026

SD-2779

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit c184083 into main May 14, 2026
70 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-2779-rename-rtl-paragraph-feature branch May 14, 2026 19:14
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in superdoc v1.30.0-next.95

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.101

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.147

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.145

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.116

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 14, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.99

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants