Fix quote styles so they are uniform

This commit is contained in:
Josh Perez 2021-10-04 20:12:07 -04:00 committed by GitHub
parent 8a765da6a3
commit 48aaf9e4f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 43 deletions

View file

@ -578,7 +578,6 @@ export const CompositionArea = ({
// and this is for conversation_view.
clearQuotedMessage();
}}
withContentAbove
/>
</div>
)}

View file

@ -1061,7 +1061,6 @@ export class Message extends React.PureComponent<Props, State> {
public renderQuote(): JSX.Element | null {
const {
conversationColor,
conversationType,
customColor,
direction,
disableScroll,
@ -1076,8 +1075,6 @@ export class Message extends React.PureComponent<Props, State> {
return null;
}
const withContentAbove =
conversationType === 'group' && direction === 'incoming';
const { isViewOnce, referencedMessageNotFound } = quote;
const clickHandler = disableScroll
@ -1103,7 +1100,6 @@ export class Message extends React.PureComponent<Props, State> {
isViewOnce={isViewOnce}
referencedMessageNotFound={referencedMessageNotFound}
isFromMe={quote.isFromMe}
withContentAbove={withContentAbove}
doubleCheckMissingQuoteReference={() =>
doubleCheckMissingQuoteReference(id)
}

View file

@ -145,10 +145,6 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
? overrideProps.text
: 'A sample message from a pal'
),
withContentAbove: boolean(
'withContentAbove',
overrideProps.withContentAbove || false
),
});
story.add('Outgoing by Another Author', () => {
@ -196,19 +192,6 @@ story.add('Incoming/Outgoing Colors', () => {
);
});
story.add('Content Above', () => {
const props = createProps({
withContentAbove: true,
});
return (
<>
<div>Content Above</div>
<Quote {...props} />
</>
);
});
story.add('Image Only', () => {
const props = createProps({
text: '',

View file

@ -23,7 +23,6 @@ export type Props = {
i18n: LocalizerType;
isFromMe: boolean;
isIncoming?: boolean;
withContentAbove: boolean;
onClick?: () => void;
onClose?: () => void;
text: string;
@ -440,7 +439,6 @@ export class Quote extends React.Component<Props, State> {
isIncoming,
onClick,
referencedMessageNotFound,
withContentAbove,
} = this.props;
if (!validateQuote(this.props)) {
@ -448,12 +446,7 @@ export class Quote extends React.Component<Props, State> {
}
return (
<div
className={classNames(
'module-quote-container',
withContentAbove ? 'module-quote-container--with-content-above' : null
)}
>
<div className="module-quote-container">
<button
type="button"
onClick={this.handleClick}
@ -465,7 +458,6 @@ export class Quote extends React.Component<Props, State> {
? `module-quote--incoming-${conversationColor}`
: `module-quote--outgoing-${conversationColor}`,
!onClick ? 'module-quote--no-click' : null,
withContentAbove ? 'module-quote--with-content-above' : null,
referencedMessageNotFound
? 'module-quote--with-reference-warning'
: null