Skip to content

Add TableCell writingMode #4437#4438

Closed
ibastawisi wants to merge 3 commits into
facebook:mainfrom
ibastawisi:add-tableCell-writingMode
Closed

Add TableCell writingMode #4437#4438
ibastawisi wants to merge 3 commits into
facebook:mainfrom
ibastawisi:add-tableCell-writingMode

Conversation

@ibastawisi

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented May 1, 2023

Copy link
Copy Markdown

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 May 4, 2023 10:28am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2023 10:28am

@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 May 1, 2023

@zurfyx zurfyx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Let me start by saying that this is a nice feature so thank you for working on this

);
cellNode.__rowSpan = node.__rowSpan;
cellNode.__backgroundColor = node.__backgroundColor;
cellNode.__writingMode = node.__writingMode;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In retrospective, having a __backgroundColor property isn't great. That was my bad, for some reason I thought that cells would never need any more styling properties and that they could be done on child nodes.

Can we copy TextNode getStyle()? Maybe the caching part isn't too critical for now but the property is important.

The reason why we have to do this before we merge your PR is backward compatibility. Once we commit to supporting this prop it will be hard to roll it back.

The second (minor) is because we probably don't want to commit on it officially until we address the overflow-x issue somehow:

Screenshot 2023-05-01 at 10 57 45 AM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that all CSS styles should go in one node property.
regarding the overflow issue we can hide the table cell overflow and also inherit the tr height to allow cell resizing:

.PlaygroundEditorTheme__tableCell {
    height: inherit;
    overflow: hidden;
}

I might give it a try soon.

@ibastawisi

Copy link
Copy Markdown
Contributor Author

The previous commit breaks Cell background color feature disabled test which is expected.
should we deprecate the backgroundColor property or drop it altogether?

@ibastawisi

Copy link
Copy Markdown
Contributor Author

oh the serialized style property is breaking some unit tests as well, my bad!
image

@ibastawisi ibastawisi closed this Jul 15, 2023
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants