-
Notifications
You must be signed in to change notification settings - Fork 2
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
v5 component refactor: Avatar #137
Comments
After discussing with the Design team, I am moving this ticket back to the "To Do" column, as there are still clarifications needed and updates required for the component. The ticket will not be ready for development until these items are resolved by the Design team. Please refrain from picking up this ticket until it has been cleared by the Design team. |
Thank you @ksolanki7, I've reached out to the design team. |
@nurm717123 This ticket is ready to be picked. Here is the dev ready figma link - Figma Link |
Context:
Proposalgiven the context above I propose to update 2 components out of it to complete this ticket:
and to complete 2 of them, I've planned to have 3 pr:
code snippets// avatar
<span role="presentation" {... props}> // role can be overriden later
src (as <Icon/> or string)
</span> // avatar-rectangle
<span role="presentation" classname="el-avatar-rectangle-container" {... props}> // role can be overriden later
(image or placeholder image) as <img classname="el-avatar-rectangle-residential" />
//or
(image or placeholder image) as <img classname="el-avatar-rectangle-commercial" />
<img classname="el-avatar-rectangle-commercial-layer" />
</span> Should there be any incorrect component or prop names or any other, I would be happy to discuss it. |
@nurm717123 I don't think AvatarRectangle is required at this stage (I've asked for confirmation from Andrei in the Figma file though). question: I don't understand why you're opting to handle the icon via a issue: I don't think we should use a prop called suggestion: I don't think we need an explicit <Avatar shape="square">KD</Avatar>
<Avatar shape="circle">
<MyIcon />
</Avatar> Depending on how Andrei answers my questions on the Figma file, we may be able to use |
yes, I've seen your comment there, just updated the proposal couple hours ago but I think having 3 of them would be nice (in case
sure, i think its easier so that the consumer just need to use the
yes, I think the better name would be
ok, I got your point, I think better use this approach to make it the same pattern for new component 👍 |
and also there is another component e.g old |
suggestion: Deprecating sounds reasonable, but it could be good for you to communicate here what differences exist between the prop interfaces of the old and new avatar components. It may be simple to have some deprecated props on the new avatar that support what the existing one needs. note: If you do take the deprecation route, please do all that work in a separate PR to the implementation of the new avatar component/s. |
Yes, basically the old avatar consumer is
Yes, sure 👍. I am leaning more toward it, but I still need input from others to decide whether we want to require existing consumers to adopt the newest design or not 🤔. |
Great 👍, then based on the last comment I am planning to create 3 pr for this:
the reason I do the deprecation first is because the previous avatar is supporting |
Yep, looks good @nurm717123 👍 suggestion: When it comes to <object
data="path/to/main/image.png"
type="image/png"
width="600"
height="140">
<img src="path/to/fallback/image.jpg" />
</object> Where the |
Absolutely, I’d like to give that a try first. Thank you |
Hi @kurtdoherty after I tried the
https://codesandbox.io/p/sandbox/3w9jt5 I think |
question: You seem to suggest that specifying the mime type is not acceptable? If so, why? note: By not specifying the mime type, I believe the browser defaults to displaying the object via an iframe, which is why you see scrollbars and need to target a child note: I believe you mean object-fit, and it seems to work fine... Here's an updated sandbox: https://codesandbox.io/p/sandbox/3w9jt5 |
the sandbox seems not updated 👀
yes, I think that it require us to specify the valid image type (e.g only jpg image is allowed to use this component)
I have tried it in the sandbox by adding overflow hidden to the html of the object but still doesn't work (it work if I did it in devtool though 🤔 ). |
turns out it a browser specific issue, I'm using Brave browser by default (I've tried in Chrome too) it doesn't work, but in Firefox it works |
🤦 Sorry! I didn't use the right link... here's the updated one: https://codesandbox.io/p/sandbox/tender-chaplygin-gkclqq
We can use any valid mime type, so long as it matches to the kind of resource we're referencing in the That said, we don't have to use It's fine if you want to take the route and leverage |
ok, I will use |
Abstract
As part of the v5 Elements release, each component will be reviewed and refactored to ensure best practice and design system alignment
Specification
Developer Checklist
Styles Only
andReact
component structuresRelease Checklist
Additional Context or Information
The text was updated successfully, but these errors were encountered: