Skip to content

bugfix(icon): keep IconWrapper circular under flex pressure (CUI-39) - #1183

Merged
bert-e merged 1 commit into
development/1.0from
bugfix/CUI-39-iconwrapper-flex-shrink
Aug 13, 2026
Merged

bugfix(icon): keep IconWrapper circular under flex pressure (CUI-39)#1183
bert-e merged 1 commit into
development/1.0from
bugfix/CUI-39-iconwrapper-flex-shrink

Conversation

@JeanMarcMilletScality

@JeanMarcMilletScality JeanMarcMilletScality commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

TL;DR — A wrapped Icon no longer squashes into an ellipse when its flex container runs out of room.

Context / Why

IconWrapper sets a fixed rem square per size with a 1px border and no flex-shrink, so as a flex item under pressure the browser shrinks its width only and the bordered circle deforms. Visible on the ARTESCA certificates page header below ~700px. CUI-39

🧩 Approach

flex-shrink: 0 on IconWrapper. Verified in a real browser with a control, squeezing the container from 400px to 150px:

IconWrapper at 400px squeezed to 150px circular?
flex-shrink: 0 (this PR) 60.78 × 60.78 60.78 × 60.78
flex-shrink: 1 (before) 60.78 × 60.78 38.73 × 60.78 ❌ ellipse

The fix only prevents shrinking, so nothing that rendered correctly before can change — an already-square wrapper stays exactly as it was.

📷 Screenshots

🔍 Review focus

  • Minorsrc/lib/components/icon/Icon.component.tsx › IconWrapper — one declaration. It can only stop the wrapper from shrinking below its fixed square; the trade-off is that a very narrow flex container now overflows rather than deforming the icon, which is the intended behaviour for a bordered circle.

🧪 How to test

  1. npm run storybookComponents/Icon › Wrapped icon stays circular when squeezed.
  2. Drag the dashed box's bottom-right handle to squeeze the row down to ~150px.
  3. The bordered circle must keep its shape — the text next to it wraps or clips instead. Before this change it flattened into an ellipse.
  4. Sanity check Components/Icon › Size: wrapped icons at rest are unchanged.

🚧 Follow-up

  • After merge + npm release, bump @scality/core-ui in artesca/@artesca/ui/package.json directly (@artesca/ui is built in-repo — not integrate-components, not solutions/*/variable.mk), which unblocks the ARTESCA certificates responsive ticket.

🔗 References

  • CUI-39 — IconWrapper distorts into an ellipse under flex pressure.
  • CUI-38 — sibling core-ui change from the same ARTESCA responsive handoff (self-orienting Stack separator). Kept in a separate PR because it needs design sign-off; this one doesn't, so it can merge and release independently.
What changed

src/lib/components/icon/Icon.component.tsxflex-shrink: 0 on IconWrapper, with a comment recording why (the width/height above it are a fixed square).

stories/icon.stories.tsx — adds StaysCircularUnderFlexPressure, a resizable flex row so the regression is reproducible by hand.

No API surface change: no prop added, removed or retyped. npx tsc --noEmit clean; related Jest tests green (200 passed / 24 suites).

IconWrapper sets a fixed square width/height per size with a 1px border and no
flex-shrink, so as a flex item under pressure it shrinks on the width axis only
and the bordered circle deforms into an ellipse — visible on the ARTESCA
certificates page header below ~700px.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bert-e

bert-e commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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.
/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

bert-e commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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:

@sanassicisse sanassicisse left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, tried it in the storybook

@JeanMarcMilletScality

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.0

Please check the status of the associated issue CUI-39.

Goodbye jeanmarcmilletscality.

The following options are set: approve

@bert-e
bert-e merged commit b442753 into development/1.0 Aug 13, 2026
8 checks passed
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.

3 participants