[lexical-react][lexical-playground] Fix: correct imports of horizontal rule#8203
[lexical-react][lexical-playground] Fix: correct imports of horizontal rule#8203dabrpio wants to merge 2 commits intofacebook:mainfrom
Conversation
|
Hi @dabrpio! 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! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
This is more or less on purpose, the HorizontalRuleNode from extensions is a different non-react implementation from the one in The command is the same either way, it’s just a re-export. The node class and the plugin vs. extension to support it are the difference. The WIP PR #8202 addresses most of this already |
|
Ok, I'm closing this PR since it's now addressed in #8202. |
Description
After deprecation of
HorizontalRuleNodeand$createHorizontalRuleNodein@lexical/react/LexicalHorizontalRuleNode(#7706) I changed the imports to@lexical/extensionin my project. It seems it works well in build but today I noticed that on local it does not work. I was getting this error:I realized that
HorizontalRulePluginfrom@lexical/react/LexicalHorizontalRulePluginstill uses$createHorizontalRuleNodedeprecated import. This PR updates this and other deprecated imports from@lexical/react/LexicalHorizontalRulePlugin.Additionally, this PR also updates other imports from this file (
INSERT_HORIZONTAL_RULE_COMMAND,$isHorizontalRuleNode) so that now they are importing from@lexical/extension.Suggestion
Apart from deprecated
HorizontalRuleNodeand$createHorizontalRuleNode, there are still 3 other things -INSERT_HORIZONTAL_RULE_COMMAND,$isHorizontalRuleNodeandSerializedHorizontalRuleNodewhich are exported from@lexical/react/LexicalHorizontalRulePlugin. I suggest to also mark them as deprecated and force everyone to import them from@lexical/extension.