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

Adds carousel text block #11541

Merged

Conversation

kevinhowbrook
Copy link
Contributor

@kevinhowbrook kevinhowbrook commented Dec 13, 2023

Description

This PR adds a new block type, "Carousel and Text block" for use on the mozfest site.

Link to sample test page: http://mozfest.localhost:8000/en/
Related PRs/issues: https://torchbox.monday.com/boards/1334760528/pulses/1336799030

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

Documentation:

  • Is my code documented?
  • Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

@kevinhowbrook kevinhowbrook force-pushed the feature/8001-listing-block-adjustments branch 2 times, most recently from d30d371 to 2a749a6 Compare December 14, 2023 11:05
Base automatically changed from feature/8001-listing-block-adjustments to integration/mozfest-2024 December 14, 2023 11:21
@kevinhowbrook kevinhowbrook force-pushed the feature/9030-text-and-carousel-block branch from d667786 to 7f2afc9 Compare December 14, 2023 11:58
@kevinhowbrook kevinhowbrook marked this pull request as ready for review December 14, 2023 11:58
</div>
</div>
</div>
{% endblock block_content %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again - chris will be doing the FE for this

@kevinhowbrook kevinhowbrook force-pushed the feature/9030-text-and-carousel-block branch 2 times, most recently from 29e72b8 to 9ebe084 Compare December 14, 2023 12:24
Copy link
Collaborator

@tbrlpld tbrlpld left a comment

Choose a reason for hiding this comment

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

Looks good @kevinhowbrook. Just minor questions and suggestions.

# Use specific link fields for the CTA on the block as opposed to the
# common.link_blocks.LabelledExternalLinkBlock so it can be marked as
# required=False.
link_url = blocks.URLBlock(help_text="A CTA URL for a link displayed", required=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no need to internal links / page chooser?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not a requirement at the moment, but we'll see with QA

@@ -53,6 +53,7 @@ class MozfestPrimaryPage(FoundationMetadataPageMixin, FoundationBannerInheritanc
("tabbed_profile_directory", customblocks.TabbedProfileDirectory()),
("newsletter_signup", customblocks.NewsletterSignupBlock()),
("stats_block", mozfest_blocks.StatisticsBlock()),
("carousel_text_block", mozfest_blocks.CarouselTextBlock()),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the existing block names above, what do you think about not including _block in the bock name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that's a good point, honestly couldn't decide but that makes sense, even with the rebase drama it will cause it's worth doing 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, did not know rebase drama would follow 😅

heading = blocks.CharBlock(help_text="Heading for the block.", required=False)

text = blocks.RichTextBlock(features=["bold", "italic", "link"])
carousel_images = blocks.ListBlock(customblocks.ImageBlock(), max_num=4)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick What do you think about grouping the definitions here similar to how they will show? In this case moving the carousel_images below all the other fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 good spot, thanks

@kevinhowbrook kevinhowbrook force-pushed the feature/9030-text-and-carousel-block branch from a6ccca5 to 49a1ec3 Compare December 15, 2023 11:36
@kevinhowbrook kevinhowbrook merged commit be5f3e9 into integration/mozfest-2024 Dec 15, 2023
4 checks passed
@kevinhowbrook kevinhowbrook deleted the feature/9030-text-and-carousel-block branch December 15, 2023 11:51
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