Skip to content

Attach indent/outdent keys to toolbar buttons for cross platform support

What does this MR do and why?

Shifting blank line right should add spaces (!94718 - merged) added the ability to indent/outdent lines using shortcut keys. Originally implemented as toolbar buttons, before merging it was converted to capturing the keys directly (due to the toolbar being too wide).

Unfortunately that lost us the cross platform capability. Toolbar shortcuts automatically switch between Ctrl and Cmd based on the platform.

This MR re-implements the feature using toolbar buttons to regain cross platform ability. Now we just hide the buttons (which I should have done originally 🤦)

Verified on Mac Safari/Chrome/Firefox, Windows Edge/Chrome/Firefox, and Ubuntu Firefox

How to set up and validate locally

  1. Use the Review App
  2. Show an edit box, such as editing description or comment.
  3. Verify the indent/outdent icons are not shown, which would look like this if not hidden: Screen_Shot_2022-09-16_at_1.31.37_PM
  4. On a Mac, cmd-] and cmd-[ should indent/outdent selected text
  5. On Windows, ctlr-] and ctrl-[ should do the same

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

Edited by Brett Walker

Merge request reports

Loading