jenkinsci / sidebar-link-plugin

Jenkins sidebar-link plugin
https://plugins.jenkins.io/sidebar-link/
MIT License
26 stars 43 forks source link

Support for ionicon #45

Closed jonesbusy closed 1 year ago

jonesbusy commented 2 years ago

What feature do you want to see added?

Hi,

It would be amazing if this plugin support ionicon (For example like the custom-folder-icon plugin https://github.com/jenkinsci/custom-folder-icon-plugin/pull/85)

What we have

See the issue with dark-theme (We expect the SVG to be white)

sidebar_link_ionicon

Best regards,

Upstream changes

No response

damianszczepanik commented 2 years ago

What is the location of the icon which you would like to use ?

jonesbusy commented 2 years ago

My icon are for the moment on the userContent folder but the idea of this issue is to have something similar to : https://github.com/jenkinsci/custom-folder-icon-plugin/pull/85

Where we can reause existing ionicons from the provider plugin.

damianszczepanik commented 2 years ago

If you want to display resource out of your Jenkins then you need to configure security settings to allow this

jonesbusy commented 1 year ago

An other example to illustrate desired feature

This new plugin : https://plugins.jenkins.io/customizable-header/ support specifying symbol that are theme aware

It also avoid uploading the SVG on userContent when they are available as symbol

Using dark theme

jenkins_dark

Using default theme

jenkins_default

Configuration of mentionned plugin allow different strategies for icon (upload on userContent and mentioning an existing symbol)

symbol_selection

mawinter69 commented 1 year ago

You can already use ionicons when you have ionicons-api plugin installed. In the Link Icon just write e.g. symbol-jenkins plugin-ionicons-api and you will get the Jenkins logo shown. You can also refer to symbols from Jenkins itself (https://github.com/jenkinsci/jenkins/tree/master/war/src/main/resources/images/symbols) by just writing e.g. symbol-<filename> though almost all icons in core are also available in ionicons. You can also load a symbol from any other installed plugin that has symbols with symbol-<name> plugin-<pluginname>

image

jonesbusy commented 1 year ago

Excellent thanks! I didn't know the symbol where also resolved by getIconFileName.

I just submitted a PR to update the form validation