Add support for content editor in replies
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
-
Enable feature flag
:content_editor_on_issues
:echo "Feature.enable(:content_editor_on_issues)" | rails c
-
Visit any issue or MR.
-
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.
-
Edit some text in each editor, switch back and forth and notice that the contents are preserved.
-
Refresh the page and notice that the contents are still preserved using a local storage draft.
-
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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #345072 (closed)