-
Notifications
You must be signed in to change notification settings - Fork 560
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
Update blocks in RecipeStreamBlock
to use ImageBlock
#526
Update blocks in RecipeStreamBlock
to use ImageBlock
#526
Conversation
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.
Looks great from my testing - thanks for picking this up @laymonage ❤️
Couple of minor points, after which I consider this LGTM
"pk": 54, | ||
"fields": { | ||
"collection": 5, | ||
"title": "Hot_cross_buns_(stacked)", |
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.
Bakerydemo image library is so tidy, every image has a pretty title.
(not very representative of the real word though - if the sites I work on quality as 'real world' 😄 )
"title": "Hot_cross_buns_(stacked)", | |
"title": "Hot cross buns (stacked)", |
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.
Also, where did you source this image from?
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.
Wikimedia Commons
@@ -0,0 +1,146 @@ | |||
# Generated by Django 6.0.dev20250116121251 on 2025-02-11 16:44 |
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.
😎
To avoid confusion with Wagtail's new built-in ImageBlock
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.
Thank you!
"pk": 54, | ||
"fields": { | ||
"collection": 5, | ||
"title": "Hot_cross_buns_(stacked)", |
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.
Wikimedia Commons
./manage.py dumpdata --natural-foreign --indent 2 -e auth.permission -e contenttypes -e wagtailcore.GroupCollectionPermission -e wagtailimages.rendition -e sessions -e wagtailsearch.indexentry -e wagtailsearch.sqliteftsindexentry -e wagtailcore.referenceindex -e wagtailcore.pagesubscription > bakerydemo/base/fixtures/bakerydemo.json | ||
prettier --write bakerydemo/base/fixtures/bakerydemo.json | ||
./manage.py dumpdata --natural-foreign --indent 2 -e auth.permission -e contenttypes -e wagtailcore.GroupCollectionPermission -e wagtailimages.rendition -e sessions -e wagtailsearch.indexentry -e wagtailsearch.sqliteftsindexentry -e wagtailcore.referenceindex -e wagtailcore.pagesubscription -e wagtailcore.workflowcontenttype -e wagtailadmin.editingsession > bakerydemo/base/fixtures/bakerydemo.json | ||
npx prettier --write bakerydemo/base/fixtures/bakerydemo.json |
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.
Thank you!
2579782
to
e978840
Compare
Supersedes #492. I opted to leave the existing
BaseStreamBlock.image_block
as-is (aside from renamingImageBlock
toCaptionedImageBlock
). Then, I migrated the blocks inRecipeStreamBlock
to use Wagtail'sImageBlock
. Finally, I added an image block to the Hot Cross Buns page to verify that it works.Unfortunately, this means we don't get to use Wagtail's
ImageBlock
in as many places as possible. I laid out the options in #492 (comment), if you'd like a different approach please let me know!