-
Notifications
You must be signed in to change notification settings - Fork 26
Fix reset original body #2365
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
Fix reset original body #2365
Conversation
b5148cc
to
15f8ebe
Compare
const newValue = value.replaceAll(regExToPruneLineEndings, ""); | ||
localMessage.value.isBodyChanged = newValue !== uneditedMessageBody.value.replaceAll(regExToPruneLineEndings, ""); | ||
localMessage.value.isBodyEmpty = newValue === ""; | ||
}, 1000); |
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.
these values affect the save? What happens during the second that you're waiting for the update to happen? Why is the debounce required?
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.
Becasue we don't want to fire this callback on every keystroke. The callback has a few things happening that can be expensive.
The worse it happens is that we won't see the "reset" button for 1 second.
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.
as mentioned in our call, this should be removed for the isBodyEmpty check, retained for the isBodyChanged
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.
can you provide a more detailed description of what the issue was that this is fixing? Difficult to get a handle on it from just the code...
@PhilBastian I have updated the description |
e4c8dfc
to
12c61ca
Compare
A few small other fixes
12c61ca
to
648cacf
Compare
The edit and retry dialog was suppose to show a "reset body" back to the original button.
But unfortunately the logic had a few bugs which cuased the button to not always be shown.
This PR fixes that issue as well as brings the button to the top of the dialog to be more inline with current design in other areas.