Skip to content

Hide commit form based on pipeline editor path's tab query param

Mireya Andres requested to merge fix-commit-display into master

What does this MR do and why?

In the pipeline editor, the commit form should only be visible when in the Edit tab. We hide the form when we switch to other tabs; however, the commit form will still show up if we load the page while setting the tab query parameters.

This MR should fix the behavior so that the commit form is hidden if the tab query parameter is set to anything other than the Edit tab.

Screenshots or screen recordings

Before After
Screen_Shot_2022-05-26_at_16.44.12 Screen_Shot_2022-05-26_at_16.43.51

How to set up and validate locally

  1. Go to http://gdk.test:3000/gitlab-org/gitlab-shell/-/ci/editor?tab=1. This will lead you to the Visualize tab. The commit form should not be visible.
  2. If you update the tab to 0 or remove the tab query parameter altogether, this will take you to the Edit tab where the commit form will be visible.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports