Implement improved spacing for the thread list and timeline (#8337)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Suguru Hirahara 2022-04-29 11:03:39 +00:00 committed by GitHub
parent 92f440d9de
commit 12e8534c2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 114 additions and 69 deletions

View file

@ -517,7 +517,7 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
}
return <div className="mx_ThreadPanel_replies">
<span className="mx_ThreadSummary_threads-amount">
<span className="mx_ThreadPanel_ThreadsAmount">
{ this.state.thread.length }
</span>
<ThreadMessagePreview thread={this.state.thread} />
@ -1030,8 +1030,10 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
if (this.context.timelineRenderingType === TimelineRenderingType.Notification) {
avatarSize = 24;
needsSenderProfile = true;
} else if (this.context.timelineRenderingType === TimelineRenderingType.ThreadsList) {
avatarSize = 36;
} else if (this.context.timelineRenderingType === TimelineRenderingType.ThreadsList ||
(this.context.timelineRenderingType === TimelineRenderingType.Thread && !this.props.continuation)
) {
avatarSize = 32;
needsSenderProfile = true;
} else if (eventType === EventType.RoomCreate || isBubbleMessage) {
avatarSize = 0;

View file

@ -58,7 +58,7 @@ const ThreadSummary = ({ mxEvent, thread }: IProps) => {
}}
aria-label={_t("Open thread")}
>
<span className="mx_ThreadSummary_threads-amount">
<span className="mx_ThreadSummary_ThreadsAmount">
{ countSection }
</span>
<ThreadMessagePreview thread={thread} showDisplayname={!roomContext.narrow} />