Skip to content

fix(icons): CopyLinkIcon now follows theme color via fill prop#1716

Merged
leecalcote merged 1 commit into
masterfrom
fix/copylink-icon-currentcolor
Jul 16, 2026
Merged

fix(icons): CopyLinkIcon now follows theme color via fill prop#1716
leecalcote merged 1 commit into
masterfrom
fix/copylink-icon-currentcolor

Conversation

@hortison

Copy link
Copy Markdown
Contributor

Description

Symptom - The "Copy link" chain icon renders black regardless of theme, visibly miscolored next to sibling action icons (e.g. SettingsIcon) in row-action menus - reported from Meshery's Connections table for established Kubernetes connections.

Root cause - CopyLinkIcon ignored the fill prop entirely and neither of its <path>s set a fill, so the SVG default (#000) applied. SettingsIcon and other correctly-themed icons default fill to currentColor, which inherits the surrounding text color.

Fix - Give CopyLinkIcon the same contract as SettingsIcon: accept fill (default DEFAULT_FILL_NONE = currentColor), applied on the <svg> element so both paths inherit it.

Consumers - Only two: Sistent's own getCopyDeepLinkAction (src/custom/TableActions.tsx) and Meshery's ConnectionActionMenu. Both render the icon inside buttons/menu items where currentColor is the desired behavior; nothing depends on the black rendering (the black is the bug).

Watch for - Several other icons lack any fill handling and can exhibit the same defect: CredentialIcon, RightArrowIcon, RemoveIcon, AccountTreeIcon, ChatIcon, BusIcon, ComponentIcon, TriangleIcon, OutlinedVisibilityOn/OffIcon, and more (grep -rL 'fill' src/icons --include='*Icon.tsx'). Deliberately not swept here - some may be stroke-based or intentionally fixed-color; they deserve a dedicated audit.

Tests

  • jest: 349 passed.
  • ESLint clean on the changed file.

A release including this fix is needed by meshery/meshery (Connections table action menu).

CopyLinkIcon ignored the fill prop entirely and neither of its paths set
a fill, so the SVG default (#000) rendered the icon black regardless of
theme - visibly miscolored next to sibling action icons (e.g.
SettingsIcon) in row-action menus like Meshery's Connections table.

Give it the same contract as SettingsIcon: accept fill, defaulting to
currentColor, applied on the svg element so both paths inherit it.

Watch for: other icons share this defect (CredentialIcon,
RightArrowIcon, RemoveIcon, AccountTreeIcon, ChatIcon, BusIcon,
ComponentIcon, TriangleIcon, OutlinedVisibility*Icon, and more lack any
fill handling). Left untouched here since some may rely on stroke-based
rendering or intentional black; they deserve a dedicated audit.

Signed-off-by: jamieplu <179417684+jamieplu@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 16, 2026 04:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CopyLinkIcon component to accept a fill prop, defaulting to DEFAULT_FILL_NONE, and applies it to the SVG element. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes CopyLinkIcon so it follows the current theme/text color by honoring the fill prop (defaulting to DEFAULT_FILL_NONE, which is currentColor), matching the established icon contract used elsewhere in src/icons.

Changes:

  • Add fill to CopyLinkIcon props with a default of DEFAULT_FILL_NONE (currentColor).
  • Apply fill on the root <svg> so both <path> elements inherit it.

@leecalcote leecalcote merged commit f417bf9 into master Jul 16, 2026
6 checks passed
@leecalcote leecalcote deleted the fix/copylink-icon-currentcolor branch July 16, 2026 04:14
hortison pushed a commit to meshery/meshery that referenced this pull request Jul 16, 2026
Picks up layer5io/sistent#1716: CopyLinkIcon now accepts a fill prop
defaulting to currentColor, so the Connections table's Copy link action
icon follows the theme like its sibling action icons instead of
rendering black.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Copilot AI pushed a commit to meshery/meshery that referenced this pull request Jul 16, 2026
Picks up layer5io/sistent#1716: CopyLinkIcon now accepts a fill prop
defaulting to currentColor, so the Connections table's Copy link action
icon follows the theme like its sibling action icons instead of
rendering black.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>

Co-authored-by: hortison <160366376+hortison@users.noreply.github.com>
leecalcote added a commit to chaitanyamedidar/meshery that referenced this pull request Jul 16, 2026
…panded details

The Connections page had a cluster of defects rooted in one mismatch:
the server returns connections in the v1beta3 camelCase wire shape
(server/models/connections aliases the schemas v1beta3 Connection), but
the table's columns still read snake_case fields.

- 'Discovered At' read created_at (always undefined on the wire) and
  rendered 'Invalid Date' for every row. The column now reads createdAt,
  is visible by default (colViews 'na' -> 'xs'), and remains sorted
  descending by default. Sort clicks translate the camelCase column to
  the server's DB sort column via toServerSortOrder; older bookmarked
  URLs with snake_case sort params keep working.
- 'Sub Category' (sub_type) and 'Updated At' (updated_at) had the same
  dead reads; renamed to subType/updatedAt.
- The Name column's server tooltip now also reads the camelCase
  metadata.serverLocation written by BuildMesheryConnectionPayload.
- Row actions are left-aligned (flex-start) instead of centered.
- Expanded connection details no longer force lowercase; IDs, URLs,
  build SHAs, and version strings keep their meaningful casing.
- Meshery-kind connections get a structured expanded view (Server ID,
  Location, Version, Build SHA, Discovered/Updated At) instead of a raw
  metadata dump; unrecognized keys still render via the generic
  structured formatter so nothing is dropped.
- formatDate/formatTime/formatDateTime render '-' for missing or
  unparsable timestamps instead of the engine's 'Invalid Date'.

Note: the miscolored Copy Link action icon is fixed at its root in
Sistent (layer5io/sistent#1716 - CopyLinkIcon ignored fill); this PR
picks it up with a dependency bump once that release is cut.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
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.

4 participants