-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Use vector version of openHAB logo #1027
Conversation
Generally, a nice improvement 👍 |
It does display for me but not fully the way it should, I'll work on playing with the settings for the css and stuff and get it fixed for all devices. |
Hi @ecdye, I think it still needs some finetuning, though, e.g. the logo is huge on the HABot site. Note: Just making suggestions here, as I'm not in the position to make final decisions, that's up to @ghys. |
Oh I had forgotten to check on the HABbot site thanks for the reminder. A lot of those little icons were favicons I don't know how well it will work to replace them as not all web browsers currently support vector favicons, any thoughts on that @ghys |
I'd keep the favicons untouched since svg support is quite new. But I'd replace them by svg where else they have been used for convenience, e.g. the about site. |
Well, I actually don't use HABot so I think Ill actually save that for another day when I can properly test the UI and make sure it looks right. Why don't we just start with the mainUI for now. |
542a086
to
53037e7
Compare
Nice! And one 👍 extra for the svg favicon and keeping the png as fallback! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice initiative! I'll test it next week but this should make the logo crisper on retina displays and the like 👍
Why remove the icons which are referenced in the web app manifest though? https://github.com/openhab/openhab-webui/pull/1027/files#diff-126354c0cac3eaa37186ee3abdc3db5810ca6cb4e5f71061f1f87cf77a15533b
<?xml version="1.0" encoding="utf-8"?> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 170 37"> | ||
<style> | ||
@media (prefers-color-scheme: dark) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't quite right because the user can override the preferred color scheme in the help & about page.
When the dark mode is active though, the root html element will have the theme-dark
CSS class applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with either. Which would you prefer @ghys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a white only image deliberately because IMO the contrast ratio of the gray circle/"HAB" against a dark background is poor, especially compared to the orange parts which stand out as a result.
As for the favicon, in the png version the logo is inside a white circle.
I don't think it looks horrible either way but I'd stick to the white version in dark mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super familiar with this web system, any tips on the right css for the override on the svgs icons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a straightforward solution that makes it possible to use inline CSS styling like the current prefers-color-scheme: dark
.
I think for this to work the SVG has to be loaded inline, which would require using another webpack loader.
So, it's probably best to stick to two images.
You can probably focus on the main UI for now and update HABot later if you wish. I'm not sure about the specs for favicons and the like but every time there's a equivalent vector icon available it should in general be used - depending on browser support but I think they all have good support these days. |
Support for vector icons os good on all except Safari according to my tests. |
I didn't remove them, I just minified and updated them to be consistent with the other icons. |
My bad, I was confused by the red sizes and thought they were gone 🤦 |
@ghys Any chance for a review, I think I have addressed all your concerns. |
Thanks, almost all :) The favicon should still have the white background as before for the same reasons - you won't see the gray circle (or barely) if the background is also a shade a gray: Before/after: The version on the left still looks better IMO. And - more anecdotal - in the about page it's also fine to use a version of the logo with unaltered colors and a white background, instead of a monochrome version (and keep it pushed to the right to conserve vertical space): The logo on the top-left does look good and crisp though, nice! 👍 |
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
This also implements vector favicons for browsers that support it, support for browsers that do not allow vector favicons has not changed. Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
@ghys I think I got them all, does this look good? |
Job #107: Bundle Size — 10.43MB (-0.48%).Changed metrics (4/8)
Changed assets by type (3/7)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, thank you very much!
Thanks for this! |
Not very easily to my knowledge that would be a better project for the webui maintainers. |
Signed-off-by: Ethan Dye mrtops03@gmail.com