Show a loading indicator on pasting markdown in rich text editor
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
-
Enable feature flag
:content_editor_on_issues
. -
Copy some rich text content either from this MR or another issue/MR/comment.
-
Navigate to an issue in GDK.
-
Simulate Slow 3G in developer tools network tab. This allows testing the loading state better.
-
Paste content in the rich text editor and type something really fast.
-
Notice that:
- There is a loading indicator for the pasted content.
- The text you type appears after the loading indicator.
- Once the pasted content has processed, it will replace the loading indicator.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #406724 (closed)