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

Update BuyersGuideCallToAction with LinkBlock #12630

Merged
merged 23 commits into from
Sep 3, 2024

Conversation

danielfmiranda
Copy link
Collaborator

@danielfmiranda danielfmiranda commented Jul 18, 2024

Description

Related PRs/issues: TP1-833

This PR updates the BuyersGuideCallToAction model by replacing the link_label, link_target_page, and link_target_url fields, with a new link field that uses the LinkBlock as a streamfield.

Additionally, this PR includes the necessary migration files to introduce the new field, transfer existing data, and remove the old fields. HTML templates have also been updated to reflect this change, as well as the streamfield provider, and any wagtail hooks used to render the list view data in https://foundation.mozilla.org/cms/snippets/wagtailpages/buyersguidecalltoaction/.

Lastly, since we are no longer preforming custom validation for the old fields in the clean method, we removed the file that tested out that custom validation logic 👍 the validation is now all preformed within the linkblock, which already has a corresponding test file.

Screenshots

CMS (Before):

Screenshot 2024-07-19 at 10-33-22 Editing Buyers Guide Call To Action - We all love the web  Join Mozilla in defending it  - Wagtail

CMS list view (Before)

Screenshot 2024-07-19 at 10-39-43 Snippets Buyers Guide Call To Actions - Wagtail

Frontend (Before):

Screenshot 2024-07-19 at 10 34 24 AM

CMS (After):

Screenshot 2024-07-19 at 10-37-14 Editing Buyers Guide Call To Action - We all love the web  Join Mozilla in defending it  - Wagtail

CMS List view (After):

Screenshot 2024-07-19 at 10-40-01 Snippets Buyers Guide Call To Actions - Wagtail

Frontend (After):

Screenshot 2024-07-19 at 10 37 55 AM

┆Issue is synchronized with this Jira Story

@danielfmiranda danielfmiranda marked this pull request as ready for review July 19, 2024 00:10
@danielfmiranda danielfmiranda removed the request for review from robdivincenzo July 23, 2024 01:09
Copy link
Collaborator

@robdivincenzo robdivincenzo left a comment

Choose a reason for hiding this comment

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

LGTM! Worked well w/ staging data and factory generated new link field just fine. Cleaned up the model quite a bit 🔥

@danielfmiranda danielfmiranda merged commit f1ede5b into main Sep 3, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants