Skip to content

Migrate Soft Wrap button to Source Editor's toolbar

Denys Mishunov requested to merge 352662-soft-wrap-button into master

What does this MR do and why?

This MR migrates the Soft/No wrap button from the conventional toolbar to the Source Editor toolbar. The change is behind the feature flag (:source_editor_toolbar), hence no changelog entry is needed.

Screenshots or screen recordings

Before After
Default (Soft wrap) Screenshot_2023-02-23_at_01.02.30 Screenshot_2023-02-23_at_01.03.27
Clicked (Switching to No Wrap) Screenshot_2023-02-23_at_01.02.39 Screenshot_2023-02-23_at_01.03.36

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable the Source Editor toolbar
    Feature.enable(:source_editor_toolbar)
  2. Click "Add new file" in your repository view (route to /-/new/master/ for example)
  3. Observe the "No wrap" button on the Source Editor toolbar instead of the conventional one
  4. Click the button to make sure it behaves as expected
  5. Give the new file a name (simply type in foo.md, for example, into the file name field) and watch the new buttons populate the toolbar, yet the "No wrap" still being present on the toolbar and work as expected

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

Edited by Denys Mishunov

Merge request reports