Skip to content

Add prefix for certain quick actions in rich text editor

Himanshu Kapoor requested to merge 406722-ce-prefix-quick-actions into master

What does this MR do and why?

Add prefix for certain quick actions in RTE

In rich text editor, when picking a quick action from the autocomplete dropdown, add a prefix "@" for user mention quick actions, "~" for label related quick actions and "%" for milestone quick actions.

Changelog: added

Screenshots or screen recordings

Before After
Symbols @, ~ and % aren't added automatically. They are added automatically after selecting the quick action.
Screen Recording 2023-10-18 at 11.34.54.mov Screen Recording 2023-10-18 at 11.32.14.mov

Symbol map:

Quick Action Symbol
/label, /unlabel, /relabel ~
/assign, /unassign, /reassign, /cc, /assign_reviewer, /unassign_reviewer, /reassign_reviewer @
/milestone %

How to set up and validate locally

  1. Open an MR. Use rich text editor in the comment box.
  2. Try typing any of the commands above.
  3. After selecting a command, the appropriate symbol should automatically be inserted and trigger a new suggestions dropdown.

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

Edited by Himanshu Kapoor

Merge request reports