openhab-webui
openhab-webui copied to clipboard
OH 3.2 - 404 error for fonts and icon/number
The problem
I get some 404 errors in Chrome Console in basicUI
(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.
@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?
Hi @Daniel-at-git, sorry I am not part of the "game" anymore. You need to discuss with active members.
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?
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.
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 ;-)
Can you propose the change after testing it?
Can you propose the change after testing it?
Can you propose the change after testing it?
Which one? Referencing Roboto Font from habpanel?
Of course not. More the option to copy the fonts in Basic UI.
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....
The bug still exists in OpenHab 3.3.
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.
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....
@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).