open-sauced / app

🍕 Insights into your entire open source ecosystem.
https://pizza.new
Apache License 2.0
430 stars 230 forks source link

fix: Prevent OSCR score from popping out of dev card with long usernames #4010

Closed Mandeep56Singh closed 2 months ago

Mandeep56Singh commented 3 months ago

Description

This PR addresses the bug where a long username in a developer card causes the OSCR score to overflow and pop out of the card's boundary while also address related to it.

closes #3981

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Front view at max username length

Screenshot (438)

Back view at lengthy username

Screenshot (435)

username in next line

Screenshot (437)

Steps to QA

Tier (staff will fill in)

[optional] What gif best describes this PR or how it makes you feel?

netlify[bot] commented 3 months ago

Deploy Preview for oss-insights ready!

Name Link
Latest commit c6d5128e875f23f70ff1a2298929cce638f2ebdf
Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/66ec21d57005be00089761ba
Deploy Preview https://deploy-preview-4010--oss-insights.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 months ago

Deploy Preview for design-insights ready!

Name Link
Latest commit c6d5128e875f23f70ff1a2298929cce638f2ebdf
Latest deploy log https://app.netlify.com/sites/design-insights/deploys/66ec21d5d81078000870ab97
Deploy Preview https://deploy-preview-4010--design-insights.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

brandonroberts commented 3 months ago

@Mandeep56Singh is this ready for review?

nickytonline commented 3 months ago

I was going to suggest not showing the OSCR on the back of the card since it's already on the front and leave as much real estate for the username. Thoughts @brandonroberts @zeucapua @isabensusan?

Mandeep56Singh commented 3 months ago

@brandonroberts actually I had hydration error while solving this issue, To my understanding It was due to props.isLoading. However I have fixed it. I would require your assistance on this.

brandonroberts commented 3 months ago

I was going to suggest not showing the OSCR on the back of the card since it's already on the front and leave as much real estate for the username. Thoughts @brandonroberts @zeucapua @isabensusan?

I agree

BekahHW commented 3 months ago

@nickytonline we have it on the back of the card like that to provide more context - it's out of 300. I think if we remove it here we need to have it referenced somewhere else on the card.

nickytonline commented 3 months ago

@nickytonline we have it on the back of the card like that to provide more context - it's out of 300. I think if we remove it here we need to have it referenced somewhere else on the card.

Maybe we move it somewhere else on the card on the back. It looks nice to see a full username on the back instead of it being cut off.

Mandeep56Singh commented 3 months ago

@BekahHW we can it in front, we just need to add a line displaying there are various ways for it

we can display the out of message under score, but when we have long username ( 2 lines ) then it will look ugly

Screenshot (442)

displaying it with OSCR score

Screenshot (440)

I found this good, since we don't really need "score" in text as OSCR itself is rating

Screenshot (443)

Mandeep56Singh commented 3 months ago

@nickytonline full username on the back can take a lot of space as longest username can be of 39 characters, it would require two lines. I think adding more statistics on the back side, so user can know more about the person. We can remove the username, profile pic and oscr score from back.

we have different option for it.

added new statistics and remove header of back view

Screenshot (444)

this looks good

Screenshot (445)

what are your thoughts ?

BekahHW commented 3 months ago

I would prefer the original fix here. It solves the initial problem without a redesign. Maybe @isabensusan has thoughts.

isabensusan commented 2 months ago

@Mandeep56Singh I also prefer the original original fix! Let's truncate longer user names

Mandeep56Singh commented 2 months ago

@isabensusan ok, the front view also have overflowing problem, the longest github username can be 39 characters long, so it will be two lines, I thought of centering the username. what you are your thoughts ? thanks.

Screenshot (437) Screenshot (438)

isabensusan commented 2 months ago

hey @Mandeep56Singh ! Yes, centering looks good :)

Mandeep56Singh commented 2 months ago

hey @Mandeep56Singh ! Yes, centering looks good :)

Thanks a lot, @isabensusan! I really appreciate the feedback. Looking forward to making more contributions to OpenSauced!"

nickytonline commented 2 months ago

When you have a chance @zeucapua, we need your approval. Thanks!