-
-
Notifications
You must be signed in to change notification settings - Fork 92
Added a new widget: Symbol #234
base: master
Are you sure you want to change the base?
Conversation
new: added symbol widget and basic configuration new: allow dynamically changing several widget-icon properties (not only state) Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
new: provide format information for time based conditions Signed-off-by: Schraffl Peter <[email protected]>
Signed-off-by: Schraffl Peter <[email protected]>
Thanks for your work! Really appreciated! |
I tried it and it's a good start, some early design notes - I haven't reviewed the code in detail:
actually to be honest, I don't see many use cases where rotating icons is really useful (the same goes for the spinning animation which btw is available for backgrounds too and looks really silly 😲 ). The only one I could eventually understand is the icon of a fan but still, this is very anecdotal. Adding options that clutter up the dialog boxes and will almost never be used is rarely a good idea. Maybe you could elaborate why you needed that?
Cheers! |
Thanks for your feedback. I have little time at the moment but i'll try to reply asap. |
Complete rewrite of the themes using CSS variables to avoid pre-processing and embedding Bootstrap with each theme. Fallback for browsers not supporting CSS variables: See http://caniuse.com/#feat=css-variables Theming is now disabled for those browsers without support. Add 2 new themes: Madras & Orange Tree. New additional stylesheet option to complement or override styles defined by the theme - only same origin source allowed by CSP. Closes openhab#186. Fixes openhab#189. List of CSS variables in use and default values: /* Basic HABpanel styles */ --body-bg: #000; --body-color: #ccc; --primary-color: #0db9f0; --box-bg: openhab#234; --header-bg: var(--body-bg); /* General widget styles */ --widget-design-bg: #567; --widget-text-color: #def; --widget-border-radius: 0px; --widget-box-shadow: none; /* Icon colors */ --icon-color-filter: invert(60%) sepia(100%) hue-rotate(185deg) saturate(1000%); /* Should be aligned with --primary-color */ --icon-color-off-filter: invert(45%) sepia(80%) hue-rotate(170deg); --icon-backdrop-filter: invert(60%) sepia(100%) hue-rotate(165deg) opacity(15%); /* Chart widget */ --chart-stroke: #456; --chart-fill: #89a; --chart-tooltip: openhab#123; /* Color picker widget */ --colorpicker-border: #3960ff; --colorpicker-stroke: #456; --colorpicker-fill: #89a; /* Image widget */ --image-border: #456; /* Switch widget */ --switch-off-color: #89a; /* Slider widget */ --slider-pointer-color: openhab#234; --slider-pointer-bg-color: #def; --slider-ceil-color: #def; --slider-bubble-bg-color: openhab#123; --slider-bubble-border-color: #456; --slider-bubble-color: #aa7; Also-by: Yannick Schaus <[email protected]> Signed-off-by: Kuba Wolanin <[email protected]>
@hypetsch are you still interested in refactoring your Symbol widget into the Dummy widget as suggested? If not please make sure you allow maintainers to commit to your PR branch, so that I can help you with that (probably not before next year). Thanks! |
Hi, yes I am still interested in it, but unfortunately do still not have time for it, sorry. Permission should be ok, so you should be able to refactor if you like. |
That is a possibility, but maybe it's better if the id matches the name. "dummy" could remain an alias to ensure existing dashboards continue working after it's renamed to "value" or whatever name we end up with. Cheers! |
When will be this available? |
The purpose of the 'symbol' widget is to visualize the current state of an item (in my case e.g. the level at which my CWL is currently operating).
The basic idea: Transform the state value of an item into a graphical visualization.
Therefore it is possible to configure an unlimited number of rules. Each rule consists of
Here is a sample screenshot:
When the selected item state changes, the configured rules are processed from top to bottom until all conditions of a rule match. If so, the configured style properties are applied to the widget.
Additionally to the state of an item, conditions can currently also check current date and time.
Some additional notes:
I would appreciate your feedback and hope you can find some time to have a look at my first 'real' angular experience :).