Skip to content

Add support for content editor in replies

Himanshu Kapoor requested to merge 345072-ce-in-replies into master

What does this MR do and why?

Similar to !104463 (merged), this MR adds support for content editor in issue/MR diffs and replies.

Screenshots or screen recordings

Before (or with FF disabled) After
Screen_Recording_2023-03-14_at_19.04.05 Screen_Recording_2023-03-14_at_19.01.40

How to set up and validate locally

  1. Enable feature flag :content_editor_on_issues:

    echo "Feature.enable(:content_editor_on_issues)" | rails c
  2. Visit any issue or MR.

  3. On any existing comment, click the reply icon to draft a new reply, or the edit icon to edit the comment. Notice that the textarea has a switcher reading "Viewing markdown" (bottom right corner) to switch between markdown/rich text.

  4. Edit some text in each editor, switch back and forth and notice that the contents are preserved.

  5. Refresh the page and notice that the contents are still preserved using a local storage draft.

  6. Save or Cancel the form, it should work as expected.

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 #345072 (closed)

Edited by Himanshu Kapoor

Merge request reports