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 22, 2024
1 parent b01b3f0 commit c5b62c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 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 <>set their displayname to <span className="name">{content.displayname}</span></>
}
return <>
changed their displayname from <span className="name">
changed their displayname from <span className="name" title={prevContent.displayname}>
{prevContent.displayname}
</span> to <span className="name">{content.displayname}</span>
</span> to <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,7 @@ 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">
<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)}
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 {
span.name, span.reason {
unicode-bidi: isolate;
Expand Down

0 comments on commit c5b62c7

Please sign in to comment.