UX: group names shouldn't always be capitalized (#25820)

This commit is contained in:
Kris 2024-02-22 15:56:40 -05:00 committed by GitHub
parent 9005a14508
commit 59fccfc4a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 10 deletions

View File

@ -1,7 +1,6 @@
import Controller, { inject as controller } from "@ember/controller";
import EmberObject, { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { capitalize } from "@ember/string";
import GroupDeleteDialog from "discourse/components/dialog-messages/group-delete";
import discourseComputed from "discourse-common/utils/decorators";
import I18n from "discourse-i18n";
@ -110,11 +109,6 @@ export default Controller.extend({
return isGroupUser || (this.currentUser && this.currentUser.admin);
},
@discourseComputed("model.displayName", "model.full_name")
groupName(displayName, fullName) {
return capitalize(fullName || displayName);
},
@discourseComputed("model.messageable")
displayGroupMessageButton(messageable) {
return this.currentUser && messageable;

View File

@ -31,11 +31,15 @@
{{/if}}
<div class="group-info-names">
<span class="group-info-name">{{this.groupName}}</span>
<span class="group-info-name">
{{or this.model.full_name this.model.name}}
</span>
{{#if this.model.full_name}}<div
class="group-info-full-name"
>{{this.model.name}}</div>{{/if}}
{{#if this.model.full_name}}
<div class="group-info-full-name">
{{this.model.name}}
</div>
{{/if}}
</div>
<div class="group-details-button">