Skip to content

Refactor pipelines page computed properties for improved performance

What does this MR do and why?

This MR refactors the pipelines page component to improve performance and code readability following the changes introduced in Displays different empty state when project has... (!205237 - merged) • Sahil Sharma • 18.5.

Changes

  1. Introduced hasLocalCiConfig computed property: Extracts the condition hasGitlabCi && !usesExternalConfig into a reusable computed property, reducing redundant calculations on each render cycle
  2. Simplified conditional logic: Split the compound conditional in stateToRender into separate, more readable conditions
  3. Removed redundant shouldRenderSearchBar computed property: This property simply returned shouldRenderTabs, so it was replaced with direct usage of shouldRenderTabs

References

Follow-up to Displays different empty state when project has... (!205237 - merged) • Sahil Sharma • 18.5

How to set up and validate locally

  1. Navigate to any project's BuildPipelines page
  2. Verify the page renders correctly for:
    • Projects with local CI configuration
    • Projects with external CI configuration
    • Projects with no CI configuration
  3. Verify the search bar renders when tabs are visible

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sahil Sharma

Merge request reports

Loading