Skip to content

fix: mirror explicit left/right paragraph alignment for rtl#3235

Merged
caio-pizzol merged 2 commits into
mainfrom
artem/rtl-v8
May 12, 2026
Merged

fix: mirror explicit left/right paragraph alignment for rtl#3235
caio-pizzol merged 2 commits into
mainfrom
artem/rtl-v8

Conversation

@artem-harbour
Copy link
Copy Markdown
Contributor

@artem-harbour artem-harbour commented May 11, 2026

Linear: SD-3093

Fixes RTL paragraph alignment rendering parity with Word in pm-adapter.

What changed

  • Updated paragraph alignment normalization so explicit left/right are mirrored for RTL paragraphs (w:bidi context).
  • Added/updated regression tests for RTL alignment mapping and bidi fallback behavior.

Why

For RTL documents with explicit w:jc values (notably w:jc="right"), SuperDoc could render alignment opposite to Word. This patch aligns rendering behavior with OOXML/Word semantics.

Scope

Render pipeline only (layout-engine/pm-adapter), no toolbar/editor command changes.

Related: #3244

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@linear
Copy link
Copy Markdown

linear Bot commented May 11, 2026

SD-3093

@artem-harbour artem-harbour marked this pull request as ready for review May 11, 2026 18:45
@artem-harbour artem-harbour requested a review from a team as a code owner May 11, 2026 18:45
@artem-harbour artem-harbour requested a review from caio-pizzol May 11, 2026 18:45
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e56997752c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/layout-engine/pm-adapter/src/attributes/spacing-indent.ts
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @artem-harbour - i pushed a follow-up commit with import-path behavior + pm-adapter unit coverage, and uploaded the fixture to the R2 corpus so layout + visual auto-discover it. i also pushed the matching writer-side tests to #3244.

lgtm once both PRs merge together.

@caio-pizzol caio-pizzol merged commit fa0cfc5 into main May 12, 2026
64 checks passed
@caio-pizzol caio-pizzol deleted the artem/rtl-v8 branch May 12, 2026 20:33
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 12, 2026

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

The release is available on GitHub release

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.

3 participants