Keep commit comments on second edit
What does this MR do and why?
Fix editing the same comment twice on Commit/Snippet pages.
When editing it moves the form element around the page, and revertNoteEditForm
was trying to add it to .diffs
, which isn't on the commit or snippets page. Added a placeholder element alongside the form so we always have somewhere to return the form to.
I didn't add tests because the entire deprecated_notes_spec.js is quarantined.. I could probably try but it would probably be faster to move it to use a less deprecated notes.js
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
edit |
How to set up and validate locally
- View a single commit (Code > Commits > choose one)
- Leave a comment
- Edit the comment, save
- Edit the comment again
- Save it again
- Keep going
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #23007 (closed)