-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dummy and Clock widget improvements #1380
Conversation
Signed-off-by: Bastiaan van Haastrecht b.vanhaastrecht@gmail.com Closes: openhab#1349
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks, this looks quite good (especially the i18n stuff), a few minor remarks on the docs, but LGTM.
@@ -168,7 +168,7 @@ The following built-in widgets are available: | |||
|
|||
![Dummy widget](images/habpanel_widget-dummy.png) | |||
|
|||
The so-called dummy widget (whose name is explained by historical reasons - it evolved from the first developed widget) displays the current state of an item without any interactivity, along with a label and an optional icon. | |||
The so-called dummy widget (whose name is explained by historical reasons - it evolved from the first developed widget) displays the current state of an item without any interactivity, along with a label and an optional icon. It has a few options to customize it's appeareance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The so-called dummy widget (whose name is explained by historical reasons - it evolved from the first developed widget) displays the current state of an item without any interactivity, along with a label and an optional icon. It has a few options to customize it's appeareance. | |
The so-called dummy widget (whose name is explained by historical reasons - it evolved from the first developed widget) displays the current state of an item without any interactivity, along with a label and an optional icon. It has a few options to customize its appeareance. |
@@ -230,7 +230,7 @@ The frame widget displays an external web page in a HTML `<iframe>`. | |||
|
|||
![Clock widget](images/habpanel_widget-clock.png) | |||
|
|||
The clock widget displays an analog or digital clock. It can also be used to display the current date. | |||
The clock widget displays an analog or digital clock with color customization. It can also be used to display the current date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this addition was necessary to be emphasized here tbh :)
Signed-off-by: Yannick Schaus <github@schaus.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this small change as non disruptive, besides it was positively reviewed a while ago and I was just waiting for feedback on my doc changes which I ended up reverting yesterday.
The changes made between M7 and RC1 seem to have broken the Dummy Widget when implemented with HabPanel and used on an iPad 3 or earlier. IPad 4and later seem unaffected. I believe many, not all, HabPanel users use older hardware, otherwise they would likely use MainUI instead of HabPanel. I view this as a regression for a feature implemented after the features were frozen. |
@ghys Can you confirm that those changes might have increased the minimal browser requirements? |
Whatever changes were made seems only to have negatively affected the Dummy Widget. The Clock Widget displays fine on the iPad 3.
… On 06/25/2022 4:44 PM Kai Kreuzer ***@***.***> wrote:
@ghys /~https://github.com/ghys Can you confirm that those changes might have increased the minimal browser requirements?
I leave it to your judgement on whether this is something that we can live with or if there's any need to act.
—
Reply to this email directly, view it on GitHub #1380 (comment) , or unsubscribe /~https://github.com/notifications/unsubscribe-auth/ABTLT3NZYDA255HOFG32ZCDVQ5VUVANCNFSM5UU7XS5Q .
You are receiving this because you commented.Message ID: ***@***.***>
|
if (vm.widget.usedescription) { | ||
var options = item.stateDescription.options; | ||
if (Array.isArray(options)) { | ||
var option = options.find((element) => element.value === item.state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the line that is causing problems (arrow functions are iOS Safari 10+, find
is iOS Safari 8+).
The iPad 3 apparently runs on iOS 9.
Reference
https://caniuse.com/arrow-functions
https://caniuse.com/array-find
https://en.wikipedia.org/wiki/IPad_(3rd_generation)#Software
It could probably be chenged to options.find((function (element) { return element.value === item.state; })
to make it compatible with iOS 8+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be great if it can be fixed as proposed. I know this is old hardware, but it works great with HabPanel otherwise and HabPanel is a great legacy alternative to the new MainUI that does require more modern hardware to run. Your efforts are greatly appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1433 reimplements the code with techniques found elsewhere (and it seems to work in iOS 6).
Thank you for reporting that late minute bug.
openhab#1380 introduced new code with ES6 syntax (arrow functions) that isn't supported in older browsers. See openhab#1380 (comment) Reimplement using the code from the selection widget to determine the option (uses angularJS helpers) Signed-off-by: Yannick Schaus <github@schaus.net>
#1380 introduced new code with ES6 syntax (arrow functions) that isn't supported in older browsers. See #1380 (comment) Reimplement using the code from the selection widget to determine the option (uses angularJS helpers) Signed-off-by: Yannick Schaus <github@schaus.net>
Signed-off-by: Bastiaan an Haastrecht b.vanhaastrecht@gmail.com
Adds color customization to Clock and Dummy widget.
Adds option to show state description in Dummy widget.
Closes: #1349
Closes: #1293
Closes: #1294