Skip to content
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

[lexical-table] Feature: TableCellNode add verticalAlign attribute #7077

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

liuweiGL
Copy link
Contributor

@liuweiGL liuweiGL commented Jan 22, 2025

Description

TableCellNode adds the verticalAlign attribute so that users can control the vertical alignment of the table

Test plan

Before

Insert relevant screenshots/recordings/automated-tests

After

default.mp4

Insert relevant screenshots/recordings/automated-tests

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 5:38am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 5:38am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 22, 2025
Copy link

github-actions bot commented Jan 22, 2025

size-limit report 📦

Path Size
lexical - cjs 29.07 KB (0%)
lexical - esm 28.86 KB (0%)
@lexical/rich-text - cjs 38.04 KB (0%)
@lexical/rich-text - esm 30.92 KB (0%)
@lexical/plain-text - cjs 36.55 KB (0%)
@lexical/plain-text - esm 28.22 KB (0%)
@lexical/react - cjs 39.85 KB (0%)
@lexical/react - esm 32.36 KB (+0.27% 🔺)

@ivailop7
Copy link
Collaborator

ivailop7 commented Jan 26, 2025

Thank you for this PR. I think it's almost there. In order to keep the node representation in the editorState compact and the HTML output smaller, I think the default for the verticalAlign should be 'undefined' since it's 'top' by default and it should only have a value if middle or bottom and nothing if 'top'. This way, you also won't have to modify the table tests and you can add a new table test specifically testing this new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants