-
-
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
[MainUI] Extend default standalone/item/cell widget selection #1558
Conversation
Signed-off-by: Florian Michel <florianmichel@hotmail.de>
Signed-off-by: Florian Michel <florianmichel@hotmail.de>
This looks great, I'll have a look shortly so we can eventually have it in the next release 👍 |
Job #640: Bundle Size — 15.96MiB (~+0.01%).Metrics (no changes)
Total size by type (2 changes)
|
Having second thoughts:
I think most DateTime and Number items are really statuses, even if they're not readonly (the default), and it would be wrong to display an input UI in those cases as well as have adverse side effects (like the state description's pattern being ignored).
Not sure about the rationale for these two, especially the first one. Their state wouldn't be displayed at all because the toggle doesn't allow it. If their class is Switch then it could make sense to display a toggle in all cases (not only numbers but other types accepting OnOff commands too, like Color). |
Signed-off-by: Yannick Schaus <github@schaus.net>
Ok so I modified it as follows: Cards, list items
Cells
|
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.
I think it's satisfactory now, and (I hope) won't cause many regressions unless the model is wrong.
This PR extends the default widget selection for standalone, cell and item default widgets to provide better default widgets on DateTime and Number items as requested here #399 and here #1494
Basically the PR adds the following default widgets:
DateTime
(standalone, list)Number
(standalone, list)Number:Temperature
items as well as for items with the semantic classControl
orSetPoint
with semantic propertyTemperature
(standalone, list)Number:*
items with the semantic classControl
orSetPoint
and a semantic property fromColorTemperature
,Level
,SoundVolume
(standalone, list, cell)Number*
items with the semantic classControl
orSetPoint
and a semantic property fromLight
,Power
,Energy
(standalone, list, cell)Number*
items with the semantic classSwitch
(standalone, list, cell)