Skip to content

fix(icon): stabilize fallback rendering (mount flash, layout shift, spinner)#1122

Open
JeanMarcMilletScality wants to merge 5 commits into
development/1.0from
improvement/icon-fallback-rendering
Open

fix(icon): stabilize fallback rendering (mount flash, layout shift, spinner)#1122
JeanMarcMilletScality wants to merge 5 commits into
development/1.0from
improvement/icon-fallback-rendering

Conversation

@JeanMarcMilletScality
Copy link
Copy Markdown
Contributor

Split out of #1120, which mixed unrelated table, icon, and storybook changes. This PR contains only the Icon work.

Changes

  • Seed cached icon synchronously to avoid a mount flash
  • Reserve the icon box in the delayed fallback to avoid layout shift
  • Scale the fallback spinner with size instead of a fixed px value
  • Keep the fallback spinner purple (Loader default color)
  • Add stories for fallback box reservation and loader-in-box

Files

  • src/lib/components/icon/Icon.component.tsx
  • stories/icon.stories.tsx

Verification

npm run build-storybook completes successfully (exit 0).

Note: this branch's own build-storybook check will fail until #1121 (guideline RadioGroup import fix) merges into development/1.0 — that break is inherited from the base branch, not introduced here. Verified locally by building with #1121's fix applied.

🤖 Generated with Claude Code

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Jun 1, 2026

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Jun 1, 2026

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality JeanMarcMilletScality force-pushed the improvement/icon-fallback-rendering branch from f28d9d7 to e063c8f Compare June 1, 2026 14:52
JeanMarcMilletScality and others added 5 commits June 1, 2026 18:43
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nstant

Addresses review feedback:
- When `name` changes on a mounted Icon to an icon that isn't cached yet, reset
  `icon` to undefined so the reserved fallback shows instead of the previous
  glyph while the dynamic import resolves.
- Extract the fallback spinner color into a named LOADER_SPINNER_COLOR constant
  (mirrors the <Loader> default) instead of an inline magic hex.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JeanMarcMilletScality JeanMarcMilletScality force-pushed the improvement/icon-fallback-rendering branch from bfd6732 to e270b79 Compare June 1, 2026 16:44
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