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

Commit

Permalink
Fix avatar group tooltip which only has links
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Mar 22, 2021
1 parent 6a4e674 commit 5487ad0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelog/3.2.2_2021-03-22/bugfix-links-in-avatar-group
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Remove leading comma from link avatar group tooltip

We fixed a bug in the oc-avatar-group component, which showed a leading ", " in its tooltip in case it was only about links.

https://github.com/owncloud/owncloud-design-system/pull/1165
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "owncloud-design-system",
"version": "3.2.1",
"version": "3.2.2",
"description": "ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components",
"author": "ownClouders",
"main": "dist/system/system.js",
Expand Down
8 changes: 5 additions & 3 deletions src/components/avatars/OcAvatarGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
props: {
/**
* Users to be displayed with avatars
* Users and public links to be displayed with avatars
*/
users: {
type: Array,
Expand Down Expand Up @@ -82,12 +82,14 @@ export default {
tooltip() {
if (this.isTooltipDisplayed) {
let tooltip = this.avatars.map(user => user.displayName).join(", ")
const names = this.avatars.map(user => user.displayName)
if (this.links.length > 0) {
tooltip += ", " + this.links.map(link => link.name).join(", ")
names.push(...this.links.map(link => link.name))
}
let tooltip = names.join(", ")
if (this.isOverlapping) {
tooltip += ` +${this.users.length - this.maxDisplayed}`
}
Expand Down

0 comments on commit 5487ad0

Please sign in to comment.