-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow sub-directories for icons #2946
Conversation
Signed-off-by: Jan N. Klug <github@klug.nrw>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If I understand the code right, this now also requires the http request to contain the folder names next to the icon name (i.e. the relative path). My understanding of the issue was that it is desired to be able to structure icons into subfolders in the file system, but that they should all still be served the very same way to the outside - i.e. hiding their storage path. Wdyt? |
Yes, you have to include the folder. After re-reading the issue I beliebe that both interpretations (supporting sub-folders and present them with or without folder-name) are possible. IMO the solution here is better, because we will run into unpredictable behavior if an icon with the same name in different folders (which is perfectly possible in a file system). Taking first/last discovered item would be non-deterministic since it depends on the order in which the folders are processed. |
I'm not feeling well about that change as it changes the semantic of how icons are handled throughout openHAB. The "category" used to be a plain string so far - now it would be a path. Note that icon categories are used at many places: In the general |
I'm fine with that, too. I'll check how to implement it. Do you know here to document that? |
Thank you! |
Signed-off-by: Jan N. Klug <github@klug.nrw>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I like this much more and it also looks pretty straight forward.
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/custom-icons-disappears-in-openhab-3-3/136957/1 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/custom-icons-in-habpanel-not-working-anymore-since-oh3-3/137357/1 |
* Allow sub-directories for icons Signed-off-by: Jan N. Klug <github@klug.nrw> GitOrigin-RevId: d8ebbb5
Closes #2896
This immediately works in Main UI, but needs an adjustment in Basic UI.
Signed-off-by: Jan N. Klug github@klug.nrw