Skip to content
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

[Sitemap] Missing chart labels #1367

Closed
ghost opened this issue Jan 14, 2021 · 12 comments · Fixed by #2010
Closed

[Sitemap] Missing chart labels #1367

ghost opened this issue Jan 14, 2021 · 12 comments · Fixed by #2010
Labels
basic ui Basic UI bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jan 14, 2021

@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:
image

Code:

    Group label="Corona Statistik AT" {
        Text item=CoronaStatisticsAT_NewCases label="Neue Fälle"
        Text item=CoronaStatisticsAT_NewDeaths label="Neue Tote"
        Text item=CoronaStatisticsAT_Updated label="Daten vom [%1$td.%1$tm.%1$tY, %1$tH:%1$tm]"
        Chart icon="chart" item=CoronaStatisticsAT_NewCases refresh=60000 service="rrd4j" period="W" label="Neue Fälle"
    }

Result: Chart is being displayed, but without given title:
image

Expected behavior

When label= is being used, the label should be displayed as well

Steps to reproduce

  1. Create a chart with a lable
  2. Check page in basicUI

Your environment

runtimeInfo:
  version: 3.1.0
  buildString: "Build openhab/openhab-core#2127"
locale: de_AT
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+88-CA
  osName: Linux
  osVersion: 5.4.83-v7+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 84129568
  totalMemory: 194772992
bindings:
  - amazonechocontrol
  - coronastats
  - daikin
  - denonmarantz
  - enigma2
  - exec
  - harmonyhub
  - http
  - ipcamera
  - mqtt
  - netatmo
  - network
  - ntp
  - systeminfo
  - unifi
  - wled
  - worxlandroid
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1
    prefersColorScheme: dark
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: de
    languages:
      - de
      - de-DE
      - en
      - en-US
      - en-AU
    onLine: true
    platform: Win32
  screen:
    width: 1920
    height: 1080
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: dark
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/87.0.4280.141 Safari/537.36
timestamp: 2021-01-09T16:11:12.238Z

Browser console

image

Browser network traffic

image

Additional information

This issue was moved by ghys from openhab/openhab-webui#781.

@ghost
Copy link

ghost commented Jan 14, 2021

@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

@bigbasec
Copy link
Contributor

bigbasec commented Jan 23, 2021

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

@Boby71
Copy link

Boby71 commented Jan 24, 2021

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...

@bigbasec
Copy link
Contributor

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.

@Boby71
Copy link

Boby71 commented Jan 24, 2021

@ghys, what do you think about this offer?

@ghys
Copy link
Member

ghys commented Jan 25, 2021

Sure, I don't maintain Basic UI but every initiative to fix things up is welcome.

@bigbasec
Copy link
Contributor

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.

@cweitkamp cweitkamp added the UI label Jan 30, 2021
@Boby71
Copy link

Boby71 commented Feb 20, 2021

Who is taking this decision, @bigbasec mentioned above, @kaikreuzer ?

@kaikreuzer
Copy link
Member

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).

@bigbasec
Copy link
Contributor

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.

@lolodomo
Copy link
Contributor

lolodomo commented Jul 3, 2021

Frame label is correctly displayed by Basic UI (or Android app).

image

	Frame label="Maison" {
		Group item=xxx
		Group item=yyy
		Group item=zzz
	}

@kaikreuzer kaikreuzer transferred this issue from openhab/openhab-core Apr 26, 2022
@ghys ghys added the basic ui Basic UI label Apr 27, 2022
@mueller-ma
Copy link
Member

I haven't checked again, but a few years ago charts always had a label called Chart when nothing was defined: openhab/openhab-core#1351
Maybe that should be fixed first before all UIs start displaying "Chart" as label.

lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 8, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image.
Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image, chart, video, mapview and webview elements, if the label is
emppty, the header line is hidden.

For chart and image elements, there is now no upscale applied by
default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 11, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image.
Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image, chart, video, mapview and webview elements, if the label is
emppty, the header line is hidden.

For chart and image elements, there is now no upscale applied by
default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 11, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image.
Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image, chart, video, mapview and webview elements, if the label is
emppty, the header line is hidden.

For chart and image elements, there is now no upscale applied by
default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 16, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to switch between no upscale and upscale of the image. Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and webview elements.

For image and chart elements, the header line is always present so that user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the header line is hidden.

For chart and image elements, there is now no upscale applied by default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 16, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to switch between no upscale and upscale of the image. Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and webview elements.

For image and chart elements, the header line is always present so that user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the header line is hidden.

For chart and image elements, there is now no upscale applied by default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 16, 2023
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to switch between no upscale and upscale of the image. Header line for chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and webview elements.

For image and chart elements, the header line is always present so that user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the header line is hidden.

For chart and image elements, there is now no upscale applied by default (tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo changed the title [UIComponentsSitemapProvider] Missing chart labels [Sitemap] Missing chart labels Sep 4, 2023
kaikreuzer pushed a commit that referenced this issue Sep 9, 2023
…2010)

Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes #1939
Fixes #1367
Also related to #1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
stefan-hoehn pushed a commit to stefan-hoehn/openhab-webui that referenced this issue Sep 23, 2023
…penhab#2010)

Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this issue Sep 24, 2023
…penhab#2010)

Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this issue Sep 24, 2023
…penhab#2010)

Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
digitaldan pushed a commit to digitaldan/openhab-webui that referenced this issue Sep 24, 2023
…penhab#2010)

Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes openhab#1939
Fixes openhab#1367
Also related to openhab#1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants