From 943fb1ddfad63687b12125e582a3f4bc396c6f49 Mon Sep 17 00:00:00 2001 From: Brian Peiris <brianpeiris@gmail.com> Date: Mon, 16 Apr 2018 10:06:30 -0700 Subject: [PATCH] account for text overflow --- src/assets/stylesheets/profile.scss | 4 ++++ src/react-components/profile-entry-panel.js | 2 +- src/react-components/profile-info-header.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/assets/stylesheets/profile.scss b/src/assets/stylesheets/profile.scss index 000e974bb..ad6c30bfe 100644 --- a/src/assets/stylesheets/profile.scss +++ b/src/assets/stylesheets/profile.scss @@ -87,12 +87,16 @@ flex: 6 1 auto; font-size: 1.2em; line-height: 50px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } &__app_name { font-size: 1.8em; padding-right: 18px; line-height: 50px; + white-space: nowrap; } } diff --git a/src/react-components/profile-entry-panel.js b/src/react-components/profile-entry-panel.js index 0322c551f..b841022ba 100644 --- a/src/react-components/profile-entry-panel.js +++ b/src/react-components/profile-entry-panel.js @@ -27,7 +27,7 @@ class ProfileEntryPanel extends Component { saveStateAndFinish = e => { e.preventDefault(); const { has_changed_name, display_name } = this.props.store.state.profile; - const hasChangedName = !has_changed_name && this.state.display_name !== display_name; + const hasChangedName = has_changed_name || this.state.display_name !== display_name; this.props.store.update({ profile: { has_changed_name: hasChangedName, diff --git a/src/react-components/profile-info-header.js b/src/react-components/profile-info-header.js index 43ec49291..ca7a3b891 100644 --- a/src/react-components/profile-info-header.js +++ b/src/react-components/profile-info-header.js @@ -4,7 +4,7 @@ import PropTypes from "prop-types"; export const ProfileInfoHeader = props => ( <div className="profile-info-header"> <img src="../assets/images/account.svg" onClick={props.onClick} className="profile-info-header__icon" /> - <div className="profile-info-header__profile_display_name" onClick={props.onClick}> + <div className="profile-info-header__profile_display_name" onClick={props.onClick} title={props.name}> {props.name} </div> <div className="profile-info-header__app_name"> -- GitLab