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-11 - BE - Service area page #335

Merged

Conversation

SharmaineLim
Copy link
Collaborator

@SharmaineLim SharmaineLim commented Jan 10, 2025

Link to Ticket | Built on top of #324

Description of Changes Made

  • Add the new Service area page BE, which reuses the existing block "Four photo collage block" from Division Page.
  • Create the DivisionMixin which associates a page to a Division Page.
    • You can set the division to use within the Promote tab (if the field is made available in the page editor).
    • If the division field is not set, get the division from the closest ancestor that either:
      • has the division field populated, OR
      • the ancestor is a Division Page.
    • This mixin will be used later with pages like service pages, blog pages, etc.

I skipped making a stream_block_{page}.html (example) for this page because I'm not quite sure what the point of that is. It looks like an unnecessary extra step when I can access service_area_story_container.html directly.

How to Test

  1. Add a child page to a division page
  2. Create a service area page
  3. Populate the fields and save

Screenshots

Service area page editor

image

Promote tab

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
    • in the form of a factory with a unit test + DivisionMixin tests
  • 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

@SharmaineLim SharmaineLim force-pushed the feature/twe-11-service-area-page branch from 6d2d37f to c7116a0 Compare January 10, 2025 07:18
@SharmaineLim SharmaineLim marked this pull request as ready for review January 10, 2025 07:19
Copy link
Member

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

Most bits are straighforward so no complaints other than the missing promote_panel.

The two fundamental questions:

  1. why not group division relevant content under its DivisionPage?
    • will there be content that is cross-division (or relevant to 2+ divisions)? if so, is the FK enough?
  2. what is the difference between a service page and a service area page?

tbx/services/models.py Show resolved Hide resolved
docs/custom-features/divisions.md Show resolved Hide resolved
tbx/services/models.py Show resolved Hide resolved
@zerolab
Copy link
Member

zerolab commented Jan 10, 2025

I take it the icon + text block

Screenshot 2025-01-10 at 16 09 06

is #336 ? and the service links block #337?

@SharmaineLim SharmaineLim mentioned this pull request Jan 13, 2025
31 tasks
@SharmaineLim
Copy link
Collaborator Author

I take it the icon + text block

Screenshot 2025-01-10 at 16 09 06

is #336 ? and the service links block #337?

@zerolab Yup!

tbx/core/utils/models.py Outdated Show resolved Hide resolved
Copy link
Member

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

A few of more notes and I think it will be good to go

tbx/core/tests/test_division_mixin.py Outdated Show resolved Hide resolved
tbx/core/utils/models.py Outdated Show resolved Hide resolved
tbx/core/utils/models.py Outdated Show resolved Hide resolved
tbx/services/models.py Show resolved Hide resolved
Base automatically changed from feature/twe-7-division-page to integration/2024-evolution January 15, 2025 07:22
@SharmaineLim SharmaineLim merged commit b8eb618 into integration/2024-evolution Jan 15, 2025
4 checks passed
@SharmaineLim SharmaineLim deleted the feature/twe-11-service-area-page branch January 15, 2025 07:33
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