Skip to content
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

Merged
merged 4 commits into from
Mar 2, 2022

Conversation

cpoile
Copy link
Member

@cpoile cpoile commented Feb 28, 2022

Summary

  • Fixed the background color and the spacing of the profile avatars (they were on the left, when the designs showed they should be on the right)
  • For some reason the webpack kept bundling an old version of the 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.
  • The 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 a size and fontSize 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.
  • Apologies for the large commit -- there really wasn't an easy way to split them into self-contained chunks
  • The spacing on the right of the avatar pics changes a little when there are 1, 2, or 3+ participants, because of the way we're moving them around. I can look at that and fix it, but I'm leaning towards it being a low priority polish for later.

@abhijit-singh for visibility, looks like:
image
image

Ticket Link

@cpoile cpoile added 1: UX Review Requires review by ux 2: Dev Review Requires review by a core committer labels Feb 28, 2022
Copy link
Collaborator

@streamer45 streamer45 left a 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.

Copy link

@abhijit-singh abhijit-singh left a 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!

@streamer45 streamer45 removed the 1: UX Review Requires review by ux label Mar 2, 2022
@streamer45 streamer45 self-requested a review March 2, 2022 17:20
Copy link
Collaborator

@streamer45 streamer45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👍

@cpoile cpoile added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Mar 2, 2022
@cpoile cpoile merged commit 83a7ebe into main Mar 2, 2022
@cpoile cpoile deleted the MM-42139-profile-fix branch March 2, 2022 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants