Skip to content

fix(icon): forward fill prop to path elements in ExternalLink and Dow…#1670

Open
PARTH-TUSSLE wants to merge 3 commits into
layer5io:masterfrom
PARTH-TUSSLE:fix/external-link-download-icon-fill
Open

fix(icon): forward fill prop to path elements in ExternalLink and Dow…#1670
PARTH-TUSSLE wants to merge 3 commits into
layer5io:masterfrom
PARTH-TUSSLE:fix/external-link-download-icon-fill

Conversation

@PARTH-TUSSLE

Copy link
Copy Markdown

Notes for Reviewers

This PR resolves an inconsistency in ExternalLinkIcon and DownloadIcon where they did not support or forward the fill prop correctly to their underlying <path> elements.

Root Cause / Changes

Standard Sistent icons (like AddIcon and FileUploadIcon) destructure fill = DEFAULT_FILL_NONE ("currentColor") and apply it to their <path> tags, enabling containers (like buttons) to dynamically color them.
However:

  1. ExternalLinkIcon (Externallink.tsx): Completely omitted fill from destructuring and did not pass it to <path />.
  2. DownloadIcon (Download.tsx): Destructured a hardcoded default fill = '#455a64' and applied it to <svg> instead of <path />.
    Changes made in this PR:
  • Standardized both icons to destructure fill = DEFAULT_FILL_NONE from their props.
  • Forwarded the fill attribute directly to the <path> elements of both icons.
  • Verified code formatting via Prettier and ran eslint checks.
{9FEE60FC-641A-4DAA-8328-5D4A1F51F879} {22157358-9DFA-4CC1-AC1C-96A62548DE9A} {67F9CC2E-BA88-4E73-A1E2-A6978506ED3D} {FF368351-49A1-4C13-A2D3-31A7DFBAD36A}

This PR fixes #1669 and meshery/meshery#20065

Signed commits

  • [✅ ] Yes, I signed my commits.

…nload icons

Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>

@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 DownloadIcon and ExternalLinkIcon components to use DEFAULT_FILL_NONE as their default fill value and applies the fill prop directly to the inner <path> elements. The feedback suggests updating DownloadIcon to forward all remaining SVG props using the rest parameter (...props) to ensure consistency with ExternalLinkIcon and prevent other standard SVG attributes from being ignored.

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.

Comment thread src/icons/Download/Download.tsx
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
@PARTH-TUSSLE

Copy link
Copy Markdown
Author

@banana-three-join , @Bhumikagarggg , @saurabhraghuvanshii , would appreciate a review whenever you get the time.

@leecalcote leecalcote requested a review from NSTKrishna July 1, 2026 18:00
@NSTKrishna

Copy link
Copy Markdown
Contributor

@PARTH-TUSSLE Thanks for working on this and also LGTM

@NSTKrishna NSTKrishna 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.

@PARTH-TUSSLE also check if there are any other icons in the library that still use a hardcoded fill or don't forward fill to their path elements

@PARTH-TUSSLE

Copy link
Copy Markdown
Author

@PARTH-TUSSLE also check if there are any other icons in the library that still use a hardcoded fill or don't forward fill to their path elements

Aightt!

@PARTH-TUSSLE

Copy link
Copy Markdown
Author

@PARTH-TUSSLE also check if there are any other icons in the library that still use a hardcoded fill or don't forward fill to their path elements

@NSTKrishna I've checked the rest of the library! Most of the standard UI icons correctly inherit fill (either explicitly or via spreading ...props to the root svg). However, there are a few monochrome/UI icons that hardcode Keppel Green (#00B39F) and completely ignore props.fill, specifically: MergeActionIcon, ModifiedApplicationFileIcon, and OriginalApplicationFileIcon. ChallengesIcon and AlertIcon also hardcode specific hexes. (The multi-colored brand logos like Google, SMP, and MesheryOperator also hardcode their fills, but that seems intentional). Should I fix the MergeActionIcon and ApplicationFile icons to forward fill in a separate PR, or add it to this one?

@NSTKrishna

Copy link
Copy Markdown
Contributor

@PARTH-TUSSLE also check if there are any other icons in the library that still use a hardcoded fill or don't forward fill to their path elements

@NSTKrishna I've checked the rest of the library! Most of the standard UI icons correctly inherit fill (either explicitly or via spreading ...props to the root svg). However, there are a few monochrome/UI icons that hardcode Keppel Green (#00B39F) and completely ignore props.fill, specifically: MergeActionIcon, ModifiedApplicationFileIcon, and OriginalApplicationFileIcon. ChallengesIcon and AlertIcon also hardcode specific hexes. (The multi-colored brand logos like Google, SMP, and MesheryOperator also hardcode their fills, but that seems intentional). Should I fix the MergeActionIcon and ApplicationFile icons to forward fill in a separate PR, or add it to this one?

create a separate pr for those and before making any changes, verify that the hardcoded fills aren't intentional

@NSTKrishna NSTKrishna 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.

LGTM 🚀

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.

[Bug] ExternalLinkIcon and DownloadIcon path elements do not support or forward fill prop

3 participants