Open t0mg opened 7 years ago
This is a nice idea for "advanced users". I think we need to agree on the requirements and exact syntax before writing some code.
I don't have a lot of bandwidth so it'd be great if we found volunteers to make this change and/or write some documentation in the wiki as well (syntax, supported icons).
Note: please assign yourself on the issue if you want to contribute so that we don't work in parallel :)
From @NietGiftig on January 31, 2017 15:8
I have no idea how to assign myself. As I'm not useful for .js coding, rather not in the coding part, it would make it more difficult for others. I not a Icon man, but use Icons in the Reacticz style, if nessecary I wil go on Icon hunt ;-) In the wiki I can do some documentation bits, as soon as I know what direction to go. Basic requirements in my view:
I disagree on the bold styling :) Styling should not be handled in multiple uncorrelated places. For the rest it's fine by me (btw, by default there is no icon in TextWidget, so no need for an option to hide it).
I still don't have time to implement this but here's a proof of concept for passing special options in the text value: https://jsfiddle.net/gh9tnva5/
This function turns a string like "[rctz]option1=value1,option2=value2[/rctz]"
into a JS object {option1: "value1", option2: "value2"}
or returns null if no secret option was found.
In Reacticz TextWidget, we could parse the string either from the device name or from the text value and once we have the object it would be easy to apply the options to set an icon or customize the text content.
We just need to define the options :) hideName
and icon
are the only two I can think of right now.
Re. icon scaling, that's a fair point but I don't think it should be customizable, we should simply fix it globally by setting a max size on icons in GenericWidget.
Domoticz now supports multiple lines for Text and Alert devices (domoticz/domoticz#1942)
Nice! I'm still using Reacticz with same old version of Domotizc Still very, very pleased with it, for me proof that it is not always necessary to change things. I'm reluctant to update Domoticz, there are so many changes not sure if it will not break my current use. I will have another look on updating when I have more time at hand.
Thanks for the heads up @davidlb - So at some point Reacticz should also be updated to support \n and \r and render them as
. Probably in GenericWidget.js.
From @NietGiftig on January 31, 2017 14:18
Following up a discussion in the WindWidget pull request https://github.com/t0mg/reacticz/pull/45 about showing data in reacticz
t0mg added to these remarks the sentence:
witch would be a tremendous advantage to some people ;-)
Copied from original issue: t0mg/reacticz#47