Skip to content
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

Improve tab contrast #6912

Merged
merged 14 commits into from
Nov 25, 2020
Merged

Improve tab contrast #6912

merged 14 commits into from
Nov 25, 2020

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Oct 21, 2020

Resolves brave/brave-browser#2735
Resolves brave/brave-browser#8807

dark mode window
Screen Shot 2020-11-16 at 3 04 32 PM
Screen Shot 2020-11-16 at 3 34 31 PM

private window
Screen Shot 2020-11-16 at 3 04 44 PM
Screen Shot 2020-11-16 at 3 04 56 PM

tor window
image
image

Profile menu bubbles
Screen Shot 2020-11-18 at 11 49 28 AM
Screen Shot 2020-11-18 at 11 49 34 AM

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@simonhong
Copy link
Member Author

simonhong commented Nov 16, 2020

@karenkliu PTAL updated colors with below dmg (nightly).
All colors are updated except custom graphic on title bar bg. (custom graphic is in-progress)
I didn't change hover colors of omnibox because brave/brave-browser#2735 doesn't have new hover colors.
Please check hover colors.
https://drive.google.com/file/d/1Ycapkk2pfsApvl_41UUBLevrSLGDQCGA/view?usp=sharing

@karenkliu
Copy link

karenkliu commented Nov 16, 2020

@simonhong Thanks for the update! I found a few minor issues -

The browser profile dropdown menu should have some updated text; it's not using the correct name for our windows:
image

The hover colors of omnibox for Private Window and Private Window with Tor look fine to me. But let's change the normal window (dark theme) omnibox hover color to #23252F so it matches the other windows better:

image

@simonhong simonhong force-pushed the tab_contrast branch 3 times, most recently from 52318a3 to 146ad12 Compare November 17, 2020 16:15
@karenkliu
Copy link

@simonhong Sorry - I noticed there was a typo in my earlier comment. For the Private Window browser profile menu, it should say "Exit Private Window" as the option. I've updated it the image.

@simonhong simonhong force-pushed the tab_contrast branch 3 times, most recently from 6c7b387 to 30f7399 Compare November 18, 2020 01:04
@simonhong simonhong marked this pull request as ready for review November 18, 2020 01:32
@simonhong simonhong requested a review from a team as a code owner November 18, 2020 01:32
@simonhong simonhong changed the title Tab contrast Improve tab contrast Nov 18, 2020
@simonhong
Copy link
Member Author

@karenkliu All specs are applied. Will share new dmg after building.

@simonhong
Copy link
Member Author

Copy link

@karenkliu karenkliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 👏 👏 👏 Nice job!

Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. One minor text change from reading it. Just waiting for a build and then will review further, but for now this is only feedback. Nice work!

Private with Tor
</message>
<message name="IDS_TOR_AVATAR_BUTTON_TOOLTIP_TEXT" desc="The tooltip text of tor avatar button.">
This is private window with tor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing " a" and capitalization of "Tor":

This is a private window with Tor

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it still has the old spelling?
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsclifton Oops, something happened while rebasing. fixed again. Thanks for checking!

@@ -22,6 +22,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="brave/product_logo_32_dev.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEVELOPMENT" file="brave/product_logo_32_development.png" />
<if expr="not is_android">
<structure type="chrome_scaled_image" name="IDR_TOR_WINDOW_FRAME_GRAPHIC" file="brave/tor_window_frame_graphic.png" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest - did you try a scalable .icon instead of PNG?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try because .icon only works well for icon type(square) and mono color.

@simonhong simonhong force-pushed the tab_contrast branch 2 times, most recently from 7317f5c to 622195b Compare November 19, 2020 08:41
@bsclifton
Copy link
Member

bsclifton commented Nov 19, 2020

Might be Windows only - but it looks like Private Windows and Private Window with Tor are the same color? (for the window chrome; not the tab contents) Definitely doesn't show the contrast shown in your screenshots above
image

Easier to see screenshot
image

@simonhong
Copy link
Member Author

@bsclifton Hmm, it's strange. coloring is cross-platform implementation and it seems fine on my local.
I assume it depends on monitor specification?
image
image

@simonhong
Copy link
Member Author

simonhong commented Nov 19, 2020

@bsclifton I'll try rebuild and double check again. I rebased but maybe recent IsTorProfile() deprecation could affect.
My above screenshot is from the image before rebasing. (it was ok on macOS after rebasing)

@bsclifton
Copy link
Member

bsclifton commented Nov 20, 2020

There we go - much better! Confirmed colors are working as expected now 😄👍 Will check out the rest now...

bounds_to_frame_graphic.Inset(0, kFrameBorderOutlineThickness);
canvas->ClipRect(bounds_to_frame_graphic);
}
frame_graphic_->Paint(canvas, bounds_to_frame_graphic);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool! I had no idea it would be this easy to add the graphic up there 😄 Nice work!

@@ -41,6 +41,20 @@ class BraveLocationBarViewFocusRingHighlightPathGenerator
DISALLOW_COPY_AND_ASSIGN(BraveLocationBarViewFocusRingHighlightPathGenerator);
};

base::Optional<SkColor> GetFocusRingColor(Profile* profile) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect! nice and clean code too 😄👌

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out- works great! Code also looks good too- minus one spelling problem. Hit me up once you can address that and I'll re-review / approve 😄 Great work here @simonhong and @karenkliu!

@simonhong
Copy link
Member Author

Kindly ping to @brave/patch-reviewers ..


content::BrowserContext* ThemeServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
+ BRAVE_THEMESERVICEFACTORY_GETBROWSERCONTEXTTOUSE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we redefine the method in chromium_src instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkarolin Yes. I did :) PTAL.

@simonhong simonhong requested a review from mkarolin November 24, 2020 02:20
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chromium_src and patches changes LGTM!

As we use different theme colors for tor window(previously, same with private), we should
differentiate tor and private profile from ThemeHelper. However, upstream chromium uses
only two kinds of theme provider. One for orignal theme provider and the other is incognito
theme provider. If we want to add another theme provider for tor, it will add many patch files.
So, I think using different theme service for tor profile is simplest way to have tor specific
theme colors.
@simonhong
Copy link
Member Author

Got all green. 🎉 Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants