Skip to content

Make the README tab the default view Catalog details page

What does this MR do and why?

We had initially decided that we wanted the new components tab to be the default landing page for a Catalog resource, but there has been some concerns around the metadata of Ci resources. There are chances that some resources might not have any metadata collected, so if this tab is the default, it might mean landing on an empty page. The README is the safer option here, so we are inverting the tabs.

This is behind a disabled FF ci_catalog_components_tab

Screenshots or screen recordings

Before After
Screenshot_2023-10-20_at_1.41.26_PM Screenshot_2023-10-20_at_1.41.06_PM

How to set up and validate locally

  1. Make sure you have an premium license for your GDK
  2. Login as an admin user
  3. Create a few projects that you will be able to convert to Ci resources. Create them under the admin namespace for ease of testing.
  4. Once you have done so, get the ID of the first new project you wanted to convert. Then in Rails console, run:
projects = Project.where("id > ?", your_first_project_id)
projects.each do |project|
  project.update!(description: 'description')  
  ::Ci::Catalog::Resource.new(project_id: project.id).save   
end  
  1. Navigate to /$namespace/$project/-/ci/catalog/resources/. Any project under the same namespace will do (in this case, anything under the admin namespace)
  2. Click on a resource
  3. Notice the components tab is not present
  4. Open your rails console and execute: Feature.enable(:ci_catalog_components_tab)
  5. Refresh the page
  6. Notice the new README tab load as default!
  7. Click on the components tab
  8. The data you see is mock data. This is why this is behind a disabled FF

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

Edited by Frédéric Caplette

Merge request reports