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 all 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
10 changes: 9 additions & 1 deletion res/css/views/messages/_ReactionsRowButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
margin-right: 6px;
padding: 0 6px;
border: 1px solid $reaction-row-button-border-color;
border-radius: 10px;
border-radius: 10px;
background-color: $reaction-row-button-bg-color;
cursor: pointer;
user-select: none;
Expand All @@ -33,6 +33,13 @@ 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: $reaction-notsent-color;
border-color: $reaction-notsent-border;
}
&.mx_ReactionsRowButton_failed::after{
//Add a exclamation icon
}

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

4 changes: 4 additions & 0 deletions res/themes/dark/css/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ $event-redacted-border-color: #000000;
$event-highlight-fg-color: $warning-color;
$event-highlight-bg-color: #25271F;

//event not sent
$reaction-notsent-color: rgba(140, 12, 12, 0.748);
$reaction-notsent-border: rgba(68, 0, 0, 0.748);

// event timestamp
$event-timestamp-color: $text-secondary-color;

Expand Down
4 changes: 4 additions & 0 deletions res/themes/legacy-dark/css/_legacy-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ $event-highlight-bg-color: #25271F;
// event timestamp
$event-timestamp-color: $text-secondary-color;

//event not sent
$reaction-notsent-color: rgba(140, 12, 12, 0.748);
$reaction-notsent-border: rgba(68, 0, 0, 0.748);

// Tabbed views
$tab-label-fg-color: $text-primary-color;
$tab-label-active-fg-color: $text-primary-color;
Expand Down
2 changes: 2 additions & 0 deletions res/themes/legacy-light/css/_legacy-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ $yellow-background: #fff8e3;

// event tile lifecycle
$event-notsent-color: #f44;
$reaction-notsent-color: rgba(140, 12, 12, 0.748);
$reaction-notsent-border: rgba(68, 0, 0, 0.748);

$event-highlight-fg-color: $warning-color;
$event-highlight-bg-color: $yellow-background;
Expand Down
2 changes: 2 additions & 0 deletions res/themes/light/css/_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ $yellow-background: #fff8e3;

// event tile lifecycle
$event-notsent-color: #f44;
$reaction-notsent-color: rgba(140, 12, 12, 0.748);
$reaction-notsent-border: rgba(68, 0, 0, 0.748);

$event-highlight-fg-color: $warning-color;
$event-highlight-bg-color: $yellow-background;
Expand Down
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 = mxEvent.status === EventStatus.NOT_SENT;

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

Expand Down