Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

convert URL bar FA icons to sprite PNG (or SVG) #5891

Closed
bradleyrichter opened this issue Nov 29, 2016 · 18 comments
Closed

convert URL bar FA icons to sprite PNG (or SVG) #5891

bradleyrichter opened this issue Nov 29, 2016 · 18 comments
Labels
design A design change, especially one which needs input from the design team. feature/URLbar polish Nice to have — usually related to front-end/visual tasks.

Comments

@bradleyrichter
Copy link
Contributor

bradleyrichter commented Nov 29, 2016

Using a sprite grid for our URL icons will allow us to control the alignment of each icon more easily within the image file without the need for unreliable pixel bumping in CSS.

20 icon positions are available initially.

Each icon is centered on the grid.

image

A1 - unused (future verified certificate)
A2 - HTTPS (secure)
A3 - unused (future mixed HTTPS)
A4 - HTTP (non-secure)
A5 - unused (normal file)
A6 - search (normal)
A7 - unused (info)
A8 - alert page (all error results pages)
A9 - brave payments = yes
A10 - all brave about:pages

B1 - verified tag (used in brave payment table)
B2 - brave hosted page
B3 - unused (brave alert)
B4 - HTTP for title mode (non-secure)
B5 - unused (normal file - grey)
B6 - unused (search - grey)
B7 - unused (info - grey)
B8 - noscript active
B9 - brave payments = no
B10 - unused (all brave about:pages - grey)

url_bar_icon_sprite 3x

url_bar_icon_sprite 2x

url_bar_icon_sprite 1x

@bradleyrichter bradleyrichter added polish Nice to have — usually related to front-end/visual tasks. design A design change, especially one which needs input from the design team. feature/URLbar labels Nov 29, 2016
@bradleyrichter bradleyrichter added this to the 0.13.0 milestone Nov 29, 2016
@bradleyrichter
Copy link
Contributor Author

CC @bbondy

@bbondy
Copy link
Member

bbondy commented Nov 29, 2016

nice work!

@bsclifton
Copy link
Member

Starting to implement these using Aphrodite! So far, so good 😄

@bsclifton
Copy link
Member

@bradleyrichter I made good progress with this last nite (which you can see here: https://github.com/bsclifton/browser-laptop/commit/9091b3170d4906bc8a134108d26d2d73003656ae), but I was not able to finish it unfortunately. Would you be OK if we bumped this to 0.13.1? None of the urlbar icons have changed or gotten worse between 0.12.10 and now

@luixxiul
Copy link
Contributor

I thought they should be SVG instead of PNG? @bradleyrichter

@bradleyrichter
Copy link
Contributor Author

bradleyrichter commented Nov 29, 2016

@luixxiul SVGs have no margin and therefore can not be visually aligned in a grid line. (unless there is a way that I have not seen yet)

PNGs allow us to simplify the code and use centering. If a bump is needed, it's done in the image file.

@cndouglas
Copy link

So will the PNGs still work with high-resolution displays and accessibility?

@bradleyrichter
Copy link
Contributor Author

bradleyrichter commented Nov 30, 2016

@luixxiul - I found a way that SVG may still work. We will test it.

@liunkae - PNGs will still be crisp on high-res displays with the 1x/2x/3x approach.

@bsclifton
Copy link
Member

bsclifton commented Nov 30, 2016

@bradleyrichter I shared some notes on Slack; I'd vote to stick with PNG for now but we should proof of concept something (might be a good example on about:styles)

@gyandeeps
Copy link
Contributor

gyandeeps commented Dec 11, 2016

I use svg at work and they way better in terms of responsive design, scalibility, etc. Based on what i have seen in the code, I think we have over polluted our css with alignment correction thats why we are facing issue with icon alignments.
Secondly, (major part of the problem) that our svg canvas size is 32 X 32 and the icon design inside it only occupies 1/3 area. Ideally your icon should cover the whole canvas area for every svg to be consistent.

Example with issue: https://github.com/brave/browser-laptop/blob/master/img/bitcoin_color.svg
Example of a good svg: https://github.com/eslint/eslint.github.io/blob/master/img/logos/disqus.svg

Suggestion: We should stick with svg and update the svg files to be consistent on our standrd canvas size and the icon should occupy the whole canvas. With that we can remove a lot of css hacks for positioning.

@bsclifton
Copy link
Member

bsclifton commented Dec 14, 2016

@gyandeeps If you were up for helping with regards to SVG, we could definitely use your help 😄

I'll finish this particular issue using sprites (since it's almost done already)... but you can reach out to @bradleyrichter (over Slack might be easiest) to get a copy of the above as an SVG sprite. We could use your help understanding if it looks OK or what could be better 😄

@gyandeeps
Copy link
Contributor

@bsclifton I can help to get alignment work done for sure. Since i am no expert in creating svg files that's where we would need a person who has that expertise.

@bsclifton bsclifton changed the title convert URL bar FA icons to sprite PNG convert URL bar FA icons to sprite PNG (or SVG) Jan 22, 2017
@gyandeeps gyandeeps self-assigned this Jan 22, 2017
@bsclifton bsclifton modified the milestones: 0.13.3, 0.13.2 Jan 31, 2017
@bsclifton
Copy link
Member

I don't think this will make the cut for 0.13.2; moving back to 0.13.3 for now

@bbondy bbondy removed this from the 0.13.5 milestone Feb 15, 2017
@bbondy bbondy modified the milestones: 0.13.6, 0.13.5 Feb 15, 2017
@bsclifton
Copy link
Member

@gyandeeps you did a great job with the preferences page (captured in #6904). Would you like to give this one a go? I had completed this a while back but with PNG (link shown above). If not, it's OK- let me know 😄

@bsclifton bsclifton added this to the 0.13.6 milestone Feb 27, 2017
@gyandeeps
Copy link
Contributor

I am ok with working on this. But i think we should do the aphrodite work first if needed and then do svg work. I just dont want to mix the 2 and complicate the stuff. If that work is already done then i can work on this.
Also when i did svg work i cleaned up DOM (remove unnecessary div, etc) also. That what i plan on doing. Which adds more complexity.

@bsclifton
Copy link
Member

bsclifton commented Feb 27, 2017

@gyandeeps OK that sounds good- I'll keep self assigned for now and look at converting to Aphrodite (which I had done above, just needs a rebase). At that point (as long as the SVGs are the correct size, etc), it should be plug-n-play 😄

@bsclifton
Copy link
Member

Moving back to post 1.0

@bradleyrichter when you have a chance, you can attach the images in SVG format (now that we understand how to do it properly). Then I'll be able to knock this out 😄

@bsclifton bsclifton modified the milestones: 1.2.0, 0.13.6 Mar 2, 2017
@bsclifton bsclifton assigned jamesmudgett and unassigned gyandeeps Mar 22, 2017
@NejcZdovc NejcZdovc assigned NejcZdovc and unassigned jamesmudgett and bsclifton Mar 26, 2017
@NejcZdovc NejcZdovc removed their assignment May 12, 2017
@alexwykoff alexwykoff modified the milestones: 1.2.0, Backlog Nov 1, 2017
@bsclifton bsclifton removed this from the Triage Backlog milestone Aug 23, 2018
@bsclifton
Copy link
Member

@petemill closed out most of these issues with recent style update 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design A design change, especially one which needs input from the design team. feature/URLbar polish Nice to have — usually related to front-end/visual tasks.
Projects
None yet
Development

No branches or pull requests

9 participants