Skip to content

Commit

Permalink
fixes for header and ios touch scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgary committed Jul 10, 2018
1 parent b9f9157 commit 223f903
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ims-shared-client",
"version": "6.2.3",
"version": "6.2.5",
"description": "",
"babel": {
"presets": [
Expand Down
24 changes: 14 additions & 10 deletions src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ class Header extends BaseComponent {
const badge = link.badgeCount > 0 ? <span className={`badge ${link.badgeClass}`}>{link.badgeCount}</span> : null

return (
<li key={`menu-${parentText}-${li}-${link.text}`} className='dropdown-item nav-link'>
<Link key={link.text} to={link.url} role='user' label={link.text}>
<Link key={link.text} to={link.url} role='user' label={link.text} className='dropdown-item nav-link'>
<li key={`menu-${parentText}-${li}-${link.text}`}>

<i className={link.faIcon} /> {link.text} {badge}
</Link>
</li>

</li>
</Link>
)
})

Expand Down Expand Up @@ -57,11 +59,13 @@ class Header extends BaseComponent {
const badge = link.badgeCount > 0 ? <span className={`badge ${link.badgeClass}`}>{link.badgeCount}</span> : null

return (
<li key={`menu-${link.text}-${lIndex}`} className='nav-item'>
<Link key={link.text} to={link.url} className='nav-link' label={link.text}>
<Link key={link.text} to={link.url} className='nav-item nav-link' label={link.text}>
<li key={`menu-${link.text}-${lIndex}`}>

<i className={link.faIcon} aria-hidden='true' /> {link.text} {badge}
</Link>
</li>

</li>
</Link>
)
}
})
Expand Down Expand Up @@ -117,10 +121,10 @@ class Header extends BaseComponent {
releaseNotes={PackageInformation.releaseNotes || {}} />
</li>
<li className='my-auto d-md-none d-lg-block'>
<FeedbackButton hubUrl={window.__HUB_URL__} icon='fa-smile' className='nav-link' user={this.props.user} />
<FeedbackButton hubUrl={window.__HUB_URL__} icon='fa-smile-o' className='nav-link' user={this.props.user} />
</li>
<LoggedInUser user={this.props.user}
style={navBarStyle}

profileDropdownItems={this.props.profileDropdownItems}
flushNotificationQueue={this.props.flushNotificationQueue}
isFlushingNotificationQueue={this.props.isFlushingNotificationQueue} />
Expand Down
19 changes: 11 additions & 8 deletions src/components/LoggedInUser/LoggedInUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export class LoggedInUser extends BaseComponent {
const anchorClasses = classNames('nav-link dropdown-toggle', {
[styles.profileImage]: this._hasProfileImage()
})

const profileItems = this.props.profileDropdownItems ? this.props.profileDropdownItems() : undefined

return (
<li className='nav-item dropdown'>
<a
Expand All @@ -58,13 +59,15 @@ export class LoggedInUser extends BaseComponent {
{this._renderProfileImage()} {this.props.user.displayName} <span className='caret' />
</a>
<ul className='dropdown-menu' style={this.props.style}>
{this.props.profileDropdownItems()}
<div className='dropdown-divider' />
<li className='dropdown-item nav-link'>
<a role='button' href='#' onClick={this._onLogout}>
<i className='fas fa-fw fa-sign-out' /> Logout
</a>
</li>
{profileItems}
{profileItems && <div className='dropdown-divider separator' />}
<a href='#' className='dropdown-item nav-link' role='button' onClick={() => { this._onLogout() }}>


<i className='fa fas fa-fw fa-sign-out' /> Logout


</a>
</ul>
</li>
)
Expand Down
2 changes: 2 additions & 0 deletions src/styles/ReactiveLayout.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
flex: 1;
width: 100%;
display: flex;
overflow:hidden;
}

.RLSidebarContainer {
Expand All @@ -36,4 +37,5 @@
flex: 1;
height: 100%;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
2 changes: 1 addition & 1 deletion src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function isPackageAvailable (packageId) {
const packages = List.isList(packagesList) ? packagesList.toJS() : undefined
if (packages) {
const filtered = packages.filter((p) => p.packageId === packageId)
return filtered.length > 0
return filtered.length > 0 && filtered[0].installed
}
return false
}
Expand Down

0 comments on commit 223f903

Please sign in to comment.