-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: ✨ allow vertical resizing of node textareas #6180
base: main
Are you sure you want to change the base?
feat: ✨ allow vertical resizing of node textareas #6180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new size is forgotten if the component unmounts, because it is not recorded in the reactflow
internal state.
reactflow
provides a NodeResizer
and customizable NodeResizeControl
to implement resizing the whole node component. These allow for persistent node size changes. When I was last playing around with them, they didn't play very nicely with textarea
s.
Note that the width
and height
node properties are not writable - you must use the aforementioned utils to resize a node.
The textarea
s are purposefully not resizable to prevent bug reports about the size not being remembered.
Also - IIRC there is an edge case where the handles can end up offset vertically when resizing, but that may have been when you resize the node component.
I don't have any strong objections to changing it to allow resize but just wanted to add some context.
Also need to check how this might interact with the linear view, especially the drag and drop.
I played with drag and drop with resizing and it worked surprisingly well.
That's good context to have, and an restriction for that library to have. Maybe filing an issue on their repo could be beneficial. |
Actually, the width and height are recorded in the state. Resizing the text area updates these dimensions, but the nodes are all rendered and re-measured on mount, resetting the dimensions. There are existing issues in A solution might be to store the dimensions in our controlled This would require adding the dimensions to |
Summary
Allows you to vertically resize textareas within the node editor and viewer. I was getting really tired of the restrictive viewing of my prompts within the workflows tab, so this pr addresses that.
Related Issues / Discussions
QA Instructions
Merge Plan
Checklist