openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
212 stars 232 forks source link

[BasicUI] Add special handling for "none" icon #2534

Closed lolodomo closed 2 weeks ago

lolodomo commented 1 month ago

Same behaviour as in the Android app is now implemented for the "none" icon. This icon means "no icon" and we don't want to request the icon servlet. When this icon is associated to a sitemap element, the icon servlet is no more requested. Instead, a simple empty SVG tag is considered and inserted in the HTML page. There is also no dynamic behaviour (with item state) applied for this icon.

Additionally, in case the loading of any OH icon fails, the IMG tag is replaced by an empty SVG tag in the HTML page instead of updating the IMG source with the none icon URL (triggering a potential new icon servlet request).

Fix openhab/openhab-core#3977

Signed-off-by: Laurent Garnier lg.hc@free.fr

dilyanpalauzov commented 6 days ago

Are now icon="" and icon="none" semantically identical?

mueller-ma commented 6 days ago

At least for Android it's handled the same way