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

Commit 074fec3

Browse files
authored
Fix issue with tile error boundaries collapsing in bubbles layout (#7653)
1 parent 57a5647 commit 074fec3

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ limitations under the License.
3636
margin-top: var(--gutterSize);
3737
margin-left: 49px;
3838
font-size: $font-14px;
39+
flex-shrink: 0;
3940

4041
.mx_ThreadInfo {
4142
clear: both;
@@ -586,3 +587,7 @@ limitations under the License.
586587
}
587588
}
588589
}
590+
591+
.mx_EventTile_tileError[data-layout=bubble] .mx_EventTile_line {
592+
flex-direction: column; // restore the centering
593+
}

src/components/structures/MessagePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
772772
const callEventGrouper = this.props.callEventGroupers.get(mxEv.getContent().call_id);
773773
// use txnId as key if available so that we don't remount during sending
774774
ret.push(
775-
<TileErrorBoundary key={mxEv.getTxnId() || eventId} mxEvent={mxEv}>
775+
<TileErrorBoundary key={mxEv.getTxnId() || eventId} mxEvent={mxEv} layout={this.props.layout}>
776776
<EventTile
777777
as="li"
778778
ref={this.collectEventTile.bind(this, eventId)}

src/components/views/messages/TileErrorBoundary.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ import BugReportDialog from '../dialogs/BugReportDialog';
2626
import AccessibleButton from '../elements/AccessibleButton';
2727
import SettingsStore from "../../../settings/SettingsStore";
2828
import ViewSource from "../../structures/ViewSource";
29+
import { Layout } from '../../../settings/enums/Layout';
2930

3031
interface IProps {
3132
mxEvent: MatrixEvent;
33+
layout: Layout;
3234
}
3335

3436
interface IState {
@@ -88,7 +90,7 @@ export default class TileErrorBoundary extends React.Component<IProps, IState> {
8890
</AccessibleButton>;
8991
}
9092

91-
return (<div className={classNames(classes)}>
93+
return (<li className={classNames(classes)} data-layout={this.props.layout}>
9294
<div className="mx_EventTile_line">
9395
<span>
9496
{ _t("Can't load this message") }
@@ -97,7 +99,7 @@ export default class TileErrorBoundary extends React.Component<IProps, IState> {
9799
{ viewSourceButton }
98100
</span>
99101
</div>
100-
</div>);
102+
</li>);
101103
}
102104

103105
return this.props.children;

0 commit comments

Comments
 (0)