fix(apollo-react): make canvas icons honor currentColor#765
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR aligns several apollo-react canvas SVG icons with the rest of the icon set by defaulting their color prop to currentColor, so they inherit the ambient text color instead of using hardcoded values or theme tokens. It also updates the Icon Gallery Storybook story to make verifying currentColor behavior easier.
Changes:
- Updated multiple canvas icons to default
colortocurrentColor(instead of hardcoded hex values or foreground tokens). - Updated
AgentIcon’s previously hardcoded accent path to use thecolorprop. - Enhanced the
AllIconsStorybook story with a color control (labeledcurrentColor) that drives the container text color.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/icons/TimelineProgressIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/TimelinePauseIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/LoopIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/HealthScoreIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/FlaskRunIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/ConversationalAgentIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/CodedAgentIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/AutonomousAgentIcon.tsx | Default icon color now inherits via currentColor. |
| packages/apollo-react/src/canvas/icons/AgentIcon.tsx | Default icon color now inherits via currentColor; previously hardcoded path color now uses the color prop. |
| packages/apollo-react/src/canvas/icons/Icons.stories.tsx | Adds a Storybook control to change container color and visually verify currentColor inheritance across icons. |
CalinaCristian
approved these changes
Jun 1, 2026
Default the `color` prop to `currentColor` for canvas icons that were hardcoding a color or a de-emphasized token, so they inherit the ambient text color like the rest of the icon set. Existing callers that pass `color` explicitly are unaffected. Also adds a `currentColor` color control to the Icon Gallery story so the behavior can be verified in Storybook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3c4a040 to
1b4702c
Compare
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.
Summary
Several canvas icons defaulted their
colorprop to a hardcoded hex value or a de-emphasized token instead ofcurrentColor, so they ignored the ambient text color. This makes them consistent with the rest of the icon set by defaulting tocurrentColor.Icons updated:
AgentIcon— wasvar(--color-foreground-de-emp)+ hardcoded#0067DF/whiteon a pathAutonomousAgentIcon,CodedAgentIcon,ConversationalAgentIcon,FlaskRunIcon— werevar(--color-foreground-emp)HealthScoreIcon,LoopIcon— werevar(--color-foreground-de-emp)TimelinePauseIcon— was#526069TimelineProgressIcon— was#0067DFDataTransformIcon— removed the<g style={{ mixBlendMode: 'darken' }}>wrapper that blended the icon with its background and washed out thecurrentColorfillExisting callers that pass
colorexplicitly (e.g. the Scrubber inTimelinePlayerforTimelineProgressIcon) are unaffected.Storybook
Added a
currentColorcolor control to the Icon Gallery (AllIcons) story so the behavior can be verified visually — picking a color updates every icon that honorscurrentColor.Test plan
currentColorcontrol; confirm all icons (including the ones above) recolor.DataTransformIconrenders its color cleanly with no blend-mode washout.TimelinePlayerscrubber still renders with its explicit color.🤖 Generated with Claude Code