Skip to content

Conversation

@jnovinger
Copy link
Member

@jnovinger jnovinger commented Apr 25, 2025

Fixes: #17405

  • uses new icon URL value from the plugins catalog API
  • applies minimal styling to keep image display from being to large relative to nearby text
  • assumes icons are black and white and inverts the image via CSS for dark mode

}

img.plugin-icon {
max-width: 1.4285em;
Copy link
Member Author

@jnovinger jnovinger Apr 25, 2025

Choose a reason for hiding this comment

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

This was eye-balled (at ~9/7) so that it matched the font-size. I didn't immediately see any variables to re-use here.

// Assuming icon is black/white line art, invert it and tone down brightness
img.plugin-icon {
filter: invert(100%) brightness(80%);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Not loving this approach, unless we'll only ever accept black/white line-drawing-ish icons.

Copy link
Contributor

@pheus pheus Apr 28, 2025

Choose a reason for hiding this comment

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

Just a quick drive-by thought: you could consider adding grayscale() to the filter as well:

filter: grayscale() invert() brightness(80%);

Also, small note - you don't need to specify 100% for invert; invert(), invert(1), and invert(100%) are equivalent. (See MDN docs if helpful.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @pheus , appreciate the pointers.

@jnovinger jnovinger force-pushed the 17405-plugin-icons branch from ab6ca96 to 9173a11 Compare April 25, 2025 19:07
@jnovinger jnovinger requested review from a team and bctiemann and removed request for a team April 25, 2025 19:20
Hat tip to @pheus. Thanks!

I did end up leaving the filter function arguments as the Sass
processor complains when you try calling a filter function without
an argument. :/
@bctiemann
Copy link
Contributor

I think this looks fine code-wise, but the icon looks a little too big for the text:

Screenshot 2025-04-30 at 8 45 19 AM

However I don't think that's a problem with the icon, but rather that the text in the table rows is too small / not vertically centered in the table rows throughout the UI. That's a separate issue that should be raised.

@bctiemann bctiemann merged commit 68e9da5 into main Apr 30, 2025
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2025
@jnovinger jnovinger deleted the 17405-plugin-icons branch August 20, 2025 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include the plugin's icon (if any) when displaying plugins from the catalog

4 participants