-
Notifications
You must be signed in to change notification settings - Fork 952
WT-334 - Build CMS Components For Advertising Pages - Part 3 #16815
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
base: WT-334-cms-components-for-advertising-subpage
Are you sure you want to change the base?
WT-334 - Build CMS Components For Advertising Pages - Part 3 #16815
Conversation
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]>
…y be a child of AdvertisingIndexPage
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
kkellydesign
left a comment
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.
- 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.
…334-cms-components-for-advertising-sub-navigation
…334-cms-components-for-advertising-sub-navigation
…or-advertising-other-sub-pages
…334-cms-components-for-advertising-sub-navigation
…nto WT-334-cms-components-for-advertising-other-sub-pages
In order to make the experience of editing pages more-closely match Springfield, we nest blocks inside of a SectionBlock.
…334-cms-components-for-advertising-sub-navigation
bedrock/mozorg/views.py
Outdated
|
|
||
|
|
||
| @require_safe | ||
| def contact(request): |
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.
This page still appears to be inert in terms of handling form submissions
bedrock/mozorg/models.py
Outdated
| FieldPanel("linkedin_link", heading="Linkedin Link"), | ||
| FieldPanel("tiktok_link", heading="Tiktok Link"), | ||
| FieldPanel("spotify_link", heading="Spotify Link"), | ||
| FieldPanel("twitter_link", heading="Twitter Link"), |
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.
As per prev comment about Twitter links in general, plus naming of the site
bedrock/mozorg/models.py
Outdated
| max_length=255, | ||
| blank=True, | ||
| ) | ||
| twitter_link = models.URLField( |
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.
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
…334-cms-components-for-advertising-sub-navigation
…334-cms-components-for-advertising-sub-navigation
If this changeset needs to go into the FXC codebase, please add the
WMO and FXClabel.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
NavigationLinkBlockwith 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)sub_navigationstreamfield toAdvertisingIndexPage, so users can create multiple items in the sub-navigationAdvertisingIndexPage, 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.)Also, the following changes from #16848 have been merged into this branch:
ContentSubpageas a child ofAdvertisingIndexPageStatisticCalloutBlockandStatisticBlockFeatureListWithModalsBlock,FeatureItemWithModalBlock, andFigureBlockAlso, the following changes from #16860 have been merged into this branch:
AdvertisingIndexPageandContentSubpagenow more closely match the pattern used on springfield by nesting the existingcontentdata inside of asectionsfield:sectionsfield is a streamfield ofSectionBlocksSectionBlockhas acontentstreamblock that can have any of the blocks previously in theAdvertisingIndexPageandContentSubpagecontentfieldSectionBlockalso 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.