Skip to content

Add autosave on design notes

What does this MR do and why?

This change leverages localStorage autosave on design notes to save comments locally before they're posted to permit getting back to it easily and avoid losing content.

Comments are saved, one per existing thread and one new comment per design.

Screenshots or screen recordings

Before After
Design_autosave_-_Before Design_autosave_-_After

How to set up and validate locally

  1. Visit an issue with a design or upload a design (image) to an issue
  2. Open the design
  3. Click somewhere on the image to start a discussion
  4. Type a comment without submitting it
  5. Reload the page or close the tab and reopen it
  6. When attempting to start a discussion, the previously non submitted comment should be loaded in the textarea field.
  7. Start multiple discussion threads and repeat the above steps under each thread.
  8. When reloading an attempting to reply to a thread, each textarea field should load the corresponding non submitted comment to each thread.
  9. Same with a new comment. The data is separate from an existing discussion thread.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #55677 (closed)

Edited by Florie Guibert

Merge request reports