Skip to content

Vertical center catalog list items

Frédéric Caplette requested to merge fc-align-catalog-logos into master

What does this MR do and why?

Now that Catalog list items take more height, we can see that they were not vertically centred. This MR fixes this the project avatar being at the top instead of centred.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot 2023-11-24 at 1.39.48 PM.png Screenshot 2023-11-24 at 1.41.14 PM.png

How to set up and validate locally

  1. Enable the FF global_ci_catalog
  2. Create a few projects that you will be able to convert to Ci resources. Create them under the admin namespace for ease of testing.
  3. 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 -1)
projects.each do |project|
  project.update!(description: 'description')  
  ::Ci::Catalog::Resource.new(project_id: project.id).save   
end  
  1. Then in the rails console, do Ci::Catalog::Resource.all.each do |r| r.update("state", "published") end
  2. Navigate to Explore -> CI/CD Catalog
  3. Notice that you see Catalog resources
  4. Notice that the project avatar is now vertically centred

MR acceptance checklist

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

Edited by Frédéric Caplette

Merge request reports