Skip to content

Commit

Permalink
web/timeline/member: add hover text, make smaller, and show in second…
Browse files Browse the repository at this point in the history
…ary text color

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
  • Loading branch information
sumnerevans committed Dec 9, 2024
1 parent 08f1f1b commit e750415
Show file tree
Hide file tree
Showing 2 changed files with 7 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
2 changes: 2 additions & 0 deletions web/src/ui/timeline/content/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ div.member-body {
display: flex;
align-items: center;
gap: .25rem;
font-size: 0.9rem;
color: var(--secondary-text-color);

span.name {
unicode-bidi: isolate;
Expand Down

0 comments on commit e750415

Please sign in to comment.