Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve default avatar style #14997

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

Closed
chrifro opened this issue Oct 7, 2024 · 8 comments · Fixed by #15930
Closed

Improve default avatar style #14997

chrifro opened this issue Oct 7, 2024 · 8 comments · Fixed by #15930
Assignees
Labels
design ready design is approved and ready for implementation

Comments

@chrifro
Copy link

chrifro commented Oct 7, 2024

Problem:
the current default avatar is very boring, has no character and can't be distinguished if they are several of them
Image

Solution:
Let's create something more interesting and that represents the initals of the name

See Figma
Image

@chrifro chrifro added the design needed Request for more beauty label Oct 7, 2024
@bpmct
Copy link
Member

bpmct commented Dec 11, 2024

Design LGTM 👍🏼

@chrifro chrifro added design ready design is approved and ready for implementation and removed design needed Request for more beauty labels Dec 12, 2024
@BrunoQuaresma
Copy link
Collaborator

@christin I noticed we currently have three sizes for the avatar, and I’m wondering if we should add another size for pages like this one—the template page—where the avatar is quite large (48px).

Image

@BrunoQuaresma
Copy link
Collaborator

@chrifro @jaaydenh I noticed we’re currently using numeric values as the "size ID" for components. Do we want to stick with this approach, or should we switch to using aliases like xs, sm, md, lg, etc.?

Numeric Example:

<Avatar size={18} />

Alias Example:

<Avatar size="sm" />

@jaaydenh
Copy link
Contributor

I think aliases will be better so we can stick to a standard set of sizes.

@BrunoQuaresma
Copy link
Collaborator

Should this set of sizes be specific to the component or more broadly defined? For example, would the sm unit always be 18 for other components as well, or just for the avatar? In my opinion, it makes sense for the sizes to be component-specific, but I just want to make sure we’re aligned.

@jaaydenh
Copy link
Contributor

I think component specific makes sense also for consistency we should probably keep the Tailwind naming conventions of "xs","sm","md","lg","xl", etc

@chrifro
Copy link
Author

chrifro commented Dec 16, 2024

I think component specific makes sense also for consistency we should probably keep the Tailwind naming conventions of "xs","sm","md","lg","xl", etc

Sounds good, I updated the component naming in Figma accordingly (see component)

@christin I noticed we currently have three sizes for the avatar, and I’m wondering if we should add another size for pages like this one—the template page—where the avatar is quite large (48px).

Good catch! I created a quick mockup and it seems like the lg size (40px) fits great also in this context
Image

BrunoQuaresma added a commit that referenced this issue Dec 17, 2024
Related to #14997

- Add a new `Avatar` component based on the [new avatar
design](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=711-383&t=xqxOSUk48GvDsjGK-0).
- Deprecate existent `Avatar` component.
@BrunoQuaresma
Copy link
Collaborator

BrunoQuaresma commented Dec 18, 2024

Just sharing my status. It’s been more work than I initially thought. I didn’t realize how many different places were using the Avatar component with custom styles applied. I’ve managed to get the new design in place, but a few components need extra work to look good with the changes.

Chromatic flagged 254 affected snapshots, and I’m reviewing them one by one to ensure everything is in place and looks professional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design ready design is approved and ready for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants