Skip to content

Add color option to big_number block#1714

Merged
mwvolo merged 1 commit into
mainfrom
big-number-color-config
Jun 26, 2026
Merged

Add color option to big_number block#1714
mwvolo merged 1 commit into
mainfrom
big-number-color-config

Conversation

@mwvolo

@mwvolo mwvolo commented Jun 26, 2026

Copy link
Copy Markdown
Member

What

Re-adds the color option to the big_number StreamField block as a named blue / green / orange ChoiceBlock.

Why

When #1703 turned big-number from a Draftail rich-text feature into a StreamField block, the color option was dropped. The flex-renderer's BigNumberBlock already supports color via a text-${color} CSS class (blue|green|orange), so this restores parity with no renderer change required.

Notes

  • Migration 0181_alter_rootpage_body.py regenerated; makemigrations --check is clean.
  • The color won't render on the live site until the flex-renderer release that registers the big_number block ships (currently the deployed renderer, renderer-1.1.17-rc.2, predates big_number and falls back to a raw <pre> JSON dump). Tracked separately.

🤖 Generated with Claude Code

The color option was dropped when #1703 turned big-number from a
rich-text feature into a StreamField block. Re-add it as a named
blue/green/orange ChoiceBlock, matching the flex-renderer's existing
text-${color} class implementation (no renderer change needed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 26, 2026 19:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores the color option on the big_number StreamField block so authors can select a named brand color (blue/green/orange), aligning the CMS block schema with the flex-renderer’s existing text-${color} styling support.

Changes:

  • Added optional color ChoiceBlock (blue/green/orange) to the big_number StructBlock definition.
  • Regenerated the RootPage.body StreamField migration to persist the updated block schema.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pages/models/constants.py Adds an optional color ChoiceBlock to the big_number block definition used by RootPage.body.
pages/migrations/0181_alter_rootpage_body.py Updates the StreamField schema in the database to include the new big_number.color field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mwvolo
mwvolo merged commit 4bfba37 into main Jun 26, 2026
8 checks passed
@mwvolo
mwvolo deleted the big-number-color-config branch June 26, 2026 19:54
mwvolo added a commit that referenced this pull request Jun 26, 2026
Resolves the duplicate 0181_alter_rootpage_body conflict with main
(#1714). Keeps main's 0181 (big_number color) and renumbers the
content_card StreamField change to 0182, depending on 0181.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants