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

Design for reactions which could not be sent #5954

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
5 changes: 5 additions & 0 deletions res/css/views/messages/_ReactionsRowButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ limitations under the License.
background-color: $reaction-row-button-selected-bg-color;
border-color: $reaction-row-button-selected-border-color;
}
&.mx_ReactionsRowButton_failed {
background-color: rgba(140, 12, 12, 0.748);
border-color: rgba(68, 0, 0, 0.748);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two colours should probably be stored in a variable as we might want to use a slightly different shade for contrast depending on the theme used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

.mx_ReactionsRowButton_content {
max-width: 100px;
Expand All @@ -42,3 +46,4 @@ limitations under the License.
padding-right: 4px;
}
}

4 changes: 3 additions & 1 deletion src/components/views/messages/ReactionsRowButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

import {EventStatus} from 'matrix-js-sdk/src/models/event';
import {MatrixClientPeg} from '../../../MatrixClientPeg';
import * as sdk from '../../../index';
import { _t } from '../../../languageHandler';
Expand Down Expand Up @@ -86,9 +86,11 @@ export default class ReactionsRowButton extends React.PureComponent {
const ReactionsRowButtonTooltip =
sdk.getComponent('messages.ReactionsRowButtonTooltip');
const { mxEvent, content, count, reactionEvents, myReactionEvent } = this.props;
const failed =Boolean(mxEvent.staus === EventStatus.NOT_SENT);
DantrazTrev marked this conversation as resolved.
Show resolved Hide resolved

const classes = classNames({
mx_ReactionsRowButton: true,
mx_ReactionsRowButton_failed: failed,
mx_ReactionsRowButton_selected: !!myReactionEvent,
});

Expand Down