Favicons for web UI - #1008
Conversation
There was a problem hiding this comment.
Actually doesn't this want to be OLA
There was a problem hiding this comment.
"Open Lighting Project" I think, assuming this shows up in FF etc
|
Thanks for doing this @dandaka ! I remember looking into it a year or so ago and then getting distracted, but it looks a lot easier now. |
|
I have fixed references to other projects. Please have a look. |
|
Why don't my files serve from webserver? Angular settings? |
|
The webserver is part of olad, so you'll need to do a full autoreconf/configure/make, then run olad/olad and browse to port 9090. You can probably fudge this given you don't necessarily care about the actual OLA stuff by just serving up olad/www from a webserver. You'll also need to add all the new files to olad/www/Makefile.mk or equivalent as appropriate, depending on their location. |
There was a problem hiding this comment.
I think judging on what we've done elsewhere in the file, these may need to be fully qualified with /new/ on the start. It would be good to be consistent anyway.
|
Re-reading your comment about olad, it sounds like you are running it up, did you also have the deb installed? If so you'll probably need to use the --http-data-dir option to serve it up from your WIP folder: There is some documentation for the new UI here: We've also got Grunt and all that magic, so you could add the relevant stuff in there to allow us to regenerate the favicons if we change our logo, it's probably worth chatting to @daveol about that: We've also got the RDM test server, if you fancy adding favicons to that too: And the RDM website :) : |
|
Which original image file did you use BTW, was it from https://github.com/OpenLightingProject/logos ? |
|
I've fixed descriptions. When you accept the pull request, I'll squash all this into a commit. Yes, I have used original logo from your repo. I was using I can post to https://github.com/OpenLightingProject/logos image, that I have used to generate favicons. And all favicons. So anyone could fork and use in other repositories. |
|
BTW, I have added @2x version of logo in new web UI. And fixed relative path according to your guide I'm running a simple webserver (from gulp) as you advised. |
|
Thanks for putting Twitter and Opengraph back. You needn't bother squashing, I regularly commit stuff unsquashed, in some cases with far more commits. Perhaps just add a note to https://github.com/OpenLightingProject/ola/blob/master/javascript/new-src/README.md mentioning which tools you used, and a link to which source image. Sorry, I misread/assumed gulp and grunt were compatible, or a sub or superset of each other. Would adding a gulp task just be a case of copying your boilerplate files? Do you fancy doing that instead? Did you not just use this image to make the favicon, or was it not big enough: I don't think we need every single favicon in the logos repo, as the number of those will just keep growing with new hardware, OSes and software, as long as we can generate them from an original. Did you give up trying to serve them via olad then? |
|
Regarding the 2x, that's great, I think that was what I was looking at ages ago, rather than favicons. Is there any reason you can't use our original logo-mini.png and this for the 2x? https://github.com/OpenLightingProject/logos/blob/master/web%20fitted/OLA-Logo-Fitted-22px%402x.png It's just we've then got the source Photoshop file too. |
|
The 2x stuff looks simple enough I might try updating our old UI too (unless you fancy doing the honours :) ) https://github.com/OpenLightingProject/ola/tree/master/olad/www . |
|
Sorry for that, fixed. |
There was a problem hiding this comment.
if you want to keep the favicons directory you will have to specify a new variable at the top, something like:
favicondir = $(www_datadir)/new/img/faviconsand the at the begin of the files that you want to end up in the favicons dir you would have to specify:
dist_favicon_DATA = \otherwise autotools will just end up putting them in the /new/img directory
|
You're almost there, you need to add the new content types to include/ola/http/HTTPServer.h too, which should fix the remaining Travis issues. |
|
Congratulations @dandaka you're changes are now passing all the tests (it just happens that flake8 has had pep8 updated, which has caused some existing code untouched by you to break). I'm just working on fixing that in #1014 so if you update when it's merged your tests should go green. There are just a few other outstanding comments, e.g. #1008 (comment) Thanks again for all your work on this; it gets easier after the first bit! :) |
Since a single pic is not a big deal, I have replaced them with better options. But you can always stick to old files, I just don't see any reason to do that. If I have missed some other comments, please point me to them. |
|
Can you resync please @dandaka and the checks should go green. |
|
Did that. |
|
Thanks @dandaka . This all looks great. Feel free to add yourself to here if you want a credit: Understood about the empty pixels. Do you have Photoshop? It would be superb if https://github.com/OpenLightingProject/logos/tree/master/web%20fitted could be updated so what's available there matches what's in the Web UI. The comment/request about favicons and 2x for the other interfaces would still be very welcome (as well as some other stuff in the existing UI that could be 2x, but I guess we'd need vector images for them). |
There was a problem hiding this comment.
https://en.wikipedia.org/wiki/ICO_%28file_format%29#MIME_type and http://stackoverflow.com/questions/13827325/correct-mime-type-for-favicon-ico suggest a MIME type of image/x-icon should be correct, would you mind changing to that please @dandaka ?
|
@peternewman Fixed issues with MIME. I consider fixing other icons with @2x a minor bug, which is not bothering right now. You are welcome to open an issue for me in https://github.com/OpenLightingProject/logos/ project. |
|
Thanks @dandaka . Issue raised here, I'll assign it when you accept the invitation: Understood about the other bits; I'm being cheeky really. Although TBH I didn't realise quite how easy it is to fix. |
|
You'll need to resync again please @dandaka . |
|
LGTM. Lets merge this. |
|
Great. @dandaka can you resync for a final time, then @ mention nomis52 and I and someone will hit the merge button. |
|
@nomis52 @peternewman Ready to merge. |
|
Thanks @dandaka ! |
|
Hurray, glad to contribute! |
|
The question is what's next @dandaka ! :) |
I have added favicons and changed index.html. But in my local olad I can't start webserver (Angular?) to start serving these files. It is serving all old files (like logo.png), but won't serve new once. Since all files are minified and there is no documentation, I thought it would be much easier for former developers to include these files.
@daveol please have a look