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

React: Fix ReactNodeView renderer element updates not being applied #4321

Merged

Conversation

programateus
Copy link
Contributor

Please describe your changes

Currently, updates on attributes of ReactNodeView are not applied to its renderer element. It's noticeable when you are using elements that depends on its attributes to render correctly like colspan in td elements. This PR tries to fix that issue.

How did you accomplish your changes

Added a loop updating all the renderer element attributes on the update method of the class ReactNodeView.

How have you tested your changes

Tested locally.

How can we verify your changes

Add a NodeView to the table cell extension and try to merge them. More details on the linked issue.

Checklist

  • The changes are not breaking the editor
  • Added tests where possible
  • Followed the guidelines
  • Fixed linting issues

Related issues

Fixes #4239

@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit b43d5d7
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/64d66ed2c8954200089b6da8
😎 Deploy Preview https://deploy-preview-4321--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@bdbch bdbch left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks for your PR.
cc @svenadlung

@bdbch bdbch merged commit 5b407ef into ueberdosis:develop Nov 23, 2023
4 checks passed
@bdbch
Copy link
Contributor

bdbch commented Nov 23, 2023

We're reverting this change for now. It seems like this change leads to all attributes to be added to the nodeview element including attributes that are used for the editor only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: attributes updates are not applied to ReactNodeViewRenderer element
3 participants