Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
Profile popover new component: DM, calendar, whober, @mentions
Browse files Browse the repository at this point in the history
* UCHAT-181 Add button to DM a user from their profile preview popover tile, UCHAT-76 Add link to user's whober profile from their profile preview popover tile, UCHAT-342 Redesign profile hovercard to match whober style spec

* UCHAT-562 Show @username button on profile popover (#26)

* UCHAT-562 add tooltip to popover mention button

* UCHAT-76 Add Tooltip to link to whober profile in profile popover (#32)

* UCHAT-361 Add calendar link to profile hovercard

UCHAT-1854 Display position in user hovecard under name
  • Loading branch information
David Meza committed May 31, 2018
1 parent 138174a commit c4a728e
Show file tree
Hide file tree
Showing 14 changed files with 490 additions and 36 deletions.
2 changes: 1 addition & 1 deletion components/at_mention/at_mention.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Client4} from 'mattermost-redux/client';
import {displayUsername} from 'mattermost-redux/utils/user_utils';

import Pluggable from 'plugins/pluggable';
import ProfilePopover from 'components/profile_popover';
import ProfilePopover from 'components/profile_popover_uchat';

export default class AtMention extends React.PureComponent {
static propTypes = {
Expand Down
6 changes: 4 additions & 2 deletions components/profile_picture.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Pluggable from 'plugins/pluggable';

import * as PostUtils from 'utils/post_utils.jsx';

import ProfilePopover from './profile_popover';
import ProfilePopover from './profile_popover_uchat';

import StatusIcon from './status_icon.jsx';

Expand All @@ -20,6 +20,7 @@ export default class ProfilePicture extends React.PureComponent {
height: '36',
isRHS: false,
hasMention: false,
disablePopover: false,
};

static propTypes = {
Expand All @@ -32,6 +33,7 @@ export default class ProfilePicture extends React.PureComponent {
isRHS: PropTypes.bool,
hasMention: PropTypes.bool,
post: PropTypes.object,
disablePopover: PropTypes.bool,
};

hideProfilePopover = () => {
Expand All @@ -43,7 +45,7 @@ export default class ProfilePicture extends React.PureComponent {
if (this.props.post) {
isSystemMessage = PostUtils.isSystemMessage(this.props.post);
}
if (this.props.user) {
if (this.props.user && !this.props.disablePopover) {
return (
<OverlayTrigger
ref='overlay'
Expand Down
21 changes: 21 additions & 0 deletions components/profile_popover_uchat/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {connect} from 'react-redux';

import ProfilePopoverUChat from './profile_popover_uchat.jsx';

function mapStateToProps(state, ownProps) {
const config = state.entities.general.config;

const enableWebrtc = config.EnableWebrtc === 'true';
const enableTimezone = config.ExperimentalTimezone === 'true';

return {
...ownProps,
enableWebrtc,
enableTimezone,
};
}

export default connect(mapStateToProps)(ProfilePopoverUChat);
Loading

0 comments on commit c4a728e

Please sign in to comment.