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

Refactor: exportJSON #6983

Merged
merged 10 commits into from
Dec 23, 2024
Merged

Refactor: exportJSON #6983

merged 10 commits into from
Dec 23, 2024

Conversation

GermanJablo
Copy link
Contributor

exportJSON refactoring. Advantages:

  • Less boilerplate on nodes. With this change many nodes no longer require exportJSON, and those that do no longer need to repeat "type" and "version".
  • DRY. Any changes we make in the future can be done in a single node and propagated to subclasses. This will make reviewing PRs that modify JSON serialization easier, as far fewer files are modified.

Discussed internally with @etrepum

Copy link

vercel bot commented Dec 19, 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 Dec 22, 2024 2:05pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 22, 2024 2:05pm

@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 Dec 19, 2024
@GermanJablo GermanJablo changed the title Refactor: exportJson Refactor: exportJSON Dec 19, 2024
Copy link

github-actions bot commented Dec 19, 2024

size-limit report 📦

Path Size
lexical - cjs 31.29 KB (0%)
lexical - esm 31.11 KB (0%)
@lexical/rich-text - cjs 40.34 KB (0%)
@lexical/rich-text - esm 33.04 KB (0%)
@lexical/plain-text - cjs 38.91 KB (0%)
@lexical/plain-text - esm 30.3 KB (0%)
@lexical/react - cjs 42.21 KB (0%)
@lexical/react - esm 34.29 KB (0%)

@GermanJablo
Copy link
Contributor Author

Comments resolved!

@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Dec 22, 2024
@etrepum etrepum added this pull request to the merge queue Dec 23, 2024
Merged via the queue into facebook:main with commit 6190033 Dec 23, 2024
68 of 69 checks passed
@GermanJablo GermanJablo deleted the refactor-exportJSON branch December 23, 2024 13:56
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