Skip to content

fix(widget): inherit token icon wrapper dimensions#553

Merged
Philippoes merged 1 commit into
mainfrom
fix/token-icon-host-sizing
Jul 21, 2026
Merged

fix(widget): inherit token icon wrapper dimensions#553
Philippoes merged 1 commit into
mainfrom
fix/token-icon-host-sizing

Conversation

@petar-omni

@petar-omni petar-omni commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Keep token images sized relative to their wrapper so host overrides preserve square assets.

Add regression coverage for a 24px host-provided token logo size.

Added

Description of new functionality, feature, or content that has been added in this pull request.

Changed

Description of the modifications made to existing functionality, feature, or content in this pull request. This could include changes to code, CI, documentation, etc.


Note

Low Risk
Localized widget UI sizing change with unit test coverage; no auth, data, or API impact.

Overview
Token logos now fill their wrapper instead of duplicating the tokenLogoHw size on the inner img, so host CSS that resizes [data-rk="token-logo"] keeps square icons.

TokenIconImage still applies tokenLogoHw on the wrapper; imgProps now use hw: "full". A regression test asserts a 24px host override sizes both wrapper and image.

Reviewed by Cursor Bugbot for commit d467df7. Configure here.

Keep token images sized relative to their wrapper so host overrides preserve square assets.

Add regression coverage for a 24px host-provided token logo size.
@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-553.df4xyoi0xyeak.amplifyapp.com

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-553.d2ribjy8evqo6h.amplifyapp.com

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d467df7. Configure here.

expect(wrapper?.getBoundingClientRect().height).toBe(24);
expect(image?.getBoundingClientRect().width).toBe(24);
expect(image?.getBoundingClientRect().height).toBe(24);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Regression test skips theme sizing

Medium Severity

The new host-override case renders TokenIconImage without a theme root, so sprinkle space vars never resolve. hw: "full" therefore does not become 100%, and the image size checks do not validate wrapper inheritance—the behavior this PR is meant to lock in.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d467df7. Configure here.

@cursor cursor Bot 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.

Risk: low. Not approving: Cursor Bugbot finished with status skipping and reported one unresolved test-coverage finding. Assigned reviewers for human review.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested a review from samuelmattjohnston July 21, 2026 12:45
@Philippoes
Philippoes merged commit 326156f into main Jul 21, 2026
10 checks passed
@Philippoes
Philippoes deleted the fix/token-icon-host-sizing branch July 21, 2026 14:46
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