Skip to content

Fixes package tag not being displayed

What does this MR do and why?

When tag count is 1, adds important flag to gl-flex class in package-tags component.

This used to be gl-display-none and was changed to gl-flex in !163424 (diffs)

This probably caused a specificity change which is why we need to add the important flag.

Changelog: fixed

Fixes #496602 (closed)

MR acceptance checklist

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

Screenshots or screen recordings

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

Before After
Screenshot_2024-10-05_at_12.26.12_AM Screenshot_2024-10-05_at_12.23.51_AM
Screenshot_2024-10-07_at_9.52.34_PM Screenshot_2024-10-07_at_9.53.04_PM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Get the project id.
  2. In rails console, run the following:
def fixture_file_upload(*args, **kwargs)
  Rack::Test::UploadedFile.new(*args, **kwargs)
end

project = Project.find(<id>) 

package = FactoryBot.create(:npm_package, project: project)

FactoryBot.create(:packages_tag, package: package, name: 'latest')

FactoryBot.create(:npm_package, project: project).tap { |pkg| 2.times.each { |i| FactoryBot.create(:packages_tag, package: pkg, name: "bananas_#{i}") } }

FactoryBot.create(:npm_package, project: project).tap { |pkg| 3.times.each { |i| FactoryBot.create(:packages_tag, package: pkg, name: "bananas_#{i}") } }
  1. Visit Project > Deploy > Package Registry & the confirm labels are displayed for packages with just one tag
Edited by Rahul Chanila

Merge request reports

Loading