Closed ghost closed 10 months ago
@Boby71 commented on Jan 9, 2021, 4:30 PM UTC:
Just noticed, it's the same for frames:
Frame label="Neue Faelle" {
Chart icon="chart" item=CoronaStatisticsAT_NewCases refresh=60000 service="rrd4j" period="W" label="Neue Fälle"
}
Not a singe label is being displayed here
I looked into this a bit and it seems as though that was never intended to have a label. Although not a hard problem to solve if it needed to be added as the data is there.
There are a few items that seem to intentionally not have a label because they are intended to be full row items that would be otherwise described in a frame or group of some sort.
The frame label seems to work fine in snapshot, though I couldn't find any history of when they were broken or changes that would have fixed them.
Anyway, some of the items do have the option to hide the label if the label text is blank, and some straight up don't have a label that will be displayed at all. Those are : Image Chart Video
I looked into this a bit and it seems as though that was never intended to have a label. Although not a hard problem to solve if it needed to be added as the data is there.
There are a few items that seem to intentionally not have a label because they are intended to be full row items that would be otherwise described in a frame or group of some sort.
The frame label seems to work fine in snapshot, though I couldn't find any history of when they were broken or changes that would have fixed them.
Anyway, some of the items do have the option to hide the label if the label text is blank, and some straight up don't have a label that will be displayed at all. Those are : Image Chart Video
But frame labels aren’t shown as well. So I have no option to put a level above these elements at all? It worked differently in OH2.5...
I'm on build 2159 and they work as expected. I can fix them all if the developers want, the change is in basic-ui and it's not a big one, but I think it's how they intended it.
I personally think that if the label is filled it then it should be displayed and if it's not then it's just the "content"(image, web, or video). Currently in basic ui the images don't work anyway, so I think we'd need to wait for that to get resolved(not sure about videos).
If any of the dev's want to chime in I can fix these up fairly quick so they will display a label(and icon) if they are set. Currently they will not.
@ghys, what do you think about this offer?
Sure, I don't maintain Basic UI but every initiative to fix things up is welcome.
Is what is currently in place the intended result though, or should there be the ability to show an icon and label for the 3 item types that are missing that?
I've got this mostly fixed already here(although both Image and Video won't display due to what would seem to be a core issue), but don't want to waste anyone's time reviewing if it's not the way things are supposed to be.
Who is taking this decision, @bigbasec mentioned above, @kaikreuzer ?
There seem to be a few different cases being discussed here, but from what I understand from a quick glance, I'd say we talk about bugs here, so there's no need for any decision and @bigbasec's PRs for the Basic UI are welcome.
FTR: If a widget has a label=
attribute, we can safely assume that if some value is provided for it, it is expected to be displayed. If this is not the case, we can call it a bug, unless there are very clear reasons for it not to be shown (because of constrained display sizes like on the PebbleUI or whatever).
I think there are 3 that don't display a label at all, Image, Video and Chart. I had that all done, but I think I blew away that branch since it wasn't getting any traction. I'll work on those changes here shortly, shouldn't take too long.
Frame label is correctly displayed by Basic UI (or Android app).
Frame label="Maison" {
Group item=xxx
Group item=yyy
Group item=zzz
}
I haven't checked again, but a few years ago charts always had a label called Chart
when nothing was defined: https://github.com/openhab/openhab-core/issues/1351
Maybe that should be fixed first before all UIs start displaying "Chart" as label.
@Boby71 commented on Jan 9, 2021, 4:14 PM UTC:
The problem
When using a chart in a sitemap (no matter if created in the UI or .sitemap file), the title won't be displayed anymore: UI:
Code:
Result: Chart is being displayed, but without given title:
Expected behavior
When label= is being used, the label should be displayed as well
Steps to reproduce
Your environment
Browser console
Browser network traffic
Additional information
This issue was moved by ghys from openhab/openhab-webui#781.