Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-22894/MM-23046/MM-24274/MM-24375 Quick wins bucket list 5 #5353

Merged
merged 27 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
21bcbb2
Quick wins bucket list 5
asaadmahmood Apr 19, 2020
b6d705c
Updating navigation from channel name
asaadmahmood Apr 19, 2020
07a4ace
Updating button
asaadmahmood Apr 19, 2020
6dbe1f9
Fixing lint errors
asaadmahmood Apr 19, 2020
35f7d57
Updating UI changes
asaadmahmood Apr 19, 2020
7f1792f
Updating rhs UI
asaadmahmood Apr 19, 2020
d76eb55
Updating css
asaadmahmood Apr 20, 2020
d96d668
Updating slash command line-height
asaadmahmood Apr 20, 2020
66f92bb
Updating css for RHS and search
asaadmahmood Apr 20, 2020
8d815f6
Updating width for channel name in RHS
asaadmahmood Apr 20, 2020
c6a7df1
Updating mobile css
asaadmahmood Apr 20, 2020
6bc12d9
UI updates
asaadmahmood Apr 21, 2020
72b3ca8
Updating full screen modal css
asaadmahmood Apr 21, 2020
fd900ea
Updating thread css and test
asaadmahmood Apr 21, 2020
f6eee1b
Updating RHS styling and collapse
asaadmahmood Apr 21, 2020
875009b
Updating tests
asaadmahmood Apr 21, 2020
6dc7382
Updating icons and navigation
asaadmahmood Apr 22, 2020
e39a5bd
Updating test
asaadmahmood Apr 22, 2020
3b3ef55
Updating rhs header
asaadmahmood Apr 22, 2020
b5b45c3
Updating icons
asaadmahmood Apr 23, 2020
e017093
Updating icons
asaadmahmood Apr 23, 2020
b4b90a7
Updating minor code
asaadmahmood Apr 27, 2020
2123afb
Updating minor functional changes
asaadmahmood Apr 27, 2020
00cc5d4
Updating translation
asaadmahmood Apr 27, 2020
1580643
Updating channel state
asaadmahmood Apr 29, 2020
59ee6fc
Updating back button
asaadmahmood May 1, 2020
41c03e7
Updating font icons
asaadmahmood May 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating minor functional changes
  • Loading branch information
