kids-first / kf-uikit

🎨 Design System for Kids First
https://kf-uikit.netlify.com
Apache License 2.0
1 stars 1 forks source link

✨ Add avatar component #109

Closed XuTheBunny closed 5 years ago

XuTheBunny commented 5 years ago

Motivation

A circular image that pulls a user's gravatar image. image

Use Cases

  1. Kids First Data Tracker image

  2. Kids First Portal + 3. Kids First website image

API changes

No API changes are made on this component.

Implementation Notes

Props with different values:

Size: range: 20 - 200, default: 40

Rendering and Storybook location

src/
└── components
    ├── Avatar
    │   ├── __tests__/
    │   ├── Avatar.jsx
    │   ├── Avatar.story.jsx
    │   └── Avatar.css
    └── index.js

Functional Tests

Test avatar component with/without userName, imgUrl, and different size values.

Closes #77

dankolbman commented 5 years ago

UIKit Storybook for Review

Built with commit 37ea9b9b798a0a0c4a85e32606350fc8afb31ab1

https://deploy-preview-109--kf-uikit.netlify.com

dankolbman commented 5 years ago

Looks good so far. There are two other things I think we need to consider:

Drop down

How will we integrate the dropdown with the Avatar? Maybe the dropdown in the nav will contain the avatar component?

Size

We also have the potential for little icon chips like in the design for the data tracker. Maybe we should have a size variant of it?

Screen Shot 2019-04-09 at 1 55 40 PM
bdolly commented 5 years ago

@XuTheBunny doesn't look the size is working properly in the Percy tests

Screen Shot 2019-04-16 at 4 33 21 PM

you can tests this inside storybook by removing the show-in-tests hidden classes from that section in the story and just add them back before committing