element-hq / element-hq/compound

Avatar component

Open
#137 3 comments 0 reactions 1 assignee Claimed by @callumu View on GitHub
T-New-Component
Dominant language
MDX
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

### Component name

Avatar

### Figma link

- Web Figma document link: https://www.figma.com/file/rTaQE2nIUSLav4Tg3nozq7/Compound-Web-Components?type=design&node-id=522-742&mode=design&t=jsFgnt5eA33BaiFu-11
- iOS Figma document link: ...
- Android Figma document link: ...

```[tasklist]
# Design phase
- [x] Design phase for Web
- [x] Design phase for iOS
- [x] Design phase for Android
```

```[tasklist]
# Development phase
- [ ] https://github.com/vector-im/compound-web/pull/4
- [ ] Development phase for iOS
- [ ] Development phase for Android
- [ ] https://github.com/matrix-org/sliding-sync/issues/241
```

Adding a reminder that this work includes reducing the number of avatar sizes across platforms (if it hasn't been done already):

![Image](https://github.com/vector-im/compound/assets/110109933/61793bbd-e460-4ade-8d33-314ced6f74a9)

@pixlwave @jmartinesp, message @callumu with any questions

----

# Implementation details

- Avatar clusters will be implemented off [`m.heroes`](https://spec.matrix.org/v1.7/client-server-api/) (pending resolution of https://github.com/matrix-org/sliding-sync/issues/241)
- See the color algorithm for imageless avatars, https://github.com/vector-im/compound-web/blob/main/src/components/Avatar/useIdColorHash.ts
- See the initial letter algorithm for imageless avatars, https://github.com/vector-im/compound-web/blob/main/src/utils/string.ts#L29

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.