Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

fix: group avatars by long group names in sidebar #2242

Merged
merged 3 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-oc-avatar-item-width-shrinking
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Remove width shrinking of the ocAvatarItem

We fixed an issue that the width of ocAvatarItem is shrinking in the sidebar of web by longer group names

https://github.com/owncloud/owncloud-design-system/issues/2241
https://github.com/owncloud/owncloud-design-system/pull/2242
19 changes: 13 additions & 6 deletions src/components/atoms/OcAvatarItem/OcAvatarItem.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
<template>
<span
class="oc-avatar-item"
:style="{ backgroundColor: backgroundColor, '--icon-color': iconColor, '--width': avatarWidth }"
<div
:data-test-item-name="name"
:aria-label="accessibleLabel === '' ? null : accessibleLabel"
:aria-hidden="accessibleLabel === '' ? 'true' : null"
:focusable="accessibleLabel === '' ? 'false' : null"
:role="accessibleLabel === '' ? null : 'img'"
:data-test-item-name="name"
>
<oc-icon v-if="hasIcon" :name="icon" :size="iconSize" :fill-type="iconFillType" />
</span>
<span
class="oc-avatar-item"
:style="{
backgroundColor: backgroundColor,
'--icon-color': iconColor,
'--width': avatarWidth,
}"
>
<oc-icon v-if="hasIcon" :name="icon" :size="iconSize" :fill-type="iconFillType" />
</span>
</div>
</template>

<script>
Expand Down