BUGFIX: Prevent warnings for unrecognized DOM props#3895
BUGFIX: Prevent warnings for unrecognized DOM props#3895markusguenther wants to merge 2 commits intoneos:8.3from
Conversation
This change addresses React warnings related to invalid DOM attributes: - Removed `executeCommand` and `formattingUnderCursor` from being passed to DOM elements. - Ensured these props are only handled within components where they are relevant, preventing them from being incorrectly rendered on DOM elements. These update prevent unnecessary warnings in the console. Resolves: neos#3894
packages/neos-ui-ckeditor5-bindings/src/EditorToolbar/Helpers/renderToolbarComponents.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Thanks for elaborating on the comment, i had a more deep look into it myself and now im pretty sure this is the wrong place.
The code plugin is actually shipped with the Neos.Demo and registered there: https://github.com/neos/Neos.Demo/blob/6ac18378d6d54a87663c8e20fe4eef1e30a50a3f/Resources/Private/CodeTagPlugin/src/manifest.js#L28
And here in the rendering we can also see the mistake, as we just pass the finalProps directly to the button without omitting anything:
Omitting the props in the Ui based on the arbitrary name is too high-level.
Sebobo
left a comment
There was a problem hiding this comment.
I agree, this is too specific. I encountered the same issues with the toolbar when working on the toolbar UX changes in #3972.
The problem is that f.e. the toolbar renders the registered components with all props and our Button components forwards all props to their innermost button element.
That's something we would have to fix there I think, as the plugin developer has no influence over that.
This change addresses React warnings related to invalid DOM attributes:
executeCommandandformattingUnderCursorfrom being passed to DOM elements.These update prevent unnecessary warnings in the console.
Resolves: #3894