Skip to content

Show link asset types on Releases page

Nathan Friend requested to merge nfriend-show-asset-type-on-releases-page into master

What does this MR do?

Updates the Releases page to show the type (Image, Package, Runbook, Other) of asset links.

In addition, assets are now hidden in a collapsed-by-default accordion. See UX specs here: #207257 (comment 353550332).

This change also affect the individual Release page (the page that shows a single Release), since this component is also used on that page.

Screenshots

Collapsed (default state):

Click to view screenshot image

Expanded:

Click to view screenshot image

Mobile view:

Click to view screenshot image

GIF (to show animation behavior):

Click to view GIF 2020-06-04_15.53.31

Feature flag disabled:

Click to view screenshot image

Update after review feedback

A few visual changes have been made since the screenshots above were taken:

  • Accordion is now expanded by default
  • "external link" icon and tooltip were added
  • Conversion to @gitlab/ui utility classes (which potentially modified the layout very slightly)
Click to view screenshot Screen_Shot_2020-06-05_at_3.36.21_PM

Feature flag

This feature is hidden behind a release_asset_link_type feature flag, which is currently disabled by default.

Tests

A new test - spec/frontend/releases/components/release_block_assets_spec.js - was added as part of this MR. This test assumes that the release_asset_link_type feature flag is enabled and does not test the behavior of this component when the flag is disabled. This is because the old UI is already covered by tests in spec/frontend/releases/components/release_block_spec.js.

An existing RSpec test was also updated to cover both feature flag states (and slightly modified to work in both cases).

Related to #207257 (closed)

Closes #208795 (closed)

Edited by Rayana Verissimo

Merge request reports