CMS springboard tweaks - #17326
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17326 +/- ##
==========================================
- Coverage 82.95% 82.93% -0.02%
==========================================
Files 179 179
Lines 9362 9377 +15
==========================================
+ Hits 7766 7777 +11
- Misses 1596 1600 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| link_attributes=item.preview, | ||
| type=item.type, | ||
| type_icon=item.icon, | ||
| type_icon=item.type, |
There was a problem hiding this comment.
Question: are we confident that these two are interchangeable? icon was always all-lowercase but type looks like it's title case/has a leading capital. Is that handled at template render? The test, below, deliberately downcases to match a string in the HTML, so I am assuming it's handled already
There was a problem hiding this comment.
The icon function lowercases it 👍
There was a problem hiding this comment.
Pull request overview
Updates the CMS springboard editor to derive icons from content type and improve editor labels.
Changes:
- Removes the redundant icon field and derives icons from type.
- Refines CMS choices, help text, and collapsed labels.
- Updates migration, fixtures, factories, and rendering tests.
Reviewed using the repository’s custom guidance. Safe to merge with no identified follow-ups.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bedrock/mozorg/blocks/common.py |
Simplifies springboard fields and editor labels. |
bedrock/mozorg/migrations/0045_alter_homepage_content.py |
Updates the homepage StreamField schema. |
bedrock/mozorg/templates/mozorg/cms/blocks/springboard_block.html |
Uses type for the icon. |
bedrock/mozorg/fixtures/springboard_fixtures.py |
Removes redundant fixture icons. |
bedrock/mozorg/tests/factories.py |
Updates the item factory schema. |
bedrock/mozorg/tests/test_blocks.py |
Verifies type-derived icon classes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
One-line summary
CMS springboard tweaks
Significant changes and points to review
Tweaks to the springboard component based on observations in user training.
Issue / Bugzilla link
n/a
Testing
View/edit the homepage with existing data.