-
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-7 - BE - Division page #324
base: integration/2024-evolution
Are you sure you want to change the base?
TWE-7 - BE - Division page #324
Conversation
factory-boy = "^3.3.0" | ||
faker = "^24.11.0" |
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.
Added as explicit dependencies since we use them.
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.
factory-boy is a wagtail-factories dependency, and faker is a factory-boy dependency
Normally we don't make them explicit like this, but happy with 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.
Left a few questions and suggestions. Love the use of factoryboy post generation features.
I am missing the wider project context -- what about the blocks under partner logos ("what we do", "beliefs", "sparks & kindling", "lighting little fires")?
factory-boy = "^3.3.0" | ||
faker = "^24.11.0" |
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.
factory-boy is a wagtail-factories dependency, and faker is a factory-boy dependency
Normally we don't make them explicit like this, but happy with this
static_text = blocks.CharBlock(required=False) | ||
dynamic_text = blocks.ListBlock( | ||
blocks.CharBlock(), | ||
help_text=_( |
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.
question: are we ever going to translate the site? Since the other blocks don't use gettext(_lazy) we should keep it to plain strings for consistency
features=settings.PARAGRAPH_RICH_TEXT_FEATURES, required=False | ||
) | ||
small_caption = blocks.RichTextBlock( | ||
features=settings.PARAGRAPH_RICH_TEXT_FEATURES, required=False |
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.
note to self: see example with caption / small caption.
question: would these not be better as description
and short_note
? (naming is hard!)
|
||
static_text = fake.sentence() | ||
|
||
@factory.post_generation |
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.
praise: nice use of factory boy features
@@ -0,0 +1,2 @@ | |||
|
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.
{% for block in value %} | ||
{% include_block block with unique_id=block.id %} | ||
{% endfor %} | ||
{% endif %} |
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.
question: should we not just use templates/patterns/molecules/streamfield/stream_block.html
for all Streamfields?
I see a number of templates with the same content. It may well be it is a project convention
Link to Ticket
Description of Changes Made
Equivalent designs for blocks
Dynamic hero block
Introduction section block
Four photo collage block
Other changes:
PartnersBlock
fromservices.blocks
tocore.blocks
so we can reuse it.HomePageFactory
andStandardPageFactory
unit tests with one unit test that checks that all pages have a factory.How to Test
Screenshots
Editor
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library