Output attachments in call for evidence pages using the data from the content item, rather than the pre-rendered markup from the content item, and apply GA4 tracking to those attachments that contain Details elements.
Attachments on consultation pages can occur in two places, so this is a bit more complex than publications, although some of the code and tests have been copied from that previous work.
to convert the rendering of attachments to using components so that tracking can be added to Details elements within attachments (for the 'Request an accessible format' element)
to generally move away from the use of pre-rendered markup passed through content items
Visual changes
None, except PDF custom thumbnails are intentionally no longer shown.
⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️
What
Output attachments in call for evidence pages using the data from the content item, rather than the pre-rendered markup from the content item, and apply GA4 tracking to those attachments that contain Details elements.
This follows on from the work to convert publications in the same manner: https://github.com/alphagov/government-frontend/pull/3058
Attachments on consultation pages can occur in two places, so this is a bit more complex than publications, although some of the code and tests have been copied from that previous work.
Example pages to test with:
Why
This work is for two reasons:
Visual changes
None, except PDF custom thumbnails are intentionally no longer shown.
Trello card: https://trello.com/c/tcTN1jbu/28-update-rendering-of-govspeak-attachments