openhab-webui icon indicating copy to clipboard operation
openhab-webui copied to clipboard

OH 3.2 - 404 error for fonts and icon/number

Open Daniel-at-git opened this issue 3 years ago • 10 comments

The problem

I get some 404 errors in Chrome Console in basicUI image

(basicUI load fine I just saw this errors in console)

Expected behavior

No 404 errors in console ;-)

Steps to reproduce

Start Developer Tool (F12) and reload your basicUI

Your environment

root@openhab:~# openhab-cli info

Version:     3.2.0 (Build)

User:        openhab (Active Process 5900)
User Groups: openhab tty dialout audio

Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab          | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab/runtime  | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab            | openhab:openhab
             OPENHAB_CONF     | /etc/openhab                | openhab:openhab
             OPENHAB_LOGDIR   | /var/log/openhab            | openhab:openhab

I'm not an expert but is this the data for webui?

jar tf /var/lib/openhab/tmp/kar/openhab-addons-3.2.0/org/openhab/ui/bundles/org.openhab.ui.habpanel/3.2.0/org.openhab.ui.habpanel-3.2.0.jar |grep Roboto
web/fonts/roboto/Roboto-Regular.woff2
web/fonts/roboto/Roboto-Regular.eot
web/fonts/roboto/Roboto-Regular.ttf
web/fonts/roboto/Roboto-Regular.svg
web/fonts/roboto/Roboto-Regular.woff

Then we have to add "/roboto" to roboto.css. But I don't have an idea for 404 on numbers.

Daniel-at-git avatar Jan 11 '22 19:01 Daniel-at-git

@maggu2810 Is it broken by https://github.com/openhab/openhab-webui/commit/1a36cd49150eb262c2d05f1b41b94f13af34e161

Should we modify in bundles/org.openhab.ui.basic/src/main/resources/web/roboto.css all "fonts/" to "/habpanel/fonts/roboto/" or should Robot-Regular be bundled in basicui?

Daniel-at-git avatar Jan 16 '22 08:01 Daniel-at-git

Hi @Daniel-at-git, sorry I am not part of the "game" anymore. You need to discuss with active members.

maggu2810 avatar Feb 06 '22 10:02 maggu2810

Can someone else tell me if there is an architecture rule to bundle font with basic-ui or should I modify it to get it from habpanel?

Daniel-at-git avatar Feb 06 '22 11:02 Daniel-at-git

Should we modify in bundles/org.openhab.ui.basic/src/main/resources/web/roboto.css all "fonts/" to "/habpanel/fonts/roboto/" or should Robot-Regular be bundled in basicui?

Basic UI cannot "reference" habpanel, they are 2 different and independent UIs.

lolodomo avatar Feb 26 '22 12:02 lolodomo

Basic UI cannot "reference" habpanel, they are 2 different and independent UIs.

Technical we can reference it... So we have to add roboto font from habpanel https://github.com/openhab/openhab-webui/tree/main/bundles/org.openhab.ui.habpanel/web/fonts/roboto to basicui? This should be easy ;-)

Daniel-at-git avatar Feb 27 '22 12:02 Daniel-at-git

Can you propose the change after testing it?

lolodomo avatar Feb 27 '22 12:02 lolodomo

Can you propose the change after testing it?

lolodomo avatar Feb 27 '22 12:02 lolodomo

Can you propose the change after testing it?

Which one? Referencing Roboto Font from habpanel?

Daniel-at-git avatar Feb 27 '22 12:02 Daniel-at-git

Of course not. More the option to copy the fonts in Basic UI.

lolodomo avatar Feb 27 '22 15:02 lolodomo

Sorry, I give up... I don't understand the build system and directories.

In https://github.com/openhab/openhab-webui/blob/main/bundles/org.openhab.ui.basic/gulpfile.js#L19 you try to source some Roboto-Medium Fonts. But I didn't found the node_modules directory :-( Or is it fetched online via https://github.com/openhab/openhab-webui/blob/main/bundles/org.openhab.ui.basic/package-lock.json#L3403

I'm not a Java/Web developer....

Daniel-at-git avatar Mar 12 '22 10:03 Daniel-at-git

The bug still exists in OpenHab 3.3.

silviuchingaru avatar Oct 28 '22 06:10 silviuchingaru

This will be solved by the proposed fix removing the Roboto font (as unused). Regarding the number icon, that is true that an icon is missing in the classic iconset. One should be added.

lolodomo avatar Feb 16 '23 08:02 lolodomo

that is true that an icon is missing in the classic iconset. One should be added.

@lolodomo Should I open a new issue for icon? This issue has been closed....

Daniel-at-git avatar Feb 17 '23 17:02 Daniel-at-git

@lolodomo Should I open a new issue for icon? This issue has been closed....

Rather propose an icon (we need one version in PNG format and one in SVG format).

lolodomo avatar Feb 17 '23 23:02 lolodomo