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
-
Introduced
hasLocalCiConfig
computed property: Extracts the conditionhasGitlabCi && !usesExternalConfig
into a reusable computed property, reducing redundant calculations on each render cycle -
Simplified conditional logic: Split the compound conditional in
stateToRender
into separate, more readable conditions -
Removed redundant
shouldRenderSearchBar
computed property: This property simply returnedshouldRenderTabs
, so it was replaced with direct usage ofshouldRenderTabs
References
Follow-up to Displays different empty state when project has... (!205237 - merged) • Sahil Sharma • 18.5
How to set up and validate locally
- Navigate to any project's Build → Pipelines page
- Verify the page renders correctly for:
- Projects with local CI configuration
- Projects with external CI configuration
- Projects with no CI configuration
- 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