-
Notifications
You must be signed in to change notification settings - Fork 185
[Table Improvements] Align list in table cells #3275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds alignment support for list items within table cells. When applying horizontal alignment to table cells containing list items, the alignment now propagates to the list items themselves, ensuring consistent formatting.
Changes:
- Extended
alignTableCellHorizontallyto apply text alignment to list items within table cells - Maintained existing behavior of removing paragraph-level text align properties
- Added comprehensive test coverage for list item alignment in various scenarios (LTR, RTL, mixed content)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/roosterjs-content-model-api/lib/modelApi/table/alignTableCell.ts | Added logic to apply alignment to ListItem blocks and moved paragraph textAlign removal logic into the alignment callback |
| packages/roosterjs-content-model-api/test/modelApi/table/alignTableCellTest.ts | Added comprehensive test cases for list item alignment in table cells, including RTL scenarios and mixed content |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent equality operator used. Line 52 uses strict equality (===) for blockType comparison, but this line uses loose equality (==) for both blockType and blockGroupType comparisons. For consistency and to avoid potential type coercion issues, use strict equality (===) for both comparisons on this line.
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent equality operator used. For consistency with line 52 which uses strict equality (===), this comparison should also use strict equality (===) instead of loose equality (==).
When apply alignment in table cells that has list items, also apply the alignment to the list items.
SaveList