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 Dec 11, 2018
1 parent dccd4ce commit 4dd1d70
Show file tree
Hide file tree
Showing 17 changed files with 519 additions and 48 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';

import {popOverOverlayPosition} from 'utils/position_utils.jsx';
const spaceRequiredForPopOver = 300;
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 'components/profile_popover';
import ProfilePopover from 'components/profile_popover_uchat';
import StatusIcon from 'components/status_icon';

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

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

hideProfilePopover = () => {
Expand All @@ -42,7 +44,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) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {connect} from 'react-redux';

import {areTimezonesEnabledAndSupported} from 'selectors/general';

import ProfilePopoverUChat from './profile_popover_uchat.jsx';

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

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

return {
enableWebrtc,
enableTimezone: areTimezonesEnabledAndSupported(state),
};
}

export default connect(mapStateToProps)(ProfilePopoverUChat);
Loading

0 comments on commit 4dd1d70

Please sign in to comment.