colorstackorg/oyster

Profile picture becomes distorted in member profile when browser size is decreased

Closed this issue · 14 comments

Description

The user's profile picture becomes distorted (shrunken horizontally) when the display becomes smaller 3

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to the ColorStack Member Profile website
  2. Click on 'Profile' on the sidebar
  3. Decrease the width of your browser
  4. See error.

Expected Behavior

The user's profile picture will be shrunken horizontally and become vertically off-center.

Screenshots

Screenshot 2024-04-12 at 3 02 18 PM Screenshot 2024-04-12 at 3 02 08 PM Screenshot 2024-04-12 at 3 01 59 PM

Additional Context

This occurs on the page where you edit your personal profile. This bug was detected on Firefox on my MacBook.

@RiosNicholas this might be a MacOS issue because on my windows, my pfp does not get distorted

I can take this on :)! It would be my first open source contribution

I was planning to take it on, but I'm having issues getting my environment set up 😅. Please do work on it, though

I tried to replicate this on MacOS with chrome and it seems to be working fine for me. Are there any additional steps to simulating the bug?
Screenshot 2024-04-14 at 11 50 12 PM
Screenshot 2024-04-14 at 11 50 30 PM
Screenshot 2024-04-14 at 11 50 39 PM

Interesting... I'm on Firefox, so I wonder if the browser is part of the problem 🤔

I tried to replicate it on Firefox and also started having issues with the build. Interesting, maybe there's something deeper? I couldn't get past the OTP screen.

You're also having issues setting up your environment, or what do you mean? I just checked again and am still able to replicate the error 🤔

@ciaracade I just assigned this ticket to you! Can't wait for you to get your first open-source contribution in!

Just a note - I think to reproduce this issue, you have to make your headline long enough to take 2 or more lines. It seems like that's causing the profile picture to shrink!

Update for @ciaracade this issue now extends to safari users when I hit profile 😔

Hey @ciaracade, are you still planning to work on this? I might take a look this weekend

Hey @ramiAbdou, should I wait to proceed since I'm not assigned to this issue? Thanks

@RiosNicholas Just confirmed with Ciara that you can take this one. Reassigning to you!

I'm doing some investigating right now, and while I was unable to reproduce the bug in the dev environment, I found what is causing the issue. I noticed that having a long word (without spaces) as a header didn't result in word breaks. Rather, it would just proceed beyond the viewport width.
Screenshot 2024-05-11 at 12 21 11 AM

Initially, I didn't think implementing a word-break tailwind class into the Text component would be important, but I decided to do the same thing in the live member profile. I found that having long words will eventually cause the profile picture to disappear because there isn't space for the text to overflow in the deployed version's headline.

image
Screenshot 2024-05-11 at 12 58 09 AM
Screenshot 2024-05-11 at 12 58 40 AM

This draws me to conclude that the solution may include implementing a word wrap (word-break) prop in the Text component, and I'll work on that. @ramiAbdou

Update: I solved it without having to update the component, but my commits went into the wrong PR 😭 . I'll fix