-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Avatar component #1191
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit fd67ecb:
|
Gatsby Cloud Build ReportDNB Eufemia Portal 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 6m PerformanceLighthouse report
|
820aa48
to
b6c5422
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it looks okay, just have to verify the sizes with what's used in pm-netbank today.
96dd19f
to
a1ef3b4
Compare
|
||
| Properties | Description | | ||
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | ||
| `size` | _(optional)_ Size of the avatar. Options: `small` \| `medium` \| `large` \| `x-large`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
It seems like the default
-size is the same size as the medium
. Should we consider removing default
and use medium
as default value instead? Also, I think it's beneficial to update the description here with the default size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, the default/fallback size when not providing any size is medium
.
As far as I see it, the value default
is not supported for the size property. So "removing default
" shouldn't be needed/possible.
I'll add a description/text explaining that the default value of size is medium
✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
| `src` | _(optional)_ Specifies the path to the image | | ||
| `skeleton` | _(optional)_ Applies loading skeleton. | | ||
| `imgProps` | _(optional)_ [Image properties](/uilib/elements/image) applied to the `img` element if the component is used to display an image. | | ||
| `variant` | _(optional)_ Override the variant of the component. Options: `primary` \| `secondary` \| `tertiary`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `variant` | _(optional)_ Override the variant of the component. Options: `primary` \| `secondary` \| `tertiary`. | | |
| `variant` | _(optional)_ Override the variant of the component. Options: `primary` \| `secondary` \| `tertiary`. Default to `primary`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find, I'll add that 🙇
Looks great! 🤩 |
a213600
to
282b998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed! Awesome work 🤩
The only thing we need to improve is the requirement for additional, screen reader information. E.g. to require with a prop more info? |
282b998
to
fd67ecb
Compare
@tujoworker, I am not sure if I fully understood this. |
# [9.19.0](v9.18.0...v9.19.0) (2022-01-26) ### Bug Fixes * add "unstyled" as a button variant ([8cb0712](8cb0712)) * added export of Bar in Pagination ([#1200](#1200)) ([f148786](f148786)) * **Avatar:** improve accessibility ([#1213](#1213)) ([3a456c5](3a456c5)) * **Breadcrumb:** forward props in BreadcrumbItem to span as well ([#1188](#1188)) ([17a1de0](17a1de0)) * **Breadcrumb:** improve accessibility ([#1189](#1189)) ([59825b8](59825b8)) * **build:** break build when step fails ([cb436d3](cb436d3)) * **CodeHighlighting:** ensure a scrollbar is shown when not enough space is available ([634df1b](634df1b)) * **DrawerList:** ensure DrawerList is unsetting its global attributes on unmount ([d64ccf8](d64ccf8)) * fix circular dependency issue for Timeline and Avatar ([439ccc3](439ccc3)) * fix rendering of DatePickerFooter when show_reset_button is provided ([#1197](#1197)) ([d7d4507](d7d4507)) * fix reset_button_text property of DatePicker ([#1196](#1196)) ([e50fb6f](e50fb6f)) * fixed global context bug that removed component props ([#1193](#1193)) ([82be98c](82be98c)) * **Tag:** fix circular dependency issue when bundling UMD modules with Rollup.js ([d155f7c](d155f7c)) * **Tag:** remove data-prop from TagGroup ([#1225](#1225)) ([72e4207](72e4207)) * **Tag:** remove tag group warnings in tests ([#1214](#1214)) ([16bd840](16bd840)) * **Tag:** update delete icon ([#1224](#1224)) ([fe5c766](fe5c766)) ### Features * add Avatar component ([#1191](#1191)) ([6a30523](6a30523)) * add AvatarGroup component ([#1195](#1195)) ([ae5ef7d](ae5ef7d)) * add InfoCard component ([5db0cbc](5db0cbc)) * add TagGroup component ([#1208](#1208)) ([781007d](781007d)) * add TimeLine component ([#1186](#1186)) ([255a14e](255a14e)) * remove type="module" in order omit the "fullySpecified" spec ([b424e08](b424e08)) * **Tag:** Add onClick prop ([db68b30](db68b30)) * **Tag:** add onDelete-prop ([#1217](#1217)) ([2f1642b](2f1642b))
🎉 This PR is included in version 9.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Link to Figma: https://www.figma.com/file/cdtwQD8IJ7pTeE45U148r1/Eufemia---Web?node-id=17869%3A0
TODO in the future: