Open rkoshak opened 4 years ago
With #426 & the latest fixes in #457 you can achieve what you wish by setting the "Default Standalone Widget" metadata to oh-input-card
(Input Card).
For the type
parameter you can use either date
(native control) or datepicker
(Framework7 control):
In the config for the default widget make sure you enable the "Send Button" option to have the button to send the command.
And if you set the type
to texteditor
you can use a String item for rich text (HTML) input - could be useful for groceries list, sticky notes and the like:
Would using a Toggle Card work for Switches? What about Contacts and the Numbers?
Don't get me wrong, the ability to enter text and Date Times is huge! But my intent with the above was to support all Item types as a way to boot strap their values and/or drive tests before a Page or Sitemap has been created.
There's already a built-in routine to determine the "best" control from the item (notably its type) and other available criteria - we can always make it better because it yields the control you see when you don't specify any metadata to override it (the same applies to list items and cells). For DateTime items it would probably be appropriate to display the Input Card if it's not read-only, or a Label Card otherwise. It might also make sense to do the same for String items.
But I'm also thinking about adding generic "update state/send command" buttons beside "Analyze" in the preview on the model page and the item details pages.
One challenge that many users need to overcome is boot strapping the state of some Items. For example, I have a bunch of DateTime Items that drive my Time of Day rules. Some are populated from Astro and others are "hard coded". For those "hard coded" Items I have to go to great lengths to initialize the Items. Options include:
It's not always possible to initialize these Items from the BasicUI. I don't know about HABPanel or MainUI but I would expect to be able to do this from MainUI for all Item types.
Most of the time it would be so much easier for most use cases to have a way to update the Item's state from the UI. I can imagine being able to click on the field that shows the Item's current state and being able to set it manually from there.
However, if the official stance is that this sort of thing should only be done from the controlling UI I understand. But I would find it intuitive to be able to adjust the Item's state from the Item page where you can set the metadata and other properties.