openhab-webui icon indicating copy to clipboard operation
openhab-webui copied to clipboard

IconSize expression in oh-plan-marker isn't editable in dialog

Open stefan-hoehn opened this issue 5 years ago • 3 comments

The problem

When editing an oh-plan-marker widget it is possible to configure an expression in the yaml which allows to dynamically compute the iconSize like so

iconSize: "=(items.myalarm.displayState === 'Alarm') ? 32: 16"

however, this is not shown in the dialog of the marker nor can it be edited probably because the dialog expects numbers only

Expected behavior

The expression should be shown and editable in the dialog

stefan-hoehn avatar Jan 22 '21 19:01 stefan-hoehn

I think for most users it's actually adequate to limit the input to numbers. In my opinion, expressions are advanced use and it's ok to have advanced users to switch to yaml and add the expression there.

@ghys, What do you think?

hubsif avatar Apr 28 '21 19:04 hubsif

Yes or maybe try to detect a = when choosing the control to render and display a regular text input (or even an advanced one with autocompletion, why not) if an expression is detected.

ghys avatar Jun 24 '21 23:06 ghys

@ghys I noticed this one again. First of all, I wouldn't perceive it as a bug, secondly I am not sure how much the effort is to implement your idea and if it is worth the effort. If you feel, it cannot be done easily I would be happy to close that with "won't fix" (as I am not able to do it myself unfortunately)

stefan-hoehn avatar Jul 01 '22 20:07 stefan-hoehn