Skip to content

Conversation

@pezholio
Copy link
Contributor

@pezholio pezholio commented Oct 8, 2025

⚠️ DO NOT MERGE ⚠️

This is a proof of concept to demonstrate how we might use content blocks within the context of smart answers for Pensions. Rather than relying on the values in the YAML file (which needs changing each uprating cycle), we fetch the latest value from the Publishing API.

A couple of things to consider:

  • How would we cache this value? Ideally we wouldn't want to fetch the value each time, but equally, we'd want to guarantee the new value is available at time of publication
  • The way we fetch pensions and rates is a bit brittle, and relies on the naming being identical across environments - should these be stored in environment variables? Or should there be a tighter integration between Smart Answers and Content Block Manager?
  • How would previewing rates work? At the moment, when values are changes in the Smart Answers repo, we spin up a new app in Heroku, but with the values being live, how would this work?
  • Publishing API doesn't have a public HTTP endpoint, so this won't work in the Heroku review apps. How do we address this?

Again, this is not production ready, but I'd like to spin it up in integration and see how it works.

@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 08:29 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 3b142ec to 5b5cc44 Compare October 8, 2025 08:33
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 08:33 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 5b5cc44 to 8474b04 Compare October 8, 2025 08:50
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 08:50 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 8474b04 to 0fb81ac Compare October 8, 2025 08:51
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 08:52 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 0fb81ac to 8aefdc3 Compare October 8, 2025 10:25
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 10:25 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 8aefdc3 to 304eda5 Compare October 8, 2025 10:38
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 8, 2025 10:38 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 304eda5 to d48ded9 Compare October 13, 2025 09:56
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 13, 2025 09:56 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from d48ded9 to f9f21b8 Compare October 14, 2025 13:07
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 14, 2025 13:07 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from f9f21b8 to 2b89d2c Compare October 23, 2025 11:32
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 23, 2025 11:32 Inactive
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 2b89d2c to 9d4cfd7 Compare October 23, 2025 13:07
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 October 23, 2025 13:07 Inactive
We’ll need this to fetch content blocks using their embed codes.
This fetches all the files associated with a flow, reads the content
of those files, and checks if any content blocks embed codes have
been used in them. If they have, we return the content blocks in
question. In the next commit, we’ll use these to create links when
publishing smart answers in Publishing API.
This allows us to send the content IDs of any content blocks that are
used in a smart answer as links, so Content Block Manager knows that
the blocks are used in a particular Smart Answer.
@pezholio pezholio force-pushed the CM-536-content-block-discovery branch from 9d4cfd7 to 64c0d60 Compare November 11, 2025 15:00
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7347 November 11, 2025 15:00 Inactive
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.

3 participants