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

Polish threads misalignments and UI diversion #7209

Merged
merged 6 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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
36 changes: 24 additions & 12 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,16 @@ $left-gutter: 64px;
border-bottom-left-radius: 4px;
}

&:hover.mx_EventTile_verified .mx_EventTile_line,
&:hover.mx_EventTile_unverified .mx_EventTile_line,
&:hover.mx_EventTile_unknown .mx_EventTile_line {
padding-left: calc($left-gutter - $selected-message-border-width);
}

&:hover.mx_EventTile_verified .mx_EventTile_line {
border-left: $e2e-verified-color $selected-message-border-width solid;
box-shadow: inset $selected-message-border-width 0 $e2e-verified-color;
}

&:hover.mx_EventTile_unverified .mx_EventTile_line {
border-left: $e2e-unverified-color $selected-message-border-width solid;
box-shadow: inset $selected-message-border-width 0 $e2e-unverified-color;
}

&:hover.mx_EventTile_unknown .mx_EventTile_line {
border-left: $e2e-unknown-color $selected-message-border-width solid;
box-shadow: inset $selected-message-border-width 0 $e2e-unknown-color;
}

&:hover.mx_EventTile_verified.mx_EventTile_info .mx_EventTile_line,
Expand Down Expand Up @@ -808,7 +802,7 @@ $left-gutter: 64px;
}
.mx_MessageTimestamp {
right: 0;
left: auto;
left: auto !important;
top: -23px;
}
}
Expand Down Expand Up @@ -851,7 +845,7 @@ $left-gutter: 64px;
padding-top: 0;

.mx_EventTile_line {
padding-left: $selected-message-border-width !important;
padding-left: 0;
order: 10 !important;
}

Expand All @@ -860,6 +854,7 @@ $left-gutter: 64px;
right: 2px !important;
top: 1px !important;
font-size: 1rem;
text-align: right;
}

.mx_ReactionsRow {
Expand All @@ -872,9 +867,26 @@ $left-gutter: 64px;
}

.mx_EventTile_content,
.mx_RedactedBody {
.mx_RedactedBody,
.mx_ReplyChain_wrapper {
margin-left: 36px;
margin-right: 50px;

.mx_EventTile_content,
.mx_RedactedBody,
.mx_MImageBody {
margin: 0;
}
}

.mx_EventTile_mediaLine {
padding-left: 36px !important;
padding-right: 50px;

.mx_MImageBody {
margin: 0;
padding: 0;
}
}

.mx_MessageComposer_sendMessage {
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/TimelinePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
// (and user is active), switch timeout
const timeout = this.readMarkerTimeout(rmPosition);
// NO-OP when timeout already has set to the given value
this.readMarkerActivityTimer.changeTimeout(timeout);
this.readMarkerActivityTimer?.changeTimeout(timeout);
}, READ_MARKER_DEBOUNCE_MS, { leading: false, trailing: true });

private onAction = (payload: ActionPayload): void => {
Expand Down
19 changes: 3 additions & 16 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1362,22 +1362,9 @@ export default class EventTile extends React.Component<IProps, IState> {
>
{ linkedTimestamp }
{ this.renderE2EPadlock() }
{ replyChain }
<EventTileType ref={this.tile}
mxEvent={this.props.mxEvent}
forExport={this.props.forExport}
replacingEventId={this.props.replacingEventId}
editState={this.props.editState}
highlights={this.props.highlights}
highlightLink={this.props.highlightLink}
showUrlPreview={this.props.showUrlPreview}
permalinkCreator={this.props.permalinkCreator}
onHeightChanged={this.props.onHeightChanged}
callEventGrouper={this.props.callEventGrouper}
tileShape={this.props.tileShape}
getRelationsForEvent={this.props.getRelationsForEvent}
/>
{ keyRequestInfo }
<div className="mx_EventTile_body">
{ MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent) }
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a little confused by this change... Why are we doing this? It seems like the callEventGrouper isn't getting to the event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There won't be any call events in a thread. This is to tackle this element-hq/element-web#19710 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, oops, didn't notice the full context of the code 🤦

</div>
{ this.renderThreadPanelSummary() }
</div>
<Toolbar className="mx_MessageActionBar" aria-label={_t("Message Actions")} aria-live="off">
Expand Down