-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Improve equipment rendering in model cards #753
Comments
I basically agree to Kaspars 's thought - at least I feel the same pain ;-) For me this boils down to the question, how to organize points for equipment better in automatic generated cards and lists while keeping the the semantic correct and provide a decent user experience? As Kaspars said, equipment with a long list of points clutters the generated card and makes them less usable. Could we use some existing metadata already to improve the representation? General ideaWe likely have a bunch of point for a specific equipment but just few of them (maybe just one) is relevant for most uses, but all the others should still remain accessible via model driven UI components. So, just "untag" them as points would not solve the need. ExampleI'll share my example of my weather sensors in the garden. All are battery powered and transmit the data via wireless. So all have battery channels as well as signal strength which clutters the UI. But the most relevant data are the sensor readings for temperature/humidity/rainfall: Option 1:When we use "Default Widget Order Index" metadata, we can promote more relevant points (items) to the top of lists. This works in the model as well as in the generated cards. If we tag just the relevant points (e.g. the rainfall counter in the example), this reading is promoted to the top of the list. Current default behaviour is the presentation of all the remaining "untagged" points (no WidgetOrderIndex is set) at the end of the list. Option 1 would be to hide them (instead of appending them to the end) and reveal them just on click/tap on the equipment line in the UI. Option 2:If the equipment group has expicitly an "Default List Item Widget" assigned which links the representation of the group to a specific item of that group, ALL points could be hidden first and just the defined list widget is shown. The hidden points will be revealed through expand/popup after click/tap on the equipment list widget. Option 3:Introduce an additional metadata tag for the equipment groups indicating how many of the points belonging to the equipment should be listed by default. The rest remains hidden until some click/tap as above. Think similar to the basic/advanced channels of things. Semantic for this additional tag could be:
In all cases, the rest of points should be revealed after click/tap on the equipment line. |
I agree that the equipment rendering doesn't scale well, and I intended to work on it for 3.1. I also wanted to improve the default widgets for Group items which are also Equipments anyhow, because they will often just display the group's state which is NULL unless the admin does something about it. I'll make some experiments to help in deciding the final design, it's better to have some visual feedback to make up our minds. |
Thanks @krocans for starting this. I had similar thoughts already and posted on the community forums. But your summary and suggestion is much more detailed than mine. So I will try to give some additional input from my POV
For me this is the most "natural" way of modelling this and exactly what I did. To achieve the expected behaviour I added a dummy item like But it is a really ugly workaround and having a solution to realize this would be great. Creating a new tag like
This is how I modelled all my equipment... some basic points in the equipment group plus one or more sub-equipment for "advanced" functionality. To make the visual representation configurable by the user I can imagine following metadata as additional namespace like in @curlyel Option 3 (of course with nice UI configuration like for the expire timer ^^)
In addition:
This leads me to a namespace mock-up like this
One last point I'm not so sure about right now is how to handle the automatically created glance badges for location cards. As of today only |
Of course it's up to developers but my opinion still is that this separating of some points under equipment internally should be based of Group no matter what tags are assigned to that group. Simply assigning like 10 items to group leads to more visibility than "metatadating" those 10 items individually with order number, show/noshow and things like that ... and definitely leads to less mistakes. Plus my personal interest in it - I'm still using text configs + git on OH3 (and probably somebody else does too) so tons of metadata for each item in text configs makes them awful. And about tagging of this group ... or not group ... in other words about model hierarchy. Whatever it will be I think it should not be nested "Equipment". Seriously what the h is "equipment in equipment"? It just breaks my mind :). The only case I can imagine is if you have some coffee machine with built in radio both WiFi controllable :). That's why I initially called this "PointGroup". What I was talking about was for example merging, separating and by default collapsing in UI bass, treble and sound effect controls of AV receiver. As you can imagine such group logically is not any type of equipment just controls. |
Just for reference: This is a bit of work - sure. Therefore, I'd consider this as interim solution only... ;-) |
@krocans, @curlyel , did you have a look at the latest milestone ? I believe PR #1307 addresses some of your concerns which I shared. I must admit I made an implementation in my own way, because I had not read this thread before having finished the work. Yet it is very similar to the options 2 or 3 described in your posts above, depending on the settings chosen. I would be interested to have you feedback. |
Good job @tarag! Here is my test model setup Problem 1 (possibly bug): Values of "default items" (order index 0) are not shown in accordion header Problem 2: Card is ignoring measurement values if items in nested groups
|
Thanks for your feedback. Regarding problem 1, it is indeed a bug. PR #1396 will fix it, but might introduce horrible 'NULL' if you don't configure your groups metadata properly. For problem 2, indeed the code of the measurement/status at glance needs to be updated to parse sub-equipment. You could open an issue to keep track of this shortcoming. Apparently this is a single function that needs updating to be recursive. |
Has this been looked at yet? |
The problem
There is no way to group Controls/Points under Equipment at same time keeping semantic structure (tree) consistent.
I guess this issue generalizes #749
Your suggestion
Imagine Equipment which has many controls/points like 20 or even more. Such equipment when correctly configured with semantic tags cerates enormously long list in Location and other cards and makes those hard to read/use.
Logical solution seems to be arrange those controls in some groups. "Group" in legacy sitemaps did that well but un OH3 UI this causes problem.
here is sample item setup with two points grouped.
In this setup non-semantic group TestEquipment_ControlGroup is not shown in cards at all and items are placed as standalone of semantic tree. (Probably for that setup it's expected behaviour)
When group is configured as "equipment in equipment"
semantic model looks great
but items in group still are not shown in locafion/equpment cards
And bogus Miscellaneous Equipment is created in equipment tab
That's not expected behavior because those two items are not some kind of standalone equipment.
Expected behavior
Result most close to expected I was able to achieve by tagging group itself as control.
That makes cards to work as expected - group is shown as list item (with nasty NULL value) but it's there and clicking it opens new popup with contents.
But semantic model is broken
So it would be very nice to have some new semantic tag (like ControlGroup or PointGroup) for groups which will behave like "Control" in above example (show as item+popup card in cards) but in same time semantically keeps items as belonging to upper group (Equipment)
Your environment
n/a
Additional information
n/a
The text was updated successfully, but these errors were encountered: