whitehall icon indicating copy to clipboard operation
whitehall copied to clipboard

Make draft admin links previewable

Open lauraghiorghisor-tw opened this issue 1 year ago • 0 comments

It is common that publishers may work on documents that need to be published more or less simultaneously. In such cases, the desired functionality is that a draft edition should be previewable from another draft edition.

Until now, if the edition was not "linkable" (i.e. not live or about to be published due to it being scheduled), its associated admin link would render as plain text. An admin link is an internal link in the format govuk/admin/.... As a workaround, users had to use draft-origin full public URLs when drafting, and then change them to admin links before publishing.

These changes ensure we manipulate an admin link so that it serves the draft origin version if the edition is in draft, and live if the edition has been published.

If the user published a document containing a draft link, the linked draft edition will not get published. Nonetheless, there is now a risk that the draft link will be rendered on the live document where it is embedded, as opposed to rendering as plain text as it used to. The publishers would be required to exercise caution and ensure the correct order of publishing.

Trello card

lauraghiorghisor-tw avatar Jun 28 '24 20:06 lauraghiorghisor-tw