Skip to content

Commit 9ca028b

Browse files
author
vikasrohit
committed
Merge pull request #40 from reynard2007/FF1
Navbar - miscellaneous fixes
2 parents d214bdf + a5b6822 commit 9ca028b

File tree

7 files changed

+22
-10
lines changed

7 files changed

+22
-10
lines changed

components/Dropdown/Dropdown.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require('./Dropdown.scss')
22

3-
import React, { Component } from 'react'
3+
import React, { Component, PropTypes } from 'react'
44

55
class Dropdown extends Component {
66
constructor(props) {
@@ -25,7 +25,7 @@ class Dropdown extends Component {
2525

2626
currNode = currNode.parentNode
2727

28-
if(!currNode.tagName)
28+
if(!currNode)
2929
break
3030
} while(currNode.tagName)
3131

@@ -86,15 +86,15 @@ class Dropdown extends Component {
8686
<div className="dropdown-wrap" onClick={ this.onClick } ref="Dropdown">
8787
{
8888
this.props.children.map((child) => {
89-
if(child.props.className.indexOf('dropdown-menu-header') > -1)
89+
if(child.props.className === 'dropdown-menu-header')
9090
return child
9191
})
9292
}
9393

9494
<div className = {ndClasses}>
9595
{
9696
this.props.children.map((child) => {
97-
if(child.props.className.indexOf('dropdown-menu-list') > -1)
97+
if(child.props.className === 'dropdown-menu-list')
9898
return child
9999
})
100100
}
@@ -104,4 +104,8 @@ class Dropdown extends Component {
104104
}
105105
}
106106

107+
Dropdown.propTypes = {
108+
children: PropTypes.array.isRequired
109+
}
110+
107111
export default Dropdown

components/Navbar/Navbar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ $super-wide: 1376px;
6969
width: 25px;
7070
background-color: $placeholder-bg;
7171
margin: auto;
72+
cursor: pointer;
7273
}
7374
}
7475

components/SearchBar/SearchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class SearchBar extends Component {
5555
isPartial = popularList[i].toLowerCase().indexOf(searchValue.toLowerCase()) === 0
5656

5757
if(!typeaheadText && isPartial) {
58-
typeaheadText = popularList[i]
58+
typeaheadText = searchValue + popularList[i].substring(searchValue.length)
5959
}
6060

6161
if(isPartial) {

components/SearchBar/SearchBar.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ $active-icon-wrap-bg: #888894;
7777

7878
.search-bar__text,
7979
.search-typeahead-text {
80+
font-family: "Roboto", Arial, Helvetica, sans-serif;
8081
outline: 0px;
8182
border: 0px none;
8283
font-size: 17px;
@@ -95,8 +96,7 @@ $active-icon-wrap-bg: #888894;
9596
color: $accent-gray;
9697
display: none;
9798
z-index: 10;
98-
left: 17.5px;
99-
letter-spacing: 0.05em;
99+
left: 16.5px;
100100
}
101101

102102
.search-bar__clear {

components/SearchSuggestions/SearchSuggestions.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
color: $accent-gray-dark;
8080
font-size: 16px;
8181
line-height: 30px;
82+
white-space: nowrap;
83+
text-overflow: ellipsis;
84+
width: 95%;
85+
overflow-x: hidden;
8286
}
8387
}
8488

@@ -100,6 +104,9 @@
100104
bottom: 0;
101105
border: 0px none;
102106
outline: 0px none;
107+
white-space: nowrap;
108+
text-overflow: ellipsis;
109+
overflow-x: hidden;
103110
}
104111

105112
.footer-link:hover, .footer-link:active {

components/StandardListItem/StandardListItem.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class StandardListItem extends Component {
1313
super(props)
1414
}
1515
render() {
16-
const classes = 'StandardListItem ' + this.props.placeIcon
16+
const classes = 'StandardListItem transition ' + this.props.placeIcon
1717
let label
1818
let icon
1919

@@ -33,7 +33,7 @@ StandardListItem.propTypes = {
3333
showIcon : PropTypes.bool,
3434
showLabel : PropTypes.bool,
3535
imgSrc : PropTypes.string,
36-
labelText : PropTypes.string,
36+
labelText : PropTypes.node,
3737
placeIcon : PropTypes.string
3838
}
3939

components/UserDropdownMenu/UserDropdownMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class UserDropdownMenu extends Component {
3737
<img className="dropdown-arrow" src={ require('./arrow-small-down.svg') } />
3838
</div>
3939

40-
<div className="dropdown-menu-list user-menu-items-list">
40+
<div className="dropdown-menu-list">
4141
{
4242
userDropdownLists.map((list, i) => {
4343
return ( <ul key={ i }>

0 commit comments

Comments
 (0)