Skip to content

Commit

Permalink
Use data-avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
luixxiul committed Mar 4, 2024
1 parent 1d92196 commit f0b4df3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
--icon-width: 0px; /* Align vertically */

.mx_EventTile {
&[data-layout="irc"] {
&[data-layout="irc"][data-avatar="false"] {
.mx_EventTile_avatar,
.mx_BaseAvatar {
display: none;
Expand All @@ -43,7 +43,7 @@ limitations under the License.
}

.mx_GenericEventListSummary {
&[data-layout="irc"] {
&[data-layout="irc"][data-avatar="false"] {
/* For collapsed GELS */
.mx_GenericEventListSummary_avatars {
display: none;
Expand Down
2 changes: 2 additions & 0 deletions src/components/views/elements/GenericEventListSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const GenericEventListSummary: React.FC<IProps> = ({
data-scroll-tokens={eventIds}
data-expanded={true}
data-layout={layout}
data-avatar={false} // [sc]
>
<ol className="mx_GenericEventListSummary_unstyledList">{children}</ol>
</li>
Expand Down Expand Up @@ -139,6 +140,7 @@ const GenericEventListSummary: React.FC<IProps> = ({
data-expanded={expanded + ""}
data-layout={layout}
data-testid={testId}
data-avatar={false} // [sc]
>
<AccessibleButton
kind="link_inline"
Expand Down
4 changes: 4 additions & 0 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
"data-has-reply": !!replyChain,
"data-layout": this.props.layout,
"data-self": isOwnEvent,
"data-avatar": "false", // [sc]
"data-event-id": this.props.mxEvent.getId(),
"onMouseEnter": () => this.setState({ hover: true }),
"onMouseLeave": () => this.setState({ hover: false }),
Expand Down Expand Up @@ -1312,6 +1313,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
"data-shape": this.context.timelineRenderingType,
"data-self": isOwnEvent,
"data-has-reply": !!replyChain,
"data-avatar": "false", // [sc]
"onMouseEnter": () => this.setState({ hover: true }),
"onMouseLeave": () => this.setState({ hover: false }),
"onClick": (ev: MouseEvent) => {
Expand Down Expand Up @@ -1488,6 +1490,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
"data-self": isOwnEvent,
"data-event-id": this.props.mxEvent.getId(),
"data-has-reply": !!replyChain,
"data-avatar": "false", // [sc]
"onMouseEnter": () => this.setState({ hover: true }),
"onMouseLeave": () => this.setState({ hover: false }),
},
Expand Down Expand Up @@ -1555,6 +1558,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
"data-self": isOwnEvent,
"data-event-id": this.props.mxEvent.getId(),
"data-has-reply": !!replyChain,
"data-avatar": "false", // [sc]
"onMouseEnter": () => this.setState({ hover: true }),
"onMouseLeave": () => this.setState({ hover: false }),
},
Expand Down

0 comments on commit f0b4df3

Please sign in to comment.