Skip to content

Add helpers to init GlToggle instances

What does this MR do and why?

This adds HAML and Js helpers to easily instantiate GlToggle from a HAML view.

Screenshots or screen recordings

The following previews are from other branches that leverage those helpers to replace existing toggle implementations.

Protect a branch (!80548 (merged))

Before After
Screen_Shot_2022-02-09_at_2.33.30_PM Screen_Shot_2022-02-09_at_2.30.32_PM

Edit protected branches (!80549 (merged))

Before After
Screen_Shot_2022-02-09_at_2.33.40_PM Screen_Shot_2022-02-09_at_2.30.50_PM

Toggling protected branches' status (!80549 (merged))

Screen_Recording_2022-02-10_at_11.47.42_AM

How to set up and validate locally

  1. Pull any of the follow-up MRs.
  2. In any project, navigate to the protected branch settings at /:namespace/:project/-/settings/repository#js-protected-branches-settings.

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

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading