Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cellAlignStyles had entries for center and end only, so a column written `| :--- |` got no style at all and rendered exactly like an undeclared one. That looks right in isolation, because a cell already starts at the inline start — but text-align inherits, so the column follows whatever the table is nested in. Rendered inside a centered block, a table whose first column explicitly declares :--- centers it, and nothing in the markdown says it should. A declared alignment is now always written out, start included. Only the :--- case changes, and only where something around the table had already moved the default.
83832b0 to
c7614ea
Compare
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
rubyycheung
left a comment
There was a problem hiding this comment.
Thanks for calling out the RTL judgment explicitly. I checked the behavior against GFM, GitHub’s renderer, remark-gfm, and markdown-it; they all preserve physical left/right alignment under RTL. ASTRYX’s parser also represents these values as left | center | right.
Because this component renders author-specified GFM formatting, translating :--- to logical start and ---: to logical end changes the document’s meaning in RTL. Could we map both values to physical left and right, use a narrowly scoped @astryx/no-physical-properties suppression for this semantic exception, and add RTL coverage?
The logical-property rule makes sense for UI layout, but explicit Markdown alignment is source-document formatting and should remain compatible with the originating syntax.
There was a problem hiding this comment.
Thanks for the focused fix — writing out a declared :--- alignment so it no longer inherits an ancestor's text-align is the right shape, and the test correctly distinguishes declared from undeclared columns on both header and body cells.
Approval is waiting on one maintainer ruling that this change itself flags: should Markdown table markers preserve GFM's physical semantics (:--- always left, ---: always right, including in RTL), or intentionally map to logical start/end so they mirror in RTL under Astryx styling conventions? A maintainer needs to provide or identify the governing spec for that mapping and settle the RTL behavior. Once that is decided, please align the implementation, add RTL coverage asserting the chosen semantics, and keep the changeset wording consistent with it. No other material defect was found.
[Automated review]
humbertovirtudes
left a comment
There was a problem hiding this comment.
The alignment fix at exact head c7614eae is correct in isolation, and its tests cover explicit left, centre, right, and undeclared alignment for headers and cells. The current head cannot land as-is, however: GitHub reports it conflicting with main, and it targets the old node.alignments renderer shape.
Please port the fix onto the canonical Markdown stack after #6675, using node.align, and preserve #6663's single Table-owned scroll viewport, #6664's document grid variant, and #6667's footnoteContext argument in table-cell rendering. The port should keep the logical textAlign: 'start' rule for explicit left alignment and retain the existing assertions.
There was a problem hiding this comment.
The fix is right at this revision: a :--- column now keeps its start alignment inside a centered container, default LTR and RTL rendering is unchanged, and the new test fails without the fix. The branch can't merge, though, because it conflicts with main, where the table renderer now reads node.align instead of node.alignments and still lacks the start style. Please rebase onto main, add start to cellAlignStyles and the node.align[i] === 'left' (header) and node.align[j] === 'left' (body) conditions beside the existing entries, and keep your test. Keep the logical start mapping, as the engineering-owner review asked, since it matches the repository's guidance that start/end alignment follows the region's direction; the earlier request for physical left/right stays open for its reviewer to revisit after the port.
[Automated review]
humbertovirtudes
left a comment
There was a problem hiding this comment.
Table-scoped review of exact head c7614eae00f85b175090360b4b5319bb762ae334.
The logical-start alignment repair is correct in its own renderer and tests. This head conflicts with current main and uses the old node.alignments representation. Port only this fix to the canonical node.align renderer, retaining current Table scroll ownership and table-cell footnote context, then rerun the alignment cases and applicable browser evidence. This comment does not reverse the existing change request or claim the old head is ready to merge.
# Conflicts: # packages/core/src/Markdown/Markdown.test.tsx # packages/core/src/Markdown/Markdown.tsx
There was a problem hiding this comment.
Changes requested. The alignment fix itself is right on this head: a :--- column now keeps its start alignment inside a centered or end-aligned container, every other case renders as before, and the new test fails without the fix.
- Regression: the changeset's first sentence (
.changeset/markdown-table-explicit-left-align.md, lines 7-8) sayscellAlignStyleshad onlycenterandendand that every:---column got no style, butmainnow already hasstartand already aligns a:---cell whose text reads against its table, so please reword it to say that only a cell reading in its table's direction was left unstyled.
Optional: the new comment above cellAlignStyles explains the left branch in tableCellSideStyles and would read better there, split into short sentences. The two earlier change requests (the port onto main, which this head carries, and the request for physical left/right alignment) still need their reviewers to re-review or dismiss them, and CI runs once a maintainer adds the ci:run label.
[Automated review]
…sits on its branch After the merge with main, cellAlignStyles already has start and a cell reading against its table already aligns, so the changeset now says only a cell reading in its table's direction was left unstyled. The comment moves from the style map to the left branch in tableCellSideStyles, in short sentences.
There was a problem hiding this comment.
No blocking findings remain at this head: a :--- column now keeps its start alignment inside a centered or end-aligned container, every other case renders as before, the new test fails without the fix, and the changeset now describes main correctly.
Approval waits on the two open change requests: rubyycheung's asks for physical left/right alignment, while this head keeps the logical start/end mapping main already uses for the other markers, and humbertovirtudes's asks for the port onto main, which this head carries. Each reviewer needs to re-review or dismiss their request, or the pull request moves to physical alignment instead.
Optional: the description's first paragraph still says cellAlignStyles had only center and end; if it becomes the merge commit message, reuse the changeset's corrected sentence.
[Automated review]
(Posted by Cindy's agent.) Dismissing as addressed at head 2c85d36, with thanks. The fix is now ported onto main's canonical Markdown table renderer (node.align, with main's shared table-cell side styles), keeping Table's scroll ownership and table-cell footnote context. The alignment cases are covered by the new test, which fails without the fix, CI is green at this head, and the latest automated review at this head reports no blocking findings.
(Posted by Cindy's agent.) Dismissed as stale on the owner's decision: this review is on an outdated head. Please re-review the current head if concerns remain.
…t alignment design:bidirectionality DR3: start and end alignment follow the containing region's direction, so the file name says start, not left.
|
/approve-spec 91908a7 |
There was a problem hiding this comment.
Approval is on hold, though nothing in the code needs to change: a :--- column now keeps the table's start inside a centered or end-aligned container, every other case renders as before, and the new test fails without the fix.
- The change requests from rubyycheung and humbertovirtudes were dismissed by another maintainer rather than by their reviewers, so approval waits on each of them re-reviewing this head.
CI has not run on this head yet because the pull request is still a draft.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim (release note): a declared
:---column wrote no alignment on a cell that reads in its table's direction, so it rendered like an undeclared column. Verified: the base cell-style helper returned nothing for that case, and the body cell had no alignment of its own. - Claim (release note): because
text-aligninherits, such a column follows its container and centers inside a centered block. Verified in Chromium for the column's body cells; header cells already set their own start. - Claim (release note): every declared alignment is now written out, start included. Verified in
Markdown.tsxlines 1379-1385. - Claim (release note): only the
:---case changes, and only where something around the table moved the default. Verified: default, right-to-left and against-table renderings are pixel-identical between base and head. - Claim (description): the change was split out of #5288, where the underlying bug was pointed out. Verified in #5288's discussion.
- Claim (description):
:---maps to the start and---:to the end, mirroring under right-to-left, the same mappingmainalready uses. Verified in the base and head helper and in right-to-left Hebrew renderings. - Claim (description): the changeset names the start alignment. Verified in its file name and text.
- Claim (description): the test asserts every declared column on header and body cells and that an undeclared column keeps the table's default. Verified:
Markdown.test.tsxlines 189-201 fail on the base and pass on the head. - File
.changeset/markdown-table-explicit-start-align.md: clear. - File
packages/core/src/Markdown/Markdown.test.tsx: clear. - File
packages/core/src/Markdown/Markdown.tsx: clear.
Split out of #5288, where @cixzhang pointed at the bug underneath it.
A column written
| :--- |wrote no alignment on a cell that reads in its table's direction, so that cell rendered exactly like an undeclared one. That looks right in isolation, because a cell already starts at the inline start — buttext-aligninherits, so the column follows whatever the table is nested in. Render a table inside a centered block and a first column that explicitly declares:---centers itself; nothing in the markdown says it should.A declared alignment is now always written out,
startincluded. Only the:---case changes, and only where something around the table had already moved the default — an undeclared column still takes it.Logical start and end.
design:bidirectionalityDR3 settles this: start and end alignment follow the containing region's direction. So:---maps tostartand---:toend, which mirror under right-to-left, the same mappingmainuses for the other markers, and the changeset names the start alignment.Test asserts every declared column's computed alignment on both
thandtd, and that an undeclared column keeps the table's own default.Open review requests. This head carries the port onto
main(one merge ofmain, with the Markdown change unchanged). The physical left/right question is governed bydesign:bidirectionalityDR3: start and end alignment follow the containing region's direction, so the logical mapping stands.