Skip to content

Migrate buttons on 'new tag' form

Dan MH requested to merge 363946-danm-migrate-new-tag-buttons into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR migrates some of the buttons on the New Tag page to use Pajamas::ButtonComponent.

Screenshot Info
image There are 3 things that look like buttons on the page

1. button_tag but its actually a dropdown
2. button_tag
3. link_to

This MR migrates button 2. and 3..

Related to &8153

Epic details There are HAML templates and Ruby files that use plain `%button` tags and/or the `button_tag` helper, and apply some classes to emulate `GlButton`. These should be migrated to `Pajamas::ButtonComponent` instances.

Check Pajamas::ButtonComponent implementation MR. It also has 2 migration examples.

This epic excludes:

  1. Dropdown triggers, as they will be handled in &1059.
  2. Buttons that look like links, as there's some overlap with &4232.
  3. Less easy-to-find buttons which aren't obviously suited to Pajamas::ButtonComponent.
  4. Form submit buttons that submit forms built with Rails Form Builder

This epic optionally includes:

  1. Links that look like buttons. See the third migration example.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

Before After
gitlab.com_gitlab-org_gitlab_-_tags_new 127.0.0.1_3000_h5bp_html5-boilerplate_-_tags_new

How to set up and validate locally

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

Create a new tag when in a project (Repository > Tags > New tag)

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

Edited by Dan MH

Merge request reports