Show link asset types on Releases page
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):
Expanded:
Mobile view:
GIF (to show animation behavior):
Feature flag disabled:
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)
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)