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

convert toolbar icons to svg #5173

Merged
merged 2 commits into from
Nov 7, 2016
Merged

convert toolbar icons to svg #5173

merged 2 commits into from
Nov 7, 2016

Conversation

jkup
Copy link
Contributor

@jkup jkup commented Oct 27, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Fix #4852 #5210

Auditors @bsclifton @bbondy @bradleyrichter

Things needed to ship:

  • back and forward buttons need an svg for hover state
  • verified svg is missing from zip
  • design review from @bradleyrichter :)

After going over it with @bradleyrichter here is how it currently looks:

icons

Also here is the windows version:

capture

Testing:

The 5 possible buttons to the left of the urlbar have all been replaced. This includes back, forward, stop, reload and home.

  1. Test back / forward functionality. They should both work as before and now the color should not change but the button's background should turn white and have a small shadow.
  2. Test reload and stop. Functionality should be the same as before but they should now have the same hover effect as back / forward.
  3. In preferences > general enable home page button and make sure it looks well with the others and has the same hover style.
  4. After visiting a verified publisher (such as clifton.io) go to Preferences > Payments and make sure the new verified icon (a green hexagon with a white checkmark) shows up and looks good.

@jkup jkup added this to the 0.12.8dev milestone Oct 27, 2016
@jkup jkup added the design A design change, especially one which needs input from the design team. label Oct 27, 2016
@bradleyrichter
Copy link
Contributor

That should work. We will need a hover state for all buttons. Shall we use the same approach?

@jkup
Copy link
Contributor Author

jkup commented Oct 27, 2016

Only if there is a background color change which I think is back and forward buttons only

@bbondy bbondy modified the milestones: 0.12.9dev, 0.12.8dev Oct 27, 2016
@jkup jkup force-pushed the svg-conversion branch 2 times, most recently from 53be983 to 6e7792a Compare October 27, 2016 21:37
@jkup
Copy link
Contributor Author

jkup commented Oct 27, 2016

@bsclifton I mentioned to you that we could get the backbutton / forwardbutton hover effect working with just a single image. I implemented that but would love it if you'd take a look at the approach (https://github.com/brave/browser-laptop/pull/5173/files#diff-303f0b6a297506f2cc18bf7b4cb370c5R912) If this approach works we can ship without additional SVGs.

Also, for the life of me I can't figure out why on my branch the entire center navigation is pushed slightly to the right. If anyone could help me figure that out it would be greatly appreciated!

@bsclifton
Copy link
Member

Checking this out now...

@bsclifton
Copy link
Member

Great job! 😄 For folks following along, here's a screen cap of what it looks like on hover:
screen shot 2016-10-27 at 11 00 06 pm

I did notice this though, with the navigationButton class; it doesn't fill the parent div entirely, so you can put the mouse over and it won't apply the hover style (compare to the above shot):
screen shot 2016-10-27 at 10 56 57 pm

Here's a shot where you can see the bounds:
screen shot 2016-10-27 at 11 02 12 pm

@bsclifton
Copy link
Member

bsclifton commented Oct 28, 2016

@jkup for the offset issue, you're gonna wanna check here:

@centerOffset: @navbarLeftMarginDarwin + 2 * (@navbarButtonWidth + @navbarButtonSpacing) // width area on the left

The nav button sizes are stored in variables.less and this centerOffset uses those for the calculation. Hope this helps 😄

@bsclifton
Copy link
Member

bsclifton commented Oct 28, 2016

Here's a shot on Windows- the star icon and the element surrounding it seems to have an issue:
image

Otherwise looks great 👍 (besides the parts not finished yet, which are still WIP)

@jkup jkup force-pushed the svg-conversion branch 3 times, most recently from 22c9249 to dde1e09 Compare November 2, 2016 06:43
@jkup jkup changed the title [WiP] convert toolbar icons to svg convert toolbar icons to svg Nov 2, 2016
@bradleyrichter
Copy link
Contributor

@jkup This is looking great. The main thing missing is to reduce the size of the "X" (stop loading) button icon. I think about 30% smaller will be good.

