Move showBlobControls logic to header area

What does this MR do and why?

  • Moved showBlobControls logic from blob controls component to parent header component
  • Parent now decides whether to show blob or tree controls based on current route
  • No visual changes for users

AI Summary

This change improves the display logic for repository controls in the GitLab interface. Previously, the blob controls component was responsible for determining when to show itself and hide tree controls. Now, this logic has been moved to the parent component (header_area.vue), which decides whether to show blob controls or tree controls based on the current route. The code adds a new showBlobControls() method in the header area component and removes the equivalent method from the blob controls component. This creates a cleaner separation of concerns where the parent component handles the conditional rendering of its children rather than having children control each other's visibility. Tests were updated to reflect this new structure, removing tests that are no longer relevant and adding new ones to verify the correct behavior.

References

See #533063 (closed) for context

Screenshots or screen recordings

Before After
CleanShot_2025-05-08_at_14.10.21 CleanShot_2025-05-08_at_14.08.54

How to set up and validate locally

Go to a directory, blob-controls should not be present in the vue devtool

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.

Resolves #533063 (closed)

Edited by Chaoyue Zhao

Merge request reports

Loading