openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
213 stars 233 forks source link

[mainui] Tabbed Pages do not support expressions in configuration options #2571

Closed digitaldan closed 5 days ago

digitaldan commented 3 weeks ago

So i was hoping to use an expression to customize the label in the tabbed page view, like =items.Lights_All.state, unfortunately this does not work as the tabbed page is not actually a component that uses the widget mixin that i think does the expression parsing. Not sure how to fix this properly. If someone could give a hint on the right way to support this, i could try and take a stab at fixing this.

Besides labels supporting expressions, my end goal was to submit a PR that would also enable badging on the tabbed links (see screen shot) , but this is only useful if the configuration supports the jsep expression evaluation used in the widget-mixin.

image
florian-h05 commented 5 days ago

@digitaldan Please have a look at #2591, I have just had a look at this and found a solution. If you are fine with it, can you please review my PR?