Skip to content

Conversation

bmispelon
Copy link
Collaborator

@bmispelon bmispelon commented Apr 14, 2025

Link to Ticket

Description of Changes Made

This PR adds a PromoBlock to the ServiceAreaPage page type. Unlike the core PromoBlock, this custom one doesn't require the editor to provide a link_text or a link_button. Note however that if a link_text is provided, then link_button is required.

How to Test

  1. Create (or edit) a ServiceAreaPage
  2. In the body field, add a "Promo" block
  3. Observe that neither "Link text" nor "Link Button" are marked as required
  4. Publish the page and view it
  5. See that the promo block is visible, but it has no button

Screenshots

The admin side:

Screenshot 2025-04-14 at 11-57-32 Editing Service area page Advocacy Engagement   Income - Wagtail

The resulting page

Screenshot 2025-04-14 at 11-57-08 Advocacy Engagement   Income Torchbox

MR Checklist

  • Add a description of your pull request and instructions for the reviewer to verify your work.
  • If your pull request is for a specific ticket, link to it in the description.
  • Stay on point and keep it small so the merge request can be easily reviewed.
  • Tests and linting passes.

Unit tests

  • Added
  • Not required

Documentation

Browser testing

  • I have tested in the following browsers and environments (edit the list as required)
    • Latest version of Chrome on mac
    • Latest version of Firefox on mac
    • Latest version of Safari on mac
    • Safari on last two versions of iOS
    • Chrome on last two versions of Android
  • Not required

Data protection

  • Not relevant
  • This adds new sources of PII and documents it and modifies Birdbath processors accordingly

Light and dark mode

  • I have tested the changes in both light and dark mode
  • The change is not relevant to dark and light mode

Accessibility

  • Automated WCAG 2.1 tests pass
  • HTML validation passes
  • Manual WCAG 2.1 tests completed
  • I have tested in a screen reader
  • I have tested in high-contrast mode
  • Any animations removed for prefers-reduced-motion
  • Not required

Sustainability

  • Images are optimised and lazy-loading used where appropriate
  • SVGs have been optimised
  • Performance and transfer of data considered
  • If JavaScript is needed alternatives have been considered
  • Not required

Pattern library

  • The pattern library component for this template displays correctly, and does not break parent templates
  • The styleguide is updated if relevant
  • Changes are not relevant the pattern library

@bmispelon bmispelon marked this pull request as ready for review April 14, 2025 10:21
@bmispelon bmispelon requested a review from SharmaineLim April 14, 2025 10:22
Copy link
Collaborator

@SharmaineLim SharmaineLim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :)

@bmispelon bmispelon force-pushed the TWE-62-as-an-editor-i-want-the-ability-to-add-a-promo-block-to-the-service-area-pages branch from bb03fa3 to c3a89f2 Compare April 15, 2025 13:47
@bmispelon bmispelon merged commit 4b22e7e into main Apr 15, 2025
4 checks passed
@bmispelon bmispelon deleted the TWE-62-as-an-editor-i-want-the-ability-to-add-a-promo-block-to-the-service-area-pages branch April 15, 2025 15:45
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.

2 participants