-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
[FIX] Added Bio Structure for UserCard, rendering Skeleton View on loading Instead of [Object][Object] #20305
Conversation
06715f5
to
04840e9
Compare
You could also do this way 👍 |
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.
Requested some changes, pratyaksh123 have some neat ideas to handling this. Thanks!
client/components/UserCard.js
Outdated
@@ -81,7 +82,7 @@ const UserCard = forwardRef(({ | |||
{ customStatus && <Info>{customStatus}</Info> } | |||
<Roles>{roles}</Roles> | |||
<Info>{localTime}</Info> | |||
{ bio && <Info withTruncatedText={false} style={clampStyle} height='x60'><MarkdownText content={bio}/></Info> } | |||
{bio !== undefined ? bio && <Info withTruncatedText={false} style={clampStyle} height='x60'><MarkdownText content={bio}/></Info> : <Info withTruncatedText={false} style={clampStyle} height='x60'>{bioStructure}</Info>} |
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.
Maybe instead of doing this ternary, we can check the type of the bio variable inside of the info element?
@MartinSchoeler Thanks, will do changes asap. |
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!
@ggazzo Please review. :) |
@yash-rajpal please be patient, we are currently on a feature-freeze so pull requests that are not directly related to the ones done in the current release, can only be merged on the next release (don't worry we are almost at the end of the featrue-freeze). Mentioning other members of the team will not make it go faster 🙂 Thanks! |
Proposed changes (including videos or screenshots)
Added Bio Structure for rendering Skeleton View on loading UserCard.
Issue(s)
fix #20283
Steps to test or reproduce
Check the Issue
Further comments
Until UserCard received bio, it was passing Skeleton as content to Markdown, so it was returning [Object][Object], which was shown to user. So Made one more entity called as bioStructure, now if bio is present, bio will be passed to markdown and everything would work as it is supposed to, but if bio is not present, bioStructure would be rendered as skeletonView.