Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TWE-9 - BE - Featured services block (Division page) #327

Merged

Conversation

SharmaineLim
Copy link
Collaborator

@SharmaineLim SharmaineLim commented Jan 6, 2025

Link to Ticket

Description of Changes Made

This ticket adds a new block for signposting to featured services from the division page.

FE styling was done in #340 and has been merged in. You can view only BE changes by clicking here.

Additional changes

Add an explicit field for accessible link/button text because having a descriptive link text is visually less appealing.

How to Test

  1. Create/Edit a division page.
  2. Try to add a new block in the Body field. You should see "Featured services" as a block.
  3. Adding the "Featured services" block and filling in the required fields should display the new content on the preview.

Screenshots

Division page editor

image

image

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
  • Perfomance 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

<a href="{% pageurl card.page %}" class="button-link button-link--{{ card.card_colour }}">{{ card.link_text }}&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="button-link__arrow" %}<span class="sr-only"> about {% firstof card.heading card.page.title %} division</span></a>
<a href="{% pageurl card.page %}"
class="button-link button-link--{{ card.card_colour }}"
{% if card.accessible_link_text %}aria-label="{{ card.accessible_link_text }}"{% endif %}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@helenb @albinazs What are your thoughts on me adding a new field explicitly for accessible link text?

I tried having a descriptive link_text (i.e. "Read more on out charity services") on staging but it doesn't look great, and appending {{ link_text }} about {{ heading }} division can get a bit clunky depending on the content of link_text.

@SharmaineLim SharmaineLim marked this pull request as ready for review January 6, 2025 08:54
@SharmaineLim SharmaineLim requested a review from ababic January 6, 2025 08:54
@shyusu4 shyusu4 mentioned this pull request Jan 13, 2025
31 tasks
Base automatically changed from feature/twe-7-division-page to integration/2024-evolution January 15, 2025 07:22
@SharmaineLim SharmaineLim force-pushed the feature/twe-9-featured-services branch from 4c32b0c to 6335201 Compare January 15, 2025 07:44
@SharmaineLim SharmaineLim removed the request for review from ababic January 15, 2025 07:46
@SharmaineLim SharmaineLim merged commit 31ee0ae into integration/2024-evolution Jan 20, 2025
4 checks passed
@SharmaineLim SharmaineLim deleted the feature/twe-9-featured-services branch January 20, 2025 07:14
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