Closed (fixed)
Project:
Navbar
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2013 at 23:44 UTC
Updated:
15 Apr 2016 at 20:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
saltednutWow... we have the same exact use case! Here is a patch with some icons for Workbench and Commerce UI.
Unsure if this is the best way to do this - perhaps navbar could allow for some type of hook that lets contribs supply their own icons?
Comment #2
saltednutScreenshot of #1

Comment #3
pjcdawkins commentedThanks for the patch!
I expect the navbar project would want to separate the CSS a bit for [other] contrib projects.
No hooks are needed evidently, because modules can just define/override the CSS and include the images (or data URIs).
But icons should be created in consistent sets, or even fonts, which was the crux of my OP. Your Commerce icon is a bit more complex than the rest (even though it's the Commerce Guys' logo, it's not so clear here where it's not in colour).
How to make these consistent? and might they be split up into different sets that could be defined by themes?
Comment #4
saltednutHmm yes a more basic cart icon would probably be better. Feel free to provide additional patches anyone who wants to better these icons.
Comment #5
pjcdawkins commentedChange to feature request so the module maintainers can have a look at this patch. Having these two extra icons is clearly a great improvement, no need for more ambitious plans for now I suppose.
Comment #6
saltednut@pjcdawkins - here is an alternate patch that does what you mentioned: I put the css for contrib icons in their own file and updated the 'store' icon for commerce to use a new "cart" that is more consistent with the other navbar icons. Even though I like the Commerce logo, I am not sure if we can even use it since its probably copyrighted and you are right- it doesn't register in grayscale. These icons can be used as they were drawn by me (using Gimp!).
Also attached is a new screenshot and a ZIP of the Gimp files I created for help with future contributions to this solution.

Comment #7
mrfelton commentedWould love to see an icon in there for the Apps module too.
Comment #8
mrfelton commentedComment #9
mrfelton commentedAdded an apps icon.

Comment #10
mrfelton commentedsomething up with that last patch. wont apply with drush make.
Comment #11
mrfelton commented3rd try, this time using --binary switch to git diff
Comment #12
saltednutbumping this. yes, thats right.
Comment #13
hass commentedI like this additions, but I think this should be added to the modules and integrated from there. So every module can add it's own icons.
Comment #14
pjcdawkins commentedRe. #13 I agree that there should be a more extensible system
Here are some ideal-world features:
... but, the perfect is the enemy of good. #11 is already a big improvement.
Comment #15
jessebeach commentedComment #16
saltednutDo we have a code example for how modules would define their own icon? I'd be happy to break the patch up if we can get some guidance here.
Comment #17
jessebeach commentedI've added a blurb about icons to the project description and the documentation page.
Comment #18
jessebeach commentedIf you just need to add CSS or JS, you can implement
hook_navbarand just return an#attachedkey with the necessary assets like this:I would rather we kept JS, CSS and icons with their respective modules. You'll have more control of the assets in the long run this way.
We pull the SVG icons from this library: https://github.com/ry5n/libricons
Also note that we're leading with SVGs and falling back to PNG like this:
Comment #19
jessebeach commentedThis fix has been in place for two weeks. I'm going to assume that it is working. If you find that the fix does not resolve the issue, please reopen this issue or create a new one.
Comment #20
saltednutHere is a quick patch for the latest navbar as of this posting. The next step is to break these out into individual patches for the contrib modules. Note: I am using a svg from wikimedia commons as it is free to reuse (http://commons.wikimedia.org/wiki/File:Shopping_cart_font_awesome.svg)
Comment #21
pjcdawkins commented@brantwynn: many thanks for that additional patch, I can confirm it works for me with the latest -dev of navbar. As you say, obviously it should be split into separate patches & issues for contrib modules.
Comment #22
jessebeach commentedComment #24
lsolesen commented@brantwynn Can you please clarify where you made the individual patches for the contrib?
Comment #25
saltednutRe #24 - I haven't gotten around to making those yet, but here is your model: #2217419: No Icon for second level nav bar
Comment #26
jweirather commented+1, and thanks for the work so far.
Comment #27
peterhebert commentedI have created a sandbox module that loads the icons and css for the Workbench and Store icons used in this issue thread. I thought this might be a good place to easily implement these icons, without needing to add them in the main Navbar module, at least as an interim solution. I welcome input and if there are other icons you want to add, please let me know on the issue queue for the module.
Thanks,
Comment #28
saltednutOkay. Honestly you should have probably created a new thread and referenced this one but whatever... kind of a zombie issue at this point.