Skip to content

docs(direction): document visual mirror rule + drop dead isRtl args#3273

Open
caio-pizzol wants to merge 1 commit into
mainfrom
caio-pizzol/SD-3134-visual-mirror-cleanup
Open

docs(direction): document visual mirror rule + drop dead isRtl args#3273
caio-pizzol wants to merge 1 commit into
mainfrom
caio-pizzol/SD-3134-visual-mirror-cleanup

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Follow-up to #3272 (SD-3134). Docs + dead-arg cleanup, no behavior change.

  • Add a "Visual mirror rule (table-visual RTL axis)" section to pm-adapter/src/direction/README.md. Spells out the three-condition gate (table-scoped + logical-side language + painter mirrors), the OOXML properties it covers (tblBorders/tcBorders/tcMar start/end, bidiVisual cell order, gridBefore/gridAfter), and the properties it does NOT cover (paragraph w:bidi, run w:rtl/w:dir/w:bdo, w:textDirection, numbering w:start, editing-side visual-to-logical mapping).
  • Drop dead isRtl args at three call sites in pm-adapter/src/converters/table.ts. The receivers already ignored them; the call-site args were a trap where a future agent might assume isRtl flowed through.
  • Tighten the existing "ignored" comments on extractCellBorders, extractCellPadding, and BorderConversionOptions to be definite and link to the new README section.

Why: SD-3134 risked being re-broken on the next bidiVisual feature someone adds. Without the rule documented somewhere persistent, future agents see the dead isRtl plumbing and assume the receiver reads it.

Extractor signatures (_options? params) intentionally kept to avoid churning ~6 test invocations across three "regardless of isRtl flag" tests. A broader API trim can happen later.

Tests: pm-adapter 213 pass (table-styles + borders + table).

…SD-3134)

Cleanup PR stacked on the SD-3134 fix. No behavior change.

- Add a "Visual mirror rule (table-visual RTL axis)" section to
  pm-adapter/src/direction/README.md. Spells out the three-condition
  gate (table-scoped + logical-side language + painter mirrors),
  enumerates the OOXML properties it covers (tblBorders/tcBorders/
  tcMar start/end + bidiVisual cell order + gridBefore/After), and
  the properties it does NOT cover (paragraph w:bidi, run w:rtl/dir/
  bdo, w:textDirection, numbering w:start, editing-side visual-to-
  logical mapping). Future bidiVisual-axis features should follow
  the same pattern instead of re-introducing pre-mirrors.

- Remove dead isRtl args at three call sites in pm-adapter/src/
  converters/table.ts. The receivers in borders.ts already ignore
  the flag (the comments at lines 313 and 369 said so); the call
  sites were misleading. Removing them eliminates the trap where a
  future agent reads the call and assumes isRtl flows through.

- Tighten the existing "ignored" comments on extractCellBorders,
  extractCellPadding, and BorderConversionOptions to be definite
  ("isRtl is IGNORED") and to reference direction/README.md.

Extractor signatures keep the optional _options param for now to
avoid churning ~6 test invocations across the three "regardless of
isRtl flag" tests. A broader API trim can happen later.

Tests: pm-adapter 213 pass (table-styles + borders + table).

Stacked on caio-pizzol/SD-3134; retarget to main after that lands.
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 13, 2026 22:08
@linear
Copy link
Copy Markdown

linear Bot commented May 13, 2026

SD-3134

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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