callstack / callstack/react-native-paper
Better Avatar component
- Dominant language
- TypeScript
- Stars
- 14.5k
- Forks
- 2.2k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 12
Description
**Is your feature request related to a problem? Please describe.**
The current Avatar component(s) do the job, but they can do it better. Handling Avatar.Image and Avatar.Text is painful with if/else since it doesn't support fallback.
**Describe the solution you'd like**
A small refactor to the Avatar component to support Image mainly, and fallback to Text
Example:
```typescript
P
```
**Describe alternatives you've considered**
Manually checking for image loading, if it fails then I need to render Avatar.Text instead.
Contributor guide
Research direction
Start by locating the Avatar component and its existing Avatar.Image and Avatar.Text entry points. Review any nearby component tests before implementing the requested AvatarImage and AvatarFallback usage; done means an image can render with text shown when the image is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100