Repository navigation
[lexical-rich-text] Bug Fix: Forward editorConfig to QuoteNode.updateDOM - #8882
Conversation
## Description LexicalEditor already forwards editor._config to updateDOM for all nodes, but QuoteNode was not accepting the config parameter. This change aligns QuoteNode.updateDOM() with all other nodes in the codebase (e.g. HeadingNode, ParagraphNode) by adding the missing config: EditorConfig parameter. ## Test plan ### Before QuoteNode.updateDOM() accepted only (prevNode, dom) and tests called it without passing config. ### After QuoteNode.updateDOM() now accepts (prevNode, dom, config) and the test passes editorConfig as the third argument.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @werterhalimi! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Description
LexicalEditor already forwards
editor._configtoupdateDOMfor all nodes (seeLexicalEditor.ts:916), butQuoteNodewas not accepting theconfigparameter. This change alignsQuoteNode.updateDOMwith every other node in the codebase (e.g.HeadingNode,ParagraphNode,TextNode) by adding the missingconfig: EditorConfigparameter.Also updates the unit test and the Flow type declaration to match.
There is no runtime behavior change — this only makes the contract consistent so that future logic inside
QuoteNode.updateDOMcan safely reference the editor config (theme, namespace, etc.) just like sibling nodes already do.Test plan
Before
QuoteNode.updateDOM(prevNode, dom)accepted only two arguments.editor._configanyway, but it was ignored by the type signature.After
QuoteNode.updateDOM(prevNode, dom, config)matches the contract expected by the reconciler.LexicalQuoteNode.test.tsupdated to passeditorConfigas the third argument.packages/lexical-rich-textpass.