Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use muted display names, and always show instance for non-local. #1975 #2064 #2425

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

dessalines
Copy link
Member

@dessalines dessalines commented Apr 16, 2024

Description

Everyone seems to like this one from jerboa anyway, so I'll add it here.

When its a non-local instance, always show the instance, but make it smaller and muted.

Screenshots

Before

Didn't show instance name if a display name was set

After

Always shows it (for non-local)

(ignore the localhost string, that's just for testing)

Screenshot_20240415_224838_Fulguris_1

Copy link
Member

@SleeplessOne1917 SleeplessOne1917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this. I think it's a good way of giving users important information while looking nice and not taking up more space. The other comments I made are nitpicks that aren't essential to address.

@@ -93,7 +76,10 @@ export class PersonListing extends Component<PersonListingProps, any> {
icon
/>
)}
<span>{displayName}</span>
<span>{name}</span>
{serverStr !== undefined && (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any falsey values you're trying to avoid matching?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix in a sec.

Comment on lines +43 to +49
const classes = classNames(
"person-listing d-inline-flex align-items-baseline",
{
"text-muted": this.props.muted,
"text-info": !this.props.muted,
},
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A ternary using muted would be more concise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is using that special classNames function, it can't work in that way.

@SleeplessOne1917 SleeplessOne1917 merged commit accf1b2 into main Apr 16, 2024
2 checks passed
@SleeplessOne1917 SleeplessOne1917 deleted the muted_instance_names branch April 16, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants