Skip to content

Commit

Permalink
web/timeline: add hover text to member events, make info messages sma…
Browse files Browse the repository at this point in the history
…ller and secondary color

Signed-off-by: Sumner Evans <me@sumnerevans.com>
  • Loading branch information
sumnerevans committed Dec 9, 2024
1 parent 08f1f1b commit e5ead6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/src/ui/timeline/content/MemberBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ function useChangeDescription(
}
return <>
changed their displayname from
<span className="name">{prevContent.displayname}</span>
<span className="name" title={prevContent.displayname}>{prevContent.displayname}</span>
to
<span className="name">{content.displayname}</span>
<span className="name" title={content.displayname}>{content.displayname}</span>
</>
} else if (content.avatar_url !== prevContent.avatar_url) {
if (!content.avatar_url) {
Expand Down Expand Up @@ -95,7 +95,9 @@ const MemberBody = ({ event, sender }: EventContentProps) => {
const content = event.content as MemberEventContent
const prevContent = event.unsigned.prev_content as MemberEventContent | undefined
return <div className="member-body">
<span className="name sender-name">{sender?.content.displayname ?? event.sender}</span>
<span className="name sender-name" title={sender?.content.displayname ?? event.sender}>
{sender?.content.displayname ?? event.sender}
</span>
<span className="change-description">
{useChangeDescription(event.sender, event.state_key as UserID, content, prevContent)}
</span>
Expand Down
8 changes: 8 additions & 0 deletions web/src/ui/timeline/content/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ div.redacted-body, div.decryption-pending-body {
}
}

div.member-body,
div.room-name-body,
div.power-level-body,
div.room-avatar-body {
font-size: 0.9rem;
color: var(--secondary-text-color);
}

div.member-body {
display: flex;
align-items: center;
Expand Down

0 comments on commit e5ead6a

Please sign in to comment.