Skip to content

Conversation

@dchukhin
Copy link
Collaborator

@dchukhin dchukhin commented Oct 17, 2025

If this changeset needs to go into the FXC codebase, please add the WMO and FXC label.

This pull request depends on #16814, which should be reviewed first

One-line summary

This pull request makes the advertising sub-navigation editable through Wagtail.

Significant changes and points to review

Following the work in #16814, this pull request adds

  • a NavigationLinkBlock with the fields necessary for navigation links (types of links are: 1. a block on the Advertising index page, 2. an internal page, 3. an external link)
  • a sub_navigation streamfield to AdvertisingIndexPage, so users can create multiple items in the sub-navigation
  • validation for the AdvertisingIndexPage, verifying that subnavigation items are valid (can't choose a non-existent block, can't remove a block that's being used as a link, etc.)
  • updates templates, so that all children of the Advertising index page inherit the same sub-navigation

Also, the following changes from #16848 have been merged into this branch:

  • the ContentSubpage as a child of AdvertisingIndexPage
  • a few more blocks that support creating the 'Solutions' and 'Impact' pages:
    • StatisticCalloutBlock and StatisticBlock
    • FeatureListWithModalsBlock, FeatureItemWithModalBlock, and FigureBlock

Also, the following changes from #16860 have been merged into this branch:

  • the structure of AdvertisingIndexPage and ContentSubpage now more closely match the pattern used on springfield by nesting the existing content data inside of a sections field:
    • a sections field is a streamfield of SectionBlocks
    • each SectionBlock has a content streamblock that can have any of the blocks previously in the AdvertisingIndexPage and ContentSubpage content field
    • each SectionBlock also has a collapsed settings, which can set the section id, whether the section should have a divider on top (moved here from the nested blocks), and whether the section should have a dark background (moved here from the nested blocks)

Issue / Bugzilla link

WT-334

Testing

To test locally, go to Wagtail and create/edit an "Advertising index page" page in the page tree, and create a sub-navigation in the "Settings" panel. Try to make the sub-navigation identical to what is on http://localhost:8000/en-US/advertising/. Also, verify that the same sub-navigation exists on all children of the Advertising index page.

dchukhin and others added 15 commits October 17, 2025 13:03
Bumps the frontend group with 3 updates: [@sentry/browser](https://github.com/getsentry/sentry-javascript), [caniuse-lite](https://github.com/browserslist/caniuse-lite) and [webpack](https://github.com/webpack/webpack).


Updates `@sentry/browser` from 10.12.0 to 10.17.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@10.12.0...10.17.0)

Updates `caniuse-lite` from 1.0.30001743 to 1.0.30001746
- [Commits](browserslist/caniuse-lite@1.0.30001743...1.0.30001746)

Updates `webpack` from 5.101.3 to 5.102.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.101.3...v5.102.0)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-version: 10.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend
- dependency-name: caniuse-lite
  dependency-version: 1.0.30001746
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend
- dependency-name: webpack
  dependency-version: 5.102.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add mozfest block to homepage

* Add responsive images

* Add alt for image

* Update l10n/en/mozorg/home-m24.ftl

---------

Co-authored-by: Stephanie Hobson <[email protected]>
@dchukhin dchukhin requested review from a team as code owners October 17, 2025 18:39
@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 85.09615% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.33%. Comparing base (df2d9d7) to head (be1f099).

Files with missing lines Patch % Lines
bedrock/mozorg/views.py 37.50% 10 Missing ⚠️
bedrock/mozorg/blocks/advertising.py 90.42% 9 Missing ⚠️
bedrock/mozorg/blocks/navigation.py 68.96% 9 Missing ⚠️
bedrock/mozorg/models.py 95.58% 3 Missing ⚠️
Additional details and impacted files
@@                                Coverage Diff                                @@
##           WT-334-cms-components-for-advertising-subpage   #16815      +/-   ##
=================================================================================
+ Coverage                                          80.24%   80.33%   +0.09%     
=================================================================================
  Files                                                162      163       +1     
  Lines                                               8914     9094     +180     
=================================================================================
+ Hits                                                7153     7306     +153     
- Misses                                              1761     1788      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stephaniehobson stephaniehobson added Needs Review Awaiting code review Frontend HTML, CSS, JS... client side stuff Wagtail Development related to our use of Wagtail CMS labels Oct 20, 2025
Copy link
Collaborator

@kkellydesign kkellydesign left a comment

Choose a reason for hiding this comment

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

  • Remove "Available anchors will be shown when you save." from the help text on "Section Anchor"
  • The Link UI should be consistent with how we're doing it on springfield, and we'll end up using the pattern elsewhere too. The screenshot below is how we're doing it there. Let me know if this doesn't work:
    • Remove the "link type" dropdown, as we can handle the toggling with template conditionals. If they want "link to section on advertising page", then they can choose that page from the page chooser, and then add the anchor.
    • Make the order of the fields Link Text / Internal Page / External URL / Section Anchor / Has Button
    • Change the labels to match Mariana's, below.
Screenshot 2025-10-22 at 2 54 41 PM

@kkellydesign kkellydesign requested review from janbrasna and stevejalim and removed request for janbrasna November 23, 2025 20:46


@require_safe
def contact(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

This page still appears to be inert in terms of handling form submissions

FieldPanel("linkedin_link", heading="Linkedin Link"),
FieldPanel("tiktok_link", heading="Tiktok Link"),
FieldPanel("spotify_link", heading="Spotify Link"),
FieldPanel("twitter_link", heading="Twitter Link"),
Copy link
Contributor

Choose a reason for hiding this comment

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

As per prev comment about Twitter links in general, plus naming of the site

max_length=255,
blank=True,
)
twitter_link = models.URLField(
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in an earlier PR, I'm not sure we use Twitter any more. Also if we do, it's no longer called by that name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend HTML, CSS, JS... client side stuff Needs Review Awaiting code review Wagtail Development related to our use of Wagtail CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants