-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
updateAttributes: update current node only #5154
base: main
Are you sure you want to change the base?
Conversation
There is a bug (?) in updateAttributes, attributes of the node are updated but also all it's parent nodes of the same type. This is problematic with things like nested lists, but also nested paragraphs, etc The fix updates attributes of the node ("last") only and leaves the parents intact
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Appreciate your contribution @silenius but it looks like we need some tests & lint rules resolved for this to be merged |
Sorry, I pressed the wrong button (: |
I don't think that is correct either. You were right to pull in the changes from main, it is your changes that are failing the build |
I've fixed the lint issue, but I have no idea why it times out in one test..? (unfortunately Cypress is not supported on my OS, FreeBSD, so I can't check at the moment) |
@silenius if you run the project locally This is also seen on the netlify deployment: https://deploy-preview-5154--tiptap-embed.netlify.app/src/extensions/textalign/react/ So your change broke the ability to center text with the text align extension somehow Hope this helps @silenius |
thanks, it should be fixed :) |
This reverts commit 359b309.
There is a bug (?) in updateAttributes, attributes of the node are updated but also all it's parent nodes of the same type. This is problematic with things like nested lists, but also nested paragraphs, etc
The fix updates attributes of the node ("last") only and leaves the parents intact
Changes Overview
updateAttributes update node only (and not its parents)
Implementation Approach
adapt updateAttributes so that it keep tracks of the "last" (current) node
Testing Done
tested locally with bulletList nodes
Verification Steps
try to update an attributes of a nested list for examplectionality of your changes. -->
Checklist
feat: Implement new feature
orchore(deps): Update dependencies
)Related Issues
#3545 #4466