asaadmahmood committed Apr 30, 2020
commit 2123afb2f900a7ac6792774e808b6b57a033eca5
5 changes: 0 additions & 5 deletions components/channel_header/channel_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ChannelHeader extends React.PureComponent {
showMentions: PropTypes.func.isRequired,
openRHSSearch: PropTypes.func.isRequired,
closeRightHandSide: PropTypes.func.isRequired,
setRhsExpanded: PropTypes.func.isRequired,
getCustomEmojisInText: PropTypes.func.isRequired,
updateChannelNotifyProps: PropTypes.func.isRequired,
goToLastViewedChannel: PropTypes.func.isRequired,
Expand Down Expand Up @@ -125,10 +124,6 @@ class ChannelHeader extends React.PureComponent {
if (header !== prevHeader) {
this.props.actions.getCustomEmojisInText(header);
}

if (this.props.channel.id !== prevProps.channel.id) {
this.props.actions.setRhsExpanded(false);
}
}

static getDerivedStateFromProps(nextProps) {
Expand Down
1 change: 0 additions & 1 deletion components/channel_header/channel_header.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('components/ChannelHeader', () => {
showMentions: jest.fn(),
openRHSSearch: jest.fn(),
closeRightHandSide: jest.fn(),
setRhsExpanded: jest.fn(),
openModal: jest.fn(),
closeModal: jest.fn(),
getCustomEmojisInText: jest.fn(),
Expand Down
2 changes: 0 additions & 2 deletions components/channel_header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
showMentions,
openRHSSearch,
closeRightHandSide,
setRhsExpanded,
} from 'actions/views/rhs';
import {getIsRhsOpen, getRhsState} from 'selectors/rhs';
import {isModalOpen} from 'selectors/views/modals';
Expand Down Expand Up @@ -97,7 +96,6 @@ const mapDispatchToProps = (dispatch) => ({
showMentions,
openRHSSearch,
closeRightHandSide,
setRhsExpanded,
getCustomEmojisInText,
updateChannelNotifyProps,
goToLastViewedChannel,
Expand Down
2 changes: 1 addition & 1 deletion components/rhs_header_post/rhs_header_post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React from 'react';
import {Tooltip} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';

import store from 'stores/redux_store.jsx';
import OverlayTrigger from 'components/overlay_trigger';

import Constants, {RHSStates} from 'utils/constants';
Expand All @@ -20,6 +19,7 @@ export default class RhsHeaderPost extends React.Component {
previousRhsState: PropTypes.oneOf(
Object.values(RHSStates)
),
relativeTeamUrl: PropTypes.string.isRequired,
actions: PropTypes.shape({
setRhsExpanded: PropTypes.func,
showMentions: PropTypes.func,
Expand Down
2 changes: 0 additions & 2 deletions components/rhs_root_post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ function mapStateToProps(state, ownProps) {
teamId,
pluginPostTypes: state.plugins.postTypes,
channelIsArchived: isArchivedChannel(channel),
channelType: channel.type,
channelDisplayName: channel.display_name,
isFlagged: get(state, Preferences.CATEGORY_FLAGGED_POST, ownProps.post.id, null) != null,
compactDisplay: get(state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.MESSAGE_DISPLAY, Preferences.MESSAGE_DISPLAY_DEFAULT) === Preferences.MESSAGE_DISPLAY_COMPACT,
shortcutReactToLastPostEmittedFrom,
Expand Down
2 changes: 0 additions & 2 deletions components/rhs_root_post/rhs_root_post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class RhsRootPost extends React.PureComponent {
isReadOnly: PropTypes.bool.isRequired,
pluginPostTypes: PropTypes.object,
channelIsArchived: PropTypes.bool.isRequired,
channelType: PropTypes.string,
channelDisplayName: PropTypes.string,
handleCardClick: PropTypes.func.isRequired,

/**
Expand Down
12 changes: 8 additions & 4 deletions components/sidebar_right/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import {
getChannel,
getCurrentChannel,
} from 'mattermost-redux/selectors/entities/channels';

import {setRhsExpanded, showPinnedPosts, openRHSSearch, closeRightHandSide, openAtPrevious} from 'actions/views/rhs';
import {
Expand All @@ -22,12 +25,12 @@ import SidebarRight from './sidebar_right.jsx';

function mapStateToProps(state) {
const rhsState = getRhsState(state);

const channel = getCurrentChannel(state) || {};
asaadmahmood marked this conversation as resolved.
Show resolved Hide resolved
const channelId = getSelectedChannelId(state);

let channel = null;
let rhsChannel = null;
if (channelId) {
channel = getChannel(state, channelId);
rhsChannel = getChannel(state, channelId);
}

const selectedPostId = getSelectedPostId(state);
Expand All @@ -46,6 +49,7 @@ function mapStateToProps(state) {
isFlaggedPosts: rhsState === RHSStates.FLAG,
isPinnedPosts: rhsState === RHSStates.PIN,
isPluginView: rhsState === RHSStates.PLUGIN,
rhsChannel,
selectedPostId,
selectedPostCardId,
};
Expand Down
21 changes: 11 additions & 10 deletions components/sidebar_right/sidebar_right.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class SidebarRight extends React.PureComponent {
isPinnedPosts: PropTypes.bool,
isPluginView: PropTypes.bool,
previousRhsState: PropTypes.string,
rhsChannel: PropTypes.object,
selectedPostId: PropTypes.string,
selectedPostCardId: PropTypes.string,
actions: PropTypes.shape({
Expand Down Expand Up @@ -100,9 +101,13 @@ export default class SidebarRight extends React.PureComponent {
trackEvent('ui', 'ui_rhs_opened');
}

const {actions, isPinnedPosts, channel} = this.props;
if (isPinnedPosts && prevProps.isPinnedPosts === isPinnedPosts && channel.id !== prevProps.channel.id) {
actions.showPinnedPosts(channel.id);
const {actions, isPinnedPosts, rhsChannel, channel} = this.props;
if (isPinnedPosts && prevProps.isPinnedPosts === isPinnedPosts && rhsChannel.id !== prevProps.rhsChannel.id) {
actions.showPinnedPosts(rhsChannel.id);
}

if (channel && prevProps.channel && (channel.id !== prevProps.channel.id)) {
this.props.actions.setRhsExpanded(false);
}

this.setPrevious();
Expand Down Expand Up @@ -135,7 +140,7 @@ export default class SidebarRight extends React.PureComponent {

render() {
const {
channel,
rhsChannel,
currentUserId,
isFlaggedPosts,
isMentionSearch,
Expand Down Expand Up @@ -165,12 +170,8 @@ export default class SidebarRight extends React.PureComponent {
}

let channelDisplayName = '';
if (channel) {
if (channel.type === Constants.DM_CHANNEL || channel.type === Constants.GM_CHANNEL) {
channelDisplayName = Utils.localizeMessage('rhs_root.direct', 'Direct Message');
} else {
channelDisplayName = channel.display_name;
}
if (rhsChannel) {
channelDisplayName = rhsChannel.display_name;
}

if (searchVisible) {
Expand Down
11 changes: 0 additions & 11 deletions sass/utils/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,3 @@
max-height: $line-height * $lines * 1px;
}
}

@mixin linear-gradient($top, $bottom){
background: $top; /* Old browsers */
background: -moz-linear-gradient(top, $top 0%, $bottom 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, $top 0%,$bottom 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, $top 0%,$bottom 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, $top 0%,$bottom 100%); /* IE10+ */
background: linear-gradient(to bottom, $top 0%,$bottom 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
}