Repository navigation
Add subtitle to the homepage intro section block - #4881
Merged
Merged
Conversation
Editors can now set an optional text in "Homepage: Intro section" that renders below the main title on the frontend. The block defaults the new field to "" so intro sections saved before it existed resolve to an empty string instead of None, which would otherwise null the whole cmsPage query. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015yeTaR1pEMyPygtSpbCDEa
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds an optional Subtitle field to the "Homepage: Intro section" CMS block. When it's set, the frontend shows it under the main title. It uses the same
Heading size={2}style that Text Section uses for its subtitle. An empty subtitle renders nothing.subtitle = CharBlock(required=False, default=""), plus migrationpage/0009_alter_genericpage_bodyHomeIntroSection.subtitle: String!(schema.graphqlupdated)blocks.graphqlfragment requestssubtitle, andhome-intro-section.tsxrenders itWhy
default="": intro sections saved before this change don't have the key. Without a default, Wagtail fills it withNone, the non-null field fails, and the wholecmsPagequery returnsnull. That would break the homepage until an editor re-saves the block.test_home_intro_section_subtitlecovers a block with a subtitle and an older block without one. It fails if the default is removed.ToDo
frontend-lintcheck. Its codegen step validates fragments againstpastaporto-admin.pycon.it, so it fails on the newsubtitlefield until that schema has it.Generated by Claude Code