-
Notifications
You must be signed in to change notification settings - Fork 1
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-39 Add a new block for textual statistic groups #364
base: integration/2024-evolution
Are you sure you want to change the base?
TWE-39 Add a new block for textual statistic groups #364
Conversation
0c3424d
to
53d5378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1050,11 +1050,21 @@ class Meta: | |||
label_format = "{headline_number} {description} {further_details}" | |||
|
|||
|
|||
class NumericStatisticsGroupBlock(blocks.StructBlock): | |||
class AbstractStatisticsGroupBlock(blocks.StructBlock): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nitpick) I feel like this could be shared by more blocks since an optional title and intro is pretty common, but for now this is fine. :)
{% load wagtailcore_tags wagtailimages_tags %} | ||
<div class="grid__stats-group stats-group"> | ||
{% if value.title %} | ||
{% include "patterns/atoms/motif-heading/motif-heading.html" with heading_level=2 heading=value.title classes="motif-heading motif-heading--two-c motif-heading--static stats-group__heading" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've removed the motif-heading.html file, so we may need to update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch 👍🏻
53d5378
to
875c34b
Compare
Thanks for the review @SharmaineLim ! I also took the liberty to rebase this branch on the latest version of |
Link to Ticket
Description of Changes Made
I've created a new block type that's the textual counterpart of the numerical statistics block, and activated it for the division pages.
As suggested in the ticket, the HTML code for this new block was copy/pasted from the numerical stat block added in #328 (with the path to the template adapted).
How to Test
wagtail-test
)Screenshots
Expand to see more
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library