Skip to content

Homepage banner single preview#7091

Closed
johnnyporkchops wants to merge 6 commits into
developfrom
feature/3842-homepage-banner-preview
Closed

Homepage banner single preview#7091
johnnyporkchops wants to merge 6 commits into
developfrom
feature/3842-homepage-banner-preview

Conversation

@johnnyporkchops
Copy link
Copy Markdown
Contributor

@johnnyporkchops johnnyporkchops commented May 8, 2026

Summary

  • Resolves Wagtail wish list: Previewing banners should only show current banners #3842
  • When previewing banners or alert-banners, show only the banner being edited and any other currently live banners
  • Pair down the homepage preview to just show a partial representation of the homepage with help text on the template
  • Add a convenient PageListingViewset to the Wagtail News and Updates menu to make it easy to see date_active and date_inactive without having to open each for editing.

Required reviewers

one content, one dev

Impacted areas of the application

Preview of Home page banners and alert banners

Screenshots

(Include a screenshot of the new/updated features in context (“in the wild”). If it is an interface change, include both before and after screenshots)

How to test

This branch s pushed to dev (dev.fec.gov/admin) for testing with one live banner published for testing

  • In Wagtail left menu bar, navigate to Pages > Home > Home page Banners
  • Create a child page of type Home page banner announcement or Alert for emergency use only (Or edit an existing banner)
    • Preview the banner in Wagtail
    • Please read the help text in green at the top of the preview page and let me know if it could be improved for clarity
    • Verify that you only see the banner you are editing and any other banner(s) live on the homepage
  • Adjust the position (order) of the banner being edited among other live banners shown by changing the date_active and saving draft
  • Try the above with an Alert for emergency use only banner
  • See the alternate homepage banner listing in the News and Updates menu on the left Wagtail menu bar
    • If you choose the button, + Add home page banner announcement here, you must choose a parent page of home > Home page Banners, then click Create a new home page banner announcement at the bottom
    • Please note: I am aware that the process of choosing a parent is cumbersome and created the possibility that an editor will choose the wrong parent-- I am working on a way to force the parent

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 58.06452% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.92%. Comparing base (9d983b8) to head (611260d).

Files with missing lines Patch % Lines
fec/home/templatetags/home_page.py 40.00% 12 Missing ⚠️
fec/home/wagtail_hooks.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7091      +/-   ##
===========================================
- Coverage    78.97%   78.92%   -0.06%     
===========================================
  Files          255      255              
  Lines         6674     6699      +25     
===========================================
+ Hits          5271     5287      +16     
- Misses        1403     1412       +9     

☔ 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.

@kathycarothers
Copy link
Copy Markdown
Contributor

@johnnyporkchops I went in and edited the banner (system maintenance) from December 4, 2025. I changed the date to May 9. In the preview, it is still showing December 4.

@johnnyporkchops johnnyporkchops deleted the feature/3842-homepage-banner-preview branch May 11, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Wagtail wish list: Previewing banners should only show current banners

2 participants