fix(widget): inherit token icon wrapper dimensions#553
Conversation
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.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ 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); | ||
| }); |
There was a problem hiding this comment.
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.
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.
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
tokenLogoHwsize on the innerimg, so host CSS that resizes[data-rk="token-logo"]keeps square icons.TokenIconImagestill appliestokenLogoHwon the wrapper;imgPropsnow usehw: "full". A regression test asserts a 24px host override sizes both wrapper and image.Reviewed by Cursor Bugbot for commit d467df7. Configure here.