Skip to content

Commit

Permalink
feat: Split display name and username columns
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed May 9, 2024
1 parent 4e7b62a commit d767af1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
6 changes: 5 additions & 1 deletion apps/settings/src/components/Users/UserListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
<strong>
{{ t('settings', 'Display name') }}
</strong>
<span class="header__subtitle">
</th>
<th class="header__cell header__cell--username"
data-cy-user-list-header-username
scope="col">
<span>
{{ t('settings', 'Username') }}
</span>
</th>
Expand Down
15 changes: 8 additions & 7 deletions apps/settings/src/components/Users/UserRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@
spellcheck="false"
@trailing-button-click="updateDisplayName" />
</template>
<template v-else>
<strong v-if="!isObfuscated"
:title="user.displayname?.length > 20 ? user.displayname : null">
{{ user.displayname }}
</strong>
<span class="row__subtitle">{{ user.id }}</span>
</template>
<strong v-else-if="!isObfuscated"
:title="user.displayname?.length > 20 ? user.displayname : null">
{{ user.displayname }}
</strong>
</td>
<td class="row__cell row__cell--username" data-cy-user-list-cell-username>
<span class="row__subtitle">{{ user.id }}</span>
</td>
<td data-cy-user-list-cell-password
Expand Down
4 changes: 4 additions & 0 deletions apps/settings/src/components/Users/shared/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
}
}

&--username {
padding-left: calc(var(--default-grid-baseline) * 3);
}

&--avatar {
min-width: var(--avatar-cell-width);
width: var(--avatar-cell-width);
Expand Down

0 comments on commit d767af1

Please sign in to comment.