Add Tab/Shift+Tab indent/outdent shortcuts to plain-text editor
What does this MR do and why?
Fixes Indent/unindent in plain text editor is unusabl... (#437987) by adding Tab/Shift+Tab keyboard shortcuts to the PTE, which indent/outdent when some text is selected.
This is really standard editor behaviour; it already works in our single file editor and Web IDE! Plus it's a lot more discoverable than the existing Ctrl/Cmd+] / Ctrl/Cmd+[ shortcuts, which (per #437987) are broken on many non-US keyboard layouts.
Screenshots or screen recordings
Using Tab / Shift+Tab:
| Before | After |
|---|---|
How to set up and validate locally
- Open any issue or MR comment entry field; ensure you're using the plain-text editor:
- Type multiple lines of text, select more than one of them.
- Press Tab a buncha times; all selected lines should indent by 2 spaces each time.
- Press Shift+Tab a whole lot; ditto for outdenting. Outdenting should continue for all lines even if some have removed all leading spaces.
- Press an arrow key or click elsewhere in the entry field to remove the selection, then press Tab / Shift+Tab; focus should move forwards/backwards as usual.
- Verify Ctrl/Cmd+] and Ctrl/Cmd+[ still work as before.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Asherah Connor