-
Notifications
You must be signed in to change notification settings - Fork 973
CMS springboard tweaks #17326
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
Merged
Merged
CMS springboard tweaks #17326
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # This Source Code Form is subject to the terms of the Mozilla Public | ||
| # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
|
||
| # Generated by Django 5.2.14 on 2026-08-04 18:59 | ||
|
|
||
| import wagtail.admin.forms.choosers | ||
| import wagtail.fields | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('mozorg', '0044_delete_leadershippage_contentmodels'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='homepage', | ||
| name='content', | ||
| field=wagtail.fields.StreamField([('springboard_block', 16), ('donate_block', 33), ('gallery_block', 46), ('showcase_block', 54), ('transition_block', 57)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'help_text': "Optional: Add an ID to make this section linkable (e.g., 'media', 'support').", 'max_length': 100, 'required': False}), 1: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('', 'White'), ('m24-t-dark', 'Dark'), ('m24-t-green', 'Green'), ('m24-t-orange', 'Orange'), ('m24-t-pink', 'Pink'), ('m24-t-gray', 'Gray')], 'help_text': 'What color should the background be?', 'required': False}), 2: ('wagtail.blocks.StructBlock', [[('anchor_id', 0), ('background_color', 1)]], {}), 3: ('bedrock.mozorg.blocks.common.DividerBlock', (), {'label': 'Text'}), 4: ('wagtail.blocks.CharBlock', (), {'help_text': 'Use sentence case.', 'max_length': 255, 'required': False}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Column name, e.g.: Type', 'label': 'Title for column one', 'max_length': 255}), 6: ('wagtail.blocks.CharBlock', (), {'help_text': 'Column name, e.g.: Author(s)', 'label': 'Title for column two', 'max_length': 255}), 7: ('wagtail.blocks.CharBlock', (), {'help_text': 'Column name, e.g.: Topic', 'label': 'Title for column three', 'max_length': 255}), 8: ('wagtail.blocks.CharBlock', (), {'help_text': 'Column name, e.g.: Intro', 'label': 'Title for column four', 'max_length': 255}), 9: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('Article', 'Article'), ('Podcast', 'Podcast'), ('Video', 'Video')], 'required': False}), 10: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('News', 'News'), ('Products', 'Products'), ('Artificial Intelligence', 'Artificial Intelligence'), ('Open Source AI', 'Open Source AI'), ('Privacy & Security', 'Privacy & Security'), ('Data', 'Data')], 'required': False}), 11: ('wagtail.blocks.CharBlock', (), {'char_max_length': 255, 'help_text': 'Author or website name(s)', 'required': False}), 12: ('wagtail.blocks.CharBlock', (), {'char_max_length': 255, 'help_text': 'Short preview of the content', 'required': False}), 13: ('wagtail.blocks.URLBlock', (), {'char_max_length': 255, 'help_text': 'Link to the full content.', 'required': True}), 14: ('wagtail.blocks.StructBlock', [[('type', 9), ('topic', 10), ('author', 11), ('preview', 12), ('url', 13)]], {}), 15: ('wagtail.blocks.ListBlock', (14,), {'min_num': 1}), 16: ('wagtail.blocks.StructBlock', [[('settings', 2), ('text_divider', 3), ('heading', 4), ('column_one', 5), ('column_two', 6), ('column_three', 7), ('column_four', 8), ('springboard_items', 15)]], {}), 17: ('wagtail.blocks.CharBlock', (), {'help_text': 'Use sentence case.', 'max_length': 255}), 18: ('wagtail.blocks.RichTextBlock', (), {'features': ['bold', 'link'], 'help_text': 'Keep this to 2 paragraphs or fewer.'}), 19: ('wagtail.images.blocks.ImageChooserBlock', (), {'help_text': 'Ideal image size is 1400 x 700. Image will be cropped to a 2:1 aspect ratio.'}), 20: ('wagtail.blocks.CharBlock', (), {'help_text': "A concise description of the image for someone who can't see it. See <a href='https://mozmeao.github.io/platform-docs/cms/alt-text/' target='_blank'>alt text guidelines</a> for tips.", 'max_length': 255, 'required': False}), 21: ('wagtail.blocks.CharBlock', (), {'help_text': "Use sentence case (e.g., 'Donate', 'Read more').", 'label': 'Link text', 'max_length': 50}), 22: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('page', 'Page'), ('file', 'File'), ('custom_url', 'Custom URL'), ('email', 'Email'), ('anchor', 'Anchor'), ('phone', 'Phone')], 'classname': 'link_choice_type_selector', 'label': 'Link to', 'required': False}), 23: ('wagtail.blocks.PageChooserBlock', (), {'form_classname': 'page_link', 'label': 'Page', 'required': False}), 24: ('wagtail.documents.blocks.DocumentChooserBlock', (), {'form_classname': 'file_link', 'label': 'File', 'required': False}), 25: ('wagtail.blocks.CharBlock', (), {'form_classname': 'custom_url_link url_field', 'label': 'Custom URL', 'max_length': 300, 'required': False, 'validators': [wagtail.admin.forms.choosers.URLOrAbsolutePathValidator()]}), 26: ('wagtail.blocks.CharBlock', (), {'form_classname': 'anchor_link', 'label': '#', 'max_length': 300, 'required': False}), 27: ('wagtail.blocks.EmailBlock', (), {'required': False}), 28: ('wagtail.blocks.CharBlock', (), {'form_classname': 'phone_link', 'label': 'Phone', 'max_length': 30, 'required': False}), 29: ('wagtail.blocks.BooleanBlock', (), {'form_classname': 'new_window_toggle', 'label': 'Open in new window', 'required': False}), 30: ('wagtail.blocks.StructBlock', [[('link_to', 22), ('page', 23), ('file', 24), ('custom_url', 25), ('anchor', 26), ('email', 27), ('phone', 28), ('new_window', 29)]], {'label': 'Link destination'}), 31: ('wagtail.blocks.CharBlock', (), {'help_text': "Optional: Add an ID to make this section linkable (e.g., 'donate', 'support').", 'max_length': 100, 'required': False}), 32: ('wagtail.blocks.StructBlock', [[('anchor_id', 31), ('background_color', 1)]], {}), 33: ('wagtail.blocks.StructBlock', [[('heading', 17), ('body', 18), ('image', 19), ('image_alt', 20), ('cta_text', 21), ('cta_link', 30), ('settings', 32)]], {}), 34: ('wagtail.blocks.CharBlock', (), {'help_text': "Optional: Add an ID to make this section linkable (e.g., 'news', 'gallery').", 'max_length': 100, 'required': False}), 35: ('wagtail.blocks.StructBlock', [[('anchor_id', 34), ('background_color', 1)]], {}), 36: ('wagtail.blocks.CharBlock', (), {'max_length': 255, 'required': False}), 37: ('wagtail.blocks.RichTextBlock', (), {'features': ['bold', 'link'], 'required': False}), 38: ('wagtail.blocks.TextBlock', (), {'help_text': "Short blurb about what you're linking to.", 'required': False}), 39: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('', 'None'), ('community', 'Community'), ('event', 'Event'), ('impact', 'Impact'), ('partnership', 'Partnership'), ('policy', 'Policy'), ('product', 'Product'), ('program', 'Program'), ('project', 'Project'), ('research', 'Research')], 'required': False}), 40: ('wagtail.images.blocks.ImageChooserBlock', (), {'help_text': 'Upload a 2:1 aspect ratio image at 1400×700px - this is displayed on mobile browsers. Wagtail will crop it for displaying at your chosen aspect ratios for desktop.'}), 41: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('2:1', '2:1 Wide landscape'), ('1:1', '1:1 Square'), ('5:4', '5:4 Landscape'), ('4:5', '4:5 Portrait'), ('2:3', '2:3 Tall portrait')], 'help_text': 'Aspect ratio for the image on desktop. The image will be cropped to fit.'}), 42: ('wagtail.blocks.CharBlock', (), {'help_text': "Use sentence case (e.g., 'Read more', 'Watch now').", 'label': 'Call to action text (optional)', 'max_length': 100, 'required': False}), 43: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('fifth', 'Fifth (20%)'), ('quarter', 'Quarter (25%)'), ('third', 'Third (33%)'), ('half', 'Half (50%)'), ('three-quarters', 'Three-quarters (75%)')], 'help_text': 'Width of the tile in the gallery grid at desktop sizes.'}), 44: ('wagtail.blocks.StructBlock', [[('heading', 17), ('body', 38), ('tag', 39), ('image', 40), ('image_ratio', 41), ('image_alt', 20), ('cta_link', 30), ('cta_text', 42), ('width', 43)]], {}), 45: ('wagtail.blocks.ListBlock', (44,), {'help_text': 'Add gallery tiles. For best results, ensure tile widths add up to 100% per row.', 'min_num': 1}), 46: ('wagtail.blocks.StructBlock', [[('settings', 35), ('heading', 36), ('intro', 37), ('tiles', 45)]], {}), 47: ('wagtail.blocks.CharBlock', (), {'help_text': 'Section heading. Use sentence case.', 'max_length': 255}), 48: ('wagtail.images.blocks.ImageChooserBlock', (), {'help_text': 'Ideal image size is 1376 * 515.'}), 49: ('wagtail.blocks.CharBlock', (), {'help_text': 'Sub heading. Use sentence case.', 'max_length': 255, 'required': False}), 50: ('wagtail.blocks.CharBlock', (), {'help_text': "Use sentence case (e.g., 'Read the report', 'Read more').", 'label': 'Link text', 'max_length': 50, 'required': False}), 51: ('wagtail.blocks.CharBlock', (), {'help_text': "Optional: Add an ID to make this section linkable (e.g., 'showcase', 'support').", 'max_length': 100, 'required': False}), 52: ('wagtail.blocks.BooleanBlock', (), {'default': False, 'help_text': 'Make the title and body content into a two-column layout.', 'inline_form': True, 'label': 'Make it two column layout', 'required': False}), 53: ('wagtail.blocks.StructBlock', [[('anchor_id', 51), ('background_color', 1), ('two_column_layout', 52)]], {}), 54: ('wagtail.blocks.StructBlock', [[('heading', 47), ('body', 18), ('image', 48), ('image_alt', 20), ('sub_heading', 49), ('cta_text', 50), ('cta_link', 30), ('settings', 53)]], {}), 55: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('light', 'White'), ('dark', 'Dark'), ('green', 'Green'), ('orange', 'Orange'), ('pink', 'Pink'), ('gray', 'Gray'), ('dark-alt', 'Dark-Alt')], 'help_text': 'This should match the background color of the previous section'}), 56: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('light', 'White'), ('dark', 'Dark'), ('green', 'Green'), ('orange', 'Orange'), ('pink', 'Pink'), ('gray', 'Gray'), ('dark-alt', 'Dark-Alt')], 'help_text': 'This should match the background color of the next section'}), 57: ('wagtail.blocks.StructBlock', [[('top_color', 55), ('bottom_color', 56)]], {})}, help_text='Add content blocks for the homepage. Blocks will render in the order shown.', null=True), | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Question: are we confident that these two are interchangeable?
iconwas always all-lowercase buttypelooks 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 alreadyThere 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.
The icon function lowercases it 👍