docs(direction): document visual mirror rule + drop dead isRtl args#3273
Open
caio-pizzol wants to merge 1 commit into
Open
docs(direction): document visual mirror rule + drop dead isRtl args#3273caio-pizzol wants to merge 1 commit into
caio-pizzol wants to merge 1 commit into
Conversation
…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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3272 (SD-3134). Docs + dead-arg cleanup, no behavior change.
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/tcMarstart/end,bidiVisualcell order,gridBefore/gridAfter), and the properties it does NOT cover (paragraphw:bidi, runw:rtl/w:dir/w:bdo,w:textDirection, numberingw:start, editing-side visual-to-logical mapping).isRtlargs at three call sites inpm-adapter/src/converters/table.ts. The receivers already ignored them; the call-site args were a trap where a future agent might assumeisRtlflowed through.extractCellBorders,extractCellPadding, andBorderConversionOptionsto be definite and link to the new README section.Why: SD-3134 risked being re-broken on the next
bidiVisualfeature someone adds. Without the rule documented somewhere persistent, future agents see the deadisRtlplumbing 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).