Skip to content

Commit 7e07f71

Browse files
committed
Fixes for QA / uni nav. Also updated to use ‘auto’ for uninav user field
1 parent 472f256 commit 7e07f71

File tree

10 files changed

+21
-26
lines changed

10 files changed

+21
-26
lines changed

src/components/Grid/GridView.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@
228228

229229
.gridview-load-more {
230230
text-align: center;
231+
margin-bottom: 20px;
231232

232233
@media screen and (max-width: $screen-md - 1px) {
233234
padding: 2 * $base-unit 0;

src/components/Layout/Layout.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
:global {
44
.main-wrapper {
55
min-height: calc(100vh - 120px); // minus height
6-
padding-top: 120px;
7-
overflow: hidden;
86

97
@media screen and (max-width: $screen-md - 1px) {
108
padding-top: 0;

src/components/TopBar/NavBar.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ class NavBar extends Component {
2626

2727
componentDidMount() {
2828
if (!!this.headerIdRef && !this.uniNavInitialized) {
29-
const user = this.props.user
30-
const navigationUserInfo = user ? {
31-
...user,
32-
initials: getInitials(user.firstName, user.lastName),
33-
} : null
34-
const authToken = user ? user.token : null
35-
const isAuthenticated = !!authToken
36-
3729
this.uniNavInitialized = true
3830
const headerId = this.headerIdRef
3931
const authURLs = HEADER_AUTH_URLS
@@ -44,7 +36,7 @@ class NavBar extends Component {
4436
type: 'tool',
4537
toolName: 'Connect',
4638
toolRoot: '/',
47-
user: isAuthenticated ? navigationUserInfo : null,
39+
user: 'auto',
4840
signOut: () => {
4941
window.location = `${BASE}/logout?ref=nav`
5042
},

src/components/TopBar/ProjectToolBar.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { withRouter } from 'react-router-dom'
77
import { connect } from 'react-redux'
88
import ReactDOM from 'react-dom'
99
import { getNewProjectLink } from '../../helpers/projectHelper'
10-
import NotificationsDropdown from '../NotificationsDropdown/NotificationsDropdownContainer'
1110
import NewProjectNavLink from './NewProjectNavLink'
1211
import MobileMenu from '../MobileMenu/MobileMenu'
1312
import MobileMenuToggle from '../MobileMenu/MobileMenuToggle'
@@ -53,26 +52,20 @@ class ProjectToolBar extends React.Component {
5352
}
5453

5554
render() {
56-
const { renderLogoSection, userMenu, project, user, mobileMenu, location, orgConfig } = this.props
55+
const { project, user, mobileMenu, orgConfig } = this.props
5756
const { isTooltipVisible, isMobileMenuOpen } = this.state
5857

5958
return (
6059
<div className="ProjectToolBar">
6160
<div className="tool-bar">
62-
<div className="bar-column">
63-
{renderLogoSection()}
64-
</div>
61+
<div className="bar-column" />
6562
{project && project.name && <div className="bar-column project-name">
6663
<span ref="name" onMouseEnter={this.onNameEnter} onMouseLeave={this.onNameLeave}>{_.unescape(project.name)}</span>
6764
{isTooltipVisible && <div className="breadcrumb-tooltip">{_.unescape(project.name)}</div>}
6865
</div>}
6966
{project && project.name && <div className="bar-column project-name mobile"><span>{_.unescape(project.name)}</span></div>}
7067
<div className="bar-column">
7168
<NewProjectNavLink compact link={getNewProjectLink(orgConfig)} />
72-
{userMenu}
73-
{/* pass location, to make sure that component is re-rendered when location is changed
74-
it's necessary to hide notification dropdown on mobile when users uses browser history back/forward buttons */}
75-
<NotificationsDropdown location={location} />
7669
<MobileMenuToggle onToggle={this.toggleMobileMenu}/>
7770
</div>
7871
</div>

src/components/TopBar/ProjectToolBar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
width: 100%;
1919
height: 60px;
2020
background-color: $tc-black;
21+
padding: 0 20px;
2122

2223
@media screen and (max-width: $screen-md - 1px) {
2324
height: 50px;

src/components/TopBar/ProjectsToolBar.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { loadProjectsMetadata } from '../../actions/templates'
1414
import { getNewProjectLink } from '../../helpers/projectHelper'
1515
import { hasPermission } from '../../helpers/permissions'
1616
import { PERMISSIONS } from '../../config/permissions'
17-
import NavBar from './NavBar'
1817

1918
class ProjectsToolBar extends Component {
2019

@@ -158,7 +157,6 @@ class ProjectsToolBar extends Component {
158157
when={!!onLeaveMessage}
159158
message={onLeaveMessage}
160159
/>
161-
<NavBar user={user} />
162160
{isLoggedIn ? (<div className="primary-toolbar">
163161
{ !hasPermission(PERMISSIONS.SEARCH_PROJECTS) && <div className="projects-title-mobile">MY PROJECTS</div> }
164162
{

src/components/TopBar/ProjectsToolBar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
justify-content: space-between;
1717
user-select: none;
1818
padding: 0 20px;
19+
background: $tc-gray-05;
1920

2021
@media screen and (max-width: $screen-md - 1px) {
2122
height: auto;

src/components/TopBar/SectionToolBar.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import React from 'react'
1111
import PropTypes from 'prop-types'
1212
import { Link } from 'react-router-dom'
1313
import './SectionToolBar.scss'
14-
import ConnectLogoMono from '../../assets/icons/connect-logo-mono.svg'
1514
import XMark from '../../assets/icons/x-mark.svg'
1615

1716

1817
const SectionToolBar = (props) => {
19-
const logo = <Link key="logo" to="/" className="logo"><ConnectLogoMono className="icon-connect-logo-mono" /></Link>
18+
const logo = <div />
2019
const title = <div key="title" className="title">{props.title}</div>
2120
const close = <Link key="close" to="/" className="close"><XMark className="icon-x-mark" /></Link>
2221
const menu = props.menu ? <div key="menu" className="menu">{props.menu}</div> : null

src/components/TopBar/TopBarContainer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '../../config/constants'
1010
import ConnectLogoMono from '../../assets/icons/connect-logo-mono.svg'
1111
import { getAvatarResized, getFullNameWithFallback } from '../../helpers/tcHelpers.js'
12+
import NavBar from './NavBar'
1213
require('./TopBarContainer.scss')
1314

1415

@@ -88,7 +89,7 @@ class TopBarContainer extends React.Component {
8889
{ label: 'Account and security', link: '/settings/account' },
8990
{ label: 'Notification settings', link: '/settings/notifications' },
9091
]
91-
},
92+
},
9293
{
9394
items: [
9495
{ label: 'Log Out', link: logoutLink, absolute: true, onClick: logoutClick },
@@ -125,6 +126,7 @@ class TopBarContainer extends React.Component {
125126
<div className="TopBarContainer">
126127
<div className="tc-header tc-header__connect" id="TopToolbar">
127128
<div className="top-bar">
129+
<NavBar user={user} />
128130
{
129131
ToolBar &&
130132
<ToolBar

src/components/TopBar/TopBarContainer.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
@import '~tc-ui/src/styles/tc-includes';
22

33
:global {
4+
.TopBarContainer {
5+
position: sticky;
6+
top: 0;
7+
z-index: 4;
8+
}
9+
410
.login-wrapper {
511
align-items: center;
612
display: flex;
@@ -33,10 +39,11 @@
3339
background-color: $tc-black;
3440
z-index: 20;
3541
padding: 0 20px;
36-
position: fixed;
3742
top: 0;
3843
left: 0;
3944
right: 0;
45+
width: 100%;
46+
4047
@media screen and (max-width: $screen-md - 1px) {
4148
height: auto;
4249
line-height: 50px;
@@ -104,6 +111,9 @@
104111
.top-bar {
105112
background-color: $tc-black;
106113
position: relative;
114+
display: flex;
115+
flex-direction: column;
116+
107117
@media screen and (max-width: $screen-md - 1px) {
108118
height: auto;
109119
}

0 commit comments

Comments
 (0)