Skip to content

Show a loading indicator on pasting markdown in rich text editor

Himanshu Kapoor requested to merge 406724-ce-paste-loading into master

What does this MR do and why?

Show a loading indicator on pasting markdown in rich text editor

Pasting markdown content is an async event, so show a loading indicator while the markdown content is being parsed, and then replace the loading indicator with pasted content.

Changelog: changed

Screenshots or screen recordings

Before After
Screen Recording 2023-06-15 at 11.58.50.mov Screen Recording 2023-07-07 at 12.37.10.mov

How to set up and validate locally

  1. Enable feature flag :content_editor_on_issues.

  2. Copy some rich text content either from this MR or another issue/MR/comment.

  3. Navigate to an issue in GDK.

  4. Simulate Slow 3G in developer tools network tab. This allows testing the loading state better.

    image.png

  5. Paste content in the rich text editor and type something really fast.

  6. Notice that:

    1. There is a loading indicator for the pasted content.
    2. The text you type appears after the loading indicator.
    3. Once the pasted content has processed, it will replace the loading indicator.
    4. The cursor position does not change, and you can continue typing where you left off.

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

Edited by Himanshu Kapoor

Merge request reports