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

Fixes url bar shape when payment is disabled #8207

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Apr 10, 2017

  • 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).

Resolves #8170

Auditors

@srirambv @bsclifton

Test Plan

  • with payments disabled visit a site
  • url border should be shaped

@NejcZdovc NejcZdovc added this to the 0.14.2 milestone Apr 10, 2017
@NejcZdovc NejcZdovc self-assigned this Apr 10, 2017
@bsclifton
Copy link
Member

@srirambv would you be able to give this one a go? 😄

@@ -242,7 +246,7 @@ class NavigationBar extends ImmutableComponent {
urlbar={this.props.navbar.get('urlbar')}
onStop={this.onStop}
menubarVisible={this.props.menubarVisible}
noBorderRadius={!isSourceAboutUrl(this.props.location)}
noBorderRadius={(isSourceAboutUrl(this.props.location) && this.isPublisherButtonEnabled) || this.isPublisherButtonEnabled}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you don't need to check aboutUrls since it will return false with UrlUtil.isHttpOrHttps.

noBorderRadius={this.isPublisherButtonEnabled} should work as expected

Copy link
Contributor Author

@NejcZdovc NejcZdovc Apr 11, 2017

Choose a reason for hiding this comment

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

Let me try to rework it. I found another example that is not working correctly:

13

Resolves brave#8170

Auditors: @srirambv @bsclifton

Test Plan:
- with payments disabled visit a site
- url border should be shaped
@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Apr 11, 2017

@bsclifton @cezaraugusto I changed the logic now to be the same as is for publisherToggle component. This way as soon as we display publisher icon we change the shape of the url bar.

@srirambv
Copy link
Collaborator

Tested on Windows. Looks good and neat 👍

Copy link
Contributor

@cezaraugusto cezaraugusto 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

@cezaraugusto cezaraugusto merged commit 6293496 into brave:master Apr 11, 2017
bsclifton pushed a commit that referenced this pull request Apr 11, 2017
Resolves #8170

Auditors: @srirambv @bsclifton

Test Plan:
- with payments disabled visit a site
- url border should be shaped
@luixxiul luixxiul removed the request for review from bsclifton April 17, 2017 16:42
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.

5 participants