jenkinsci / custom-folder-icon-plugin

Plugin to customize Jenkins Folder icons
https://plugins.jenkins.io/custom-folder-icon
MIT License
6 stars 9 forks source link

Custom logo not propagated to child of organisation folder #387

Open jonesbusy opened 1 week ago

jonesbusy commented 1 week ago

Jenkins and plugins versions report

All. Latest versions

What Operating System are you using (both controller, and any agents involved in the problem)?

All. Latest versions

Reproduction steps

I'm not sure if it's something that need fix on custom-folder-icon, branch-api or even Jenkins core ?

backstage_icon_folder

Expected Results

For organisation folder the custom logo is propagated to child multibranch pipelines folder

Actual Results

backstage_icon_folder2

Anything else?

No response

Are you interested in contributing a fix?

No response

strangelookingnerd commented 1 week ago

From what I know there is no "inheritance" and each branch has its own icon. Compare it to nested folders if you will, the configuration is only on top-level. So not really a bug, but an interessting feature idea.

I guess this would need to be adapted in the branch-api. I can look into it a little deeper and let you know.

strangelookingnerd commented 1 week ago

Quick update:

If I followed it correctly the icon for a ComputedFolder such as Organization Folders (not sure if there are other implementations) is determined via branch-api-plugin.

The definition of the icon is up to the SCMNavigator implementations, such as github-branch-source-plugin.

Looking closer at the SCMNavigator implementation in scm-api-plugin I see that - unfortunately - these are not AbstractFolder so my plugin can't provide the functionallity to have a custom icon.

So with that information, what are the options?

I think it would be possible to propagate the icon for the children of a ComputedFolder. However this may not be really what the user wants / expects to have: the same icon for everything.

Another option would be to make the icon of SCMNavigator configurable and further have a plugin / extend this plugin (not sure if this is a great idea...) to provide the icons.

Ultimately it would also be a solution to combine custom-job-icon-plugin and custom-folder-icon-plugin to become the custom-icon-for-everything-plugin.

What do you think @jonesbusy?

jonesbusy commented 1 week ago

Hi,

Thanks for all those details. I though it would be more easy that that. I'm not sure what would be the best solution to be honnest

Perhaps I will see if the "old" git icon can be replaced by one provided by ionicon (either git or the scm one). The actual one is very hugly and doesn't match all the rest of UI

I was also not aware of this (abandoned) plugin : https://plugins.jenkins.io/custom-job-icon/

Perhaps it could be adopted, refreshed and extended similar to the custom-folder-icon-plugin