-
Notifications
You must be signed in to change notification settings - Fork 65
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
[MM-42139] Background colour for +X
profile pic is not themed correctly
#11
Conversation
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.
Thanks @cpoile for the thorough work, I admit I came here expecting a couple of lines fix and certainly got surprised :p
The avatar component was literally copied over from webapp so it's fairly possible you got into CSS conflicts.
There's an ongoing effort to provide common components that can be easily re-used across different products. Hopefully we won't need to copy and past for much longer.
My only feedback to the proposed changes is that moving from vanilla CSS to styled components is somewhat of a big move that will create inconsistencies throughout the project. I am not opposed to it but I think we should discuss it a bit further and consider all the potential implications.
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.
Looks good to me visually. Thanks @cpoile!
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.
Great work 👍
Summary
avatar.scss
file, regardless of the changes I made to it (even deleting it!). So I took this as a sign that we should use styled-components, which we've found in playbooks is /much/ cleaner and simpler than classnames and scss/css, especially when iterating or making slight tweaks.Avatar
component was using pretty complicated multi-class css, so I tried to simplify it a little, but I'm totally open to reverting some changes. Maybe the change I'm a little unhappy with is moving from a text-based size (xs
s
etc.) to asize
andfontSize
number. We could stay with a text-based size if you want, but then we'd need to do a long if-then-else or case statement to convert the text to numbers. I went with numbers because it's clear and simple. But open to alternatives.@abhijit-singh for visibility, looks like:


Ticket Link