@jkup
Copy link
Contributor Author

jkup commented Nov 2, 2016

@bradleyrichter reduced the size! still need to make sure it looks good on Windows before shipping.

@jkup jkup force-pushed the svg-conversion branch 3 times, most recently from 710eced to 8152c32 Compare November 3, 2016 20:02
@bsclifton bsclifton self-assigned this Nov 3, 2016
@bsclifton
Copy link
Member

bsclifton commented Nov 4, 2016

Couple of small things (doh) - I checked in some changed fixing these items (see my commit)

dropdown under back / forward

When you have a few things in your back/forward cache and you do a long press, the drop down isn't positioned correctly
screen shot 2016-11-04 at 1 35 21 am

I fixed this by passing in the target (instead of the rect) from our custom LongPressButton control and then doing the target.parentNode trick (like you did for the hamburger menu). Here's the fixed one:
screen shot 2016-11-04 at 1 47 57 am

new tab button

is this how it should look on mouse hover?
screen shot 2016-11-04 at 1 49 34 am

Assuming that's right, the position seems to be off:
screen shot 2016-11-04 at 1 57 03 am

I made some tweaks to it and here's how it looks now:
screen shot 2016-11-04 at 1 58 27 am

hamburger

hamburger had 2 pixels gap (was needed with the old hamburger icon, but not this)-
screen shot 2016-11-04 at 2 00 29 am

Removed that so it matches the current look (before element was resized to for ellipsis)
screen shot 2016-11-04 at 2 01 56 am

also updated cursor to be default; if you click and drag in that area, it would show the text input as your cursor (weird).

@jkup jkup force-pushed the svg-conversion branch 2 times, most recently from a52c810 to 4e939f2 Compare November 5, 2016 19:41
@bsclifton
Copy link
Member

@jkup let me know when this is ready for re-review 😄

@jkup
Copy link
Contributor Author

jkup commented Nov 6, 2016

@bsclifton meant to update you -- should be ready for re-review. I could go either way on the position on the buttons on Windows. If you'd like them bumped up 1 px let me know but I think they look good!

@bradleyrichter
Copy link
Contributor

Mac looks great but still needs a reduction for the stop icon.

Windows needs a 1px nudge up for the bookmark star and the actual URL text string.

On Nov 6, 2016, at 11:43 AM, Jon Kuperman notifications@github.com wrote:

@bsclifton meant to update you -- should be ready for re-review. I could go either way on the position on the buttons on Windows. If you'd like them bumped up 1 px let me know but I think they look good!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@jkup
Copy link
Contributor Author

jkup commented Nov 7, 2016

@bradleyrichter fixed and fixed

@bsclifton
Copy link
Member

Checking this out right now... 😄

jkup and others added 2 commits November 7, 2016 01:09
- move star up 1px
- make reload/stop/home the same size (on hover) as back/forward
  - move reload/stop/home out of `startButtons` and into `navigator`
  - change reload/stop/home to pos relative, move down 3 px

Changes tested on Windows
@bsclifton
Copy link
Member

bsclifton commented Nov 7, 2016

Checked in some small tweaks after testing locally (otherwise great!)

  • move star up 1px
  • make reload/stop/home the same size (on hover) as back/forward
    • move reload/stop/home out of startButtons and into navigator
    • change reload/stop/home to pos relative, move down 3 px

Here's a screencap showing the hover state for reload/stop being the same size as back/forward
screen shot 2016-11-07 at 1 09 10 am

Here's a screenshot showing the whole thing on Windows
screen shot 2016-11-07 at 1 15 03 am

@bsclifton
Copy link
Member

Looks good to me! 😄

@bbondy before I merge, did you want to cherry pick the commits and give it a spin? I screen capped the buttons and zoomed in, measured the pixels on each (on Windows + Mac). I had tweaks (see commits) and it should be good to go now

@bbondy
Copy link
Member

bbondy commented Nov 7, 2016

I'll merge and see it on master, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants