fix: error icon ignores color prop due to hardcoded svg fill (TSA-662)#31454
Draft
xavier-brochard wants to merge 1 commit into
Draft
fix: error icon ignores color prop due to hardcoded svg fill (TSA-662)#31454xavier-brochard wants to merge 1 commit into
xavier-brochard wants to merge 1 commit into
Conversation
The error.svg icon asset hardcoded fill="#121314" on its path, which overrode the currentColor-based color passed by the Icon component. This made IconName.Error render black everywhere, including the Quick Buy failure toast (TSA-662) which passes theme.colors.error.default. Remove the hardcoded fill and the root fill="none"/width/height attributes so error.svg matches the structure of the other 283 icon assets and inherits the color from the Icon component. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Quick Buy failure toast (e.g. "Couldn't sell USDC") showed its leading icon in black instead of the error color. The toast code correctly passes
iconColor: theme.colors.error.default, but the shared icon assetapp/component-library/components/Icons/Icon/assets/error.svghardcodedfill="#121314"on its path, which overrides thecurrentColormechanism theIconcomponent relies on. As a resultIconName.Erroralways rendered near-black at every call site (~24 across the app), regardless of the color passed.This PR removes the hardcoded fill (and the non-standard root
fill/width/heightattributes) soerror.svgmatches the structure of the other 283 icon assets and inherits the color passed toIcon. Among all icon assets onlyerror.svgandhash-tag.svghad hardcoded hex fills;hash-tag.svgis left untouched as out of scope.Note for reviewers: this restores the intended color at every
IconName.Errorusage app-wide, so visual diffs extend beyond the Quick Buy toast.Jira: TSA-662
Changelog
CHANGELOG entry: Fixed error icons rendering black instead of the error color (e.g. in the Quick Buy failure toast)
Related issues
Fixes: TSA-662
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist