-
-
Notifications
You must be signed in to change notification settings - Fork 136
Update editor on quote reply #2687
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
base: master
Are you sure you want to change the base?
Conversation
I mean we probably should initialize with |
|
First off, get some rest! You deserve it and this isn't super high priority. I don't think this behavior is right. Every time I call |
|
I thought about I'll take some rest now, will switch to the native |
adlai
left a comment
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.
only reading this as part of my gradual familiarising with the codebase;
and I wonder whether it would be possible, in some future patch, to insert the quoted lines at the cursor position, rather than appending ?
|
I was thinking of implementing quote replies exactly like that. In absence of selection it will just append the content. |
Description
The editor initializes itself with
appendValue(quote reply) if available, but doesn't keep track ofappendValuechanges, breaking quote reply on full items that already have the reply box open.This PR fixes this via
QuoteReplyPluginthat simply reacts toappendValuechanges and replaces text content.Additional Context
I didn't create an extension because
appendValue, not being a stable prop, would have caused re-renders of the editorChecklist
Are your changes backward compatible? Please answer below:
For example, a change is not backward compatible if you removed a GraphQL field or dropped a database column.
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8, actually really good, got to use
quote replymoreFor frontend changes: Tested on mobile, light and dark mode? Please answer below:
Did you introduce any new environment variables? If so, call them out explicitly here:
Did you use AI for this? If so, how much did it assist you?
Note
Add QuoteReplyPlugin and plumb appendValue so the editor updates when the quote-reply content changes.
appendValuetoEditorContentand initialize state withappendValue || text.value.QuoteReplyPluginthat reacts toappendValuechanges and reinitializes the editor state.QuoteReplyPlugininto the editor plugin stack.Written by Cursor Bugbot for commit 5130c56. This will update automatically on new commits. Configure here.