vuestic-ui icon indicating copy to clipboard operation
vuestic-ui copied to clipboard

VaAvatar improvements

Open asvae opened this issue 2 years ago • 2 comments

Features we want:

  • [x] fallback to text and image
  • [x] somehow avatar group
  • [ ] gravatar integration example (shouldn't be part of component api)
  • [x] add example with badge

Examples we want:

  • [ ] we need to tell that you can globally set a fallback for avatar component (as users might not be able to figure that out on themselves)

Reference

  • https://www.naiveui.com/en-US/os-theme/components/avatar#fallback.vue

asvae avatar Nov 10 '22 10:11 asvae

I would like to discuss about fallback property implementation.

  • The fallback property should have a string type.
  • If we prepend image | icon | text text to it, then component should render fallback with given type. For example:
<va-avatar src="path/not/exists" fallback="icon:profile" />
<va-avatar src="path/not/exists" fallback="image:path/to/fallback-image" />
<va-avatar src="path/not/exists" fallback="text:Not found" />

Or instead of creating as property, we can implement it as custom vue directive:

<va-avatar src="path/not/exists" va-fallback.icon="profile" />
<va-avatar src="path/not/exists" va-fallback.image="path/to/fallback-image" />
<va-avatar src="path/not/exists" va-fallback.text="Not found" />

rustem-nasyrov avatar Dec 14 '22 15:12 rustem-nasyrov

Let's have a docs example with gravatar.

m0ksem avatar Feb 22 '23 21:02 m0ksem