Skip to content

fix(GradientBlock): show colour codes on initial render - #1501

Merged
peter-tudosa merged 1 commit into
mainfrom
gcm-671-gradient-block-colour-codes-disappear-after-page-reload
Oct 6, 2026
Merged

peter-tudosa merged 1 commit into
mainfrom
gcm-671-gradient-block-colour-codes-disappear-after-page-reload

Conversation

@peter-tudosa

@peter-tudosa peter-tudosa commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Main Changes

  • Manifest: no settings are required, fixing saving a newly added gradient block
  • the color badges weren't showing on first render because they were gated on a ref that is null during that render, and nothing re-rendered the block after the ref was assigned

Details

  • Colour codes and labels now show on first load in view mode (width was read from a ref during render)
  • Last badge no longer hangs outside the block; overflow is measured after layout
  • Badge layout is derived with useMemo and no longer mutates the block settings
  • parseGradientColorsToCss no longer sorts the settings array in place
  • New shared useElementWidth hook
  • Release entry for gradient-block

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@peter-tudosa
peter-tudosa marked this pull request as ready for review October 6, 2026 10:00
@peter-tudosa
peter-tudosa requested a review from a team as a code owner October 6, 2026 10:00
@peter-tudosa
peter-tudosa merged commit 1c06e1c into main Oct 6, 2026
16 checks passed
@peter-tudosa
peter-tudosa deleted the gcm-671-gradient-block-colour-codes-disappear-after-page-reload branch October 6, 2026 11:04
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