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

[LexicalTextNode] Refactor: remove unnecessary type casting #6201

Merged
merged 1 commit into from
May 30, 2024

Conversation

potatowagon
Copy link
Contributor

@potatowagon potatowagon commented May 29, 2024

Description

noticed that DOMConversionFn<HTMLElement> -> it takes in a HTMLElement as input, but quite alot of conversion fn implementations have the input type as Node, and then later cast it as a HTMLElement (or its child classes).

seems redundant as we can directly have the input type as the HTMLElement

Test plan

npm run ci-check

Copy link

vercel bot commented May 29, 2024

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 29, 2024 3:52pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 3:52pm

@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 29, 2024
Copy link

github-actions bot commented May 29, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 23.95 KB (0%) 480 ms (0%) 189 ms (+800% 🔺) 668 ms
packages/lexical-rich-text/dist/LexicalRichText.js 34.64 KB (0%) 693 ms (0%) 195 ms (+252.84% 🔺) 888 ms
packages/lexical-plain-text/dist/LexicalPlainText.js 34.62 KB (0%) 693 ms (0%) 174 ms (+177.88% 🔺) 866 ms

@lexical-bot lexical-bot added the extended-tests Run extended e2e tests on a PR label May 29, 2024
@potatowagon
Copy link
Contributor Author

failing is known flaky test & dont look related

https://github.com/facebook/lexical/actions/runs/9294132717/job/25578693971?pr=6201

@potatowagon potatowagon added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 4816bf7 May 30, 2024
38 of 40 checks passed
@potatowagon potatowagon deleted the cleanup-types branch September 11, 2024 07:24
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.

4 participants