Skip to content

fix(apollo-react): make canvas icons honor currentColor#765

Merged
snuziale merged 1 commit into
mainfrom
fix/icons-honor-currentcolor
Jun 1, 2026
Merged

fix(apollo-react): make canvas icons honor currentColor#765
snuziale merged 1 commit into
mainfrom
fix/icons-honor-currentcolor

Conversation

@snuziale
Copy link
Copy Markdown
Collaborator

@snuziale snuziale commented Jun 1, 2026

Summary

Several canvas icons defaulted their color prop to a hardcoded hex value or a de-emphasized token instead of currentColor, so they ignored the ambient text color. This makes them consistent with the rest of the icon set by defaulting to currentColor.

Icons updated:

  • AgentIcon — was var(--color-foreground-de-emp) + hardcoded #0067DF/white on a path
  • AutonomousAgentIcon, CodedAgentIcon, ConversationalAgentIcon, FlaskRunIcon — were var(--color-foreground-emp)
  • HealthScoreIcon, LoopIcon — were var(--color-foreground-de-emp)
  • TimelinePauseIcon — was #526069
  • TimelineProgressIcon — was #0067DF
  • DataTransformIcon — removed the <g style={{ mixBlendMode: 'darken' }}> wrapper that blended the icon with its background and washed out the currentColor fill

Existing callers that pass color explicitly (e.g. the Scrubber in TimelinePlayer for TimelineProgressIcon) are unaffected.

image

Storybook

Added a currentColor color control to the Icon Gallery (AllIcons) story so the behavior can be verified visually — picking a color updates every icon that honors currentColor.

Test plan

  • Open Theme → Icons → Icon Gallery in Storybook and change the currentColor control; confirm all icons (including the ones above) recolor.
  • Confirm DataTransformIcon renders its color cleanly with no blend-mode washout.
  • Verify the AgentCanvas TimelinePlayer scrubber still renders with its explicit color.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 1, 2026 15:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 01, 2026, 08:55:01 AM
apollo-docs 🟢 Ready Preview, Logs Jun 01, 2026, 08:55:01 AM
apollo-landing 🟢 Ready Preview, Logs Jun 01, 2026, 08:55:01 AM
apollo-ui-react 🟢 Ready Preview, Logs Jun 01, 2026, 08:55:01 AM
apollo-vertex 🟢 Ready Preview, Logs Jun 01, 2026, 08:55:01 AM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Dependency License Review

  • 1901 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1671
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 color to currentColor (instead of hardcoded hex values or foreground tokens).
  • Updated AgentIcon’s previously hardcoded accent path to use the color prop.
  • Enhanced the AllIcons Storybook story with a color control (labeled currentColor) 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.

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>
@snuziale snuziale force-pushed the fix/icons-honor-currentcolor branch from 3c4a040 to 1b4702c Compare June 1, 2026 15:50
@snuziale snuziale merged commit 4f0da84 into main Jun 1, 2026
42 checks passed
@snuziale snuziale deleted the fix/icons-honor-currentcolor branch June 1, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:M 30-99 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants