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

Made urlBarIconContainer clickable to display connection info. Fix #7888 #13147

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions app/renderer/components/navigation/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ class UrlBar extends React.Component {
}
}

onUrlBarIconContainerClick () {
windowActions.setSiteInfoVisible(true)
}

onBlur (e) {
windowActions.urlBarOnBlur(getCurrentWindowId(), e.target.value, this.props.urlbarLocation, eventElHasAncestorWithClasses(e, ['urlBarSuggestions', 'urlbarForm']))
}
Expand Down Expand Up @@ -497,13 +501,13 @@ class UrlBar extends React.Component {

render () {
const urlbarIconContainer = this.props.evCert
? (<div className='urlbarIconContainer'>
? (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
{this.showEvCert}
</div>)
: (<div className='urlbarIconContainer'>
: (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
Expand All @@ -513,13 +517,13 @@ class UrlBar extends React.Component {
urlbarForm: true,
[css(styles.urlbarForm_wide)]: this.props.isWideURLbarEnabled,
noBorderRadius: this.props.publisherButtonVisible
})}
})}
Copy link
Member

Choose a reason for hiding this comment

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

lint error here

id='urlbar'
>
{urlbarIconContainer}
{
this.props.titleMode
? <div id='titleBar' data-test-id='titleBar'>
? <div id='titleBar' data-test-id='titleBar' >
Copy link
Member

Choose a reason for hiding this comment

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

this extra space at the end is also causing the linter to fail; you can manually run this with:
npm run lint

<span><strong>{this.props.hostValue}</strong></span>
<span>{this.props.hostValue && this.titleValue ? ' | ' : ''}</span>
<span>{this.titleValue}</span>
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ globalStyles.color.chromeBorderColor = globalStyles.color.chromePrimary
globalStyles.color.chromeControlsWarningBackground = globalStyles.color.chromePrimary
globalStyles.color.audioColor = globalStyles.color.highlightBlue
globalStyles.color.focusUrlbarOutline = globalStyles.color.highlightBlue
globalStyles.color.siteSecureColor = globalStyles.color.buttonColor
globalStyles.color.loadTimeColor = globalStyles.color.highlightBlue
globalStyles.color.activeTabDefaultColor = globalStyles.color.chromePrimary

Expand Down
14 changes: 6 additions & 8 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@
}
}

@urlbarFormHeight: 25px;

.urlbarForm {
position: relative; // PR #6485
width: 0; // Fixes #4298
Expand Down Expand Up @@ -619,8 +617,7 @@
color: @chromeText;

// #4922
// TODO: replace this value with a CSS variable to add a dark UI.
background: #fff;
background: @chromeControlsBackground2;
}

@media (max-width: @breakpointNarrowViewport) {
Expand Down Expand Up @@ -825,7 +822,7 @@
justify-content: center;
height: @urlbarFormHeight;
min-height: @urlbarFormHeight;
margin: 0 5px;
margin-right: 5px;
max-width: 40%;

.urlbarIcon {
Expand All @@ -835,7 +832,7 @@
background-position: center;
position: relative;
bottom: -1px;
margin-left: 3px;
padding: 5px 7px 5px 7px;

// about:newtab
&.fa-search {
Expand Down Expand Up @@ -863,8 +860,9 @@

.evCert {
font-size: 12px;
color: forestgreen;
padding: 5px;
font-weight: 500;
color: @siteEVColor;
padding-right: 5px;
border-right: 1px solid #ccc;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
3 changes: 2 additions & 1 deletion less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@settingItemSubtextFontSize: 0.95rem;
@audioColor: @highlightBlue;
@focusUrlbarOutline: rgba(55, 169, 253, 0.4);
@siteSecureColor: @buttonColor;
@siteSecureColor: green;
Copy link
Contributor

@NejcZdovc NejcZdovc Feb 16, 2018

Choose a reason for hiding this comment

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

@bsclifton this line is problematic as well, because I think that we only want EV to be green

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just replacing green with @siteEVColor fixes it

@siteInsecureColor: #C63626;
@siteEVColor: green;
@loadTimeColor: @highlightBlue;
Expand All @@ -52,6 +52,7 @@
@braveDarkOrange: #D44600;
@dragSpacing: 50px;
@urlBarOutline: #bbb;
@urlbarFormHeight: 25px; // added

@navbarHeight: 36px;
@downloadsBarHeight: 60px;
Expand Down