alphagov / govuk_publishing_components

A gem to document and distribute frontend components for GOV.UK applications
https://components.publishing.service.gov.uk
MIT License
66 stars 20 forks source link

Review `attachment-link` component usage #3483

Open MartinJJones opened 1 year ago

MartinJJones commented 1 year ago

What

Replace the download-link component used in government-frontend with the attachment-link from the publishing components gem.

Download Link - https://govuk-government-frontend.herokuapp.com/component-guide/download_link Attachment Link - https://components.publishing.service.gov.uk/component-guide/attachment_link/with_data_attributes/preview

Why

The style for the download-link component is very different to the attachment-link component as shown in the screenshots below. Not only because of the bold text, but the download-link component also includes an SVG icon to the left of the link. The icon itself does not appear to best represent a download action, but instead would likely indicate a copy action.

Material Design - Content Copy icon - https://materialui.co/icon/content-copy Font Awesome - Copy icon - https://fontawesome.com/icons/copy?f=classic&s=solid

Screenshot comparison

Publishing component - attachment-link Government Frontend - download-link
attachment-link-gem government-frontend-download-link

Example page: https://www.gov.uk/foreign-travel-advice/algeria

nnagewad commented 5 months ago

@MartinJJones this may be a silly question but will this continue to be an issue once app consolidation is underway?

MartinJJones commented 5 months ago

@MartinJJones this may be a silly question but will this continue to be an issue once app consolidation is underway?

Good question, I'm not too familiar with the app consolidation work, but I think it would depend on the approach used, for example, you could lift and shift the download-link from one application into another. In this scenario the app would be consolidated, but the attachment/download link component variations could still exist.

I imagine that by using components from the gem and consolidating the components, it could potentially make the consolidation work a bit easier, from a frontend perspective at least, no HTML, CSS or JS to migrate over to the other application for example.