Skip to content

Render contacts (WHIT-2390)#3543

Draft
ChrisBAshton wants to merge 2 commits intomainfrom
render-contacts
Draft

Render contacts (WHIT-2390)#3543
ChrisBAshton wants to merge 2 commits intomainfrom
render-contacts

Conversation

@ChrisBAshton
Copy link
Copy Markdown
Contributor

@ChrisBAshton ChrisBAshton commented Aug 21, 2025

Sister PR: alphagov/whitehall#10583

JIRA: https://gov-uk.atlassian.net/browse/WHIT-2390


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the publishing platform team. Please let us know in #govuk-publishing-platform when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

We want to receive GovSpeak so that we can do the Contact rendering
in Publishing API, rather than rely on Whitehall to do it.
- The contact 'expanded link' is now being sent to Publishing API
  from Whitehall
- Publishing API will (via GovSpeak) render the embedded Contact
  provided a `contacts` array is passed to the `Govspeak::Document`
  call as per https://github.com/alphagov/govspeak/blob/015d1e37580d51ca17cc708f35bbde8b197a1142/test/govspeak_contacts_test.rb#L98
- We've successfully tested rendering a hardcoded Contact link
  (commented out in this commit), and now need to figure out how
  to fetch the Contact dynamically instead.

Testing locally with:

```
presenter = Presenters::EditionPresenter.new(Document.find_by(content_id: "14eeda85-67bb-48d5-a93d-f4ac8dd173ef").editions.last)
presenter.present
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant