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

Kaleem neslit.9859.profile loading #9861

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KaleemNeslit
Copy link
Collaborator

Link to Issue

Closes: #9859

Description of Changes

I was unable to reproduce the bug on my local machine. The issue appears when passing id: userCommunityId || ''.
In cases where the ID is an empty string (""), isLoadingUserCommunity always remains true
suggested solution and Implemented solution

  • The problem lies in how the isLoadingUserCommunity state is used. Since the user profile doesn't rely on the community data in this particular case, we don't need to conditionally show the skeleton based on isLoadingUserCommunity
    if (showSkeleton || isLoadingUserCommunity) { return ( <UserSkeleton shouldShowAvatarOnly={shouldShowAvatarOnly} shouldHideAvatar={shouldHideAvatar} shouldShowPopover={shouldShowPopover} avatarSize={avatarSize} /> ); }
    after removing isLoadingUserCommunity i am hopeful it will work fine in production .
    Additional Notes:
    The showSkeleton state was undefined because it wasn't being passed from the parent component. I have fixed this by ensuring that showSkeleton is passed down correctly, or its logic is adjusted to meet the requirements.

Comment on lines +47 to +52
const { data: userCommunity } = useGetCommunityByIdQuery({
id: userCommunityId || '',
enabled: !!userCommunityId,
});

if (showSkeleton || isLoadingUserCommunity) {
if (showSkeleton) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this would break in many cases. If userCommunityId is undefined or '', then the component passing that prop to this component, isn't passing the prop correctly. Lets fix it there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this would break in many cases. If userCommunityId is undefined or '', then the component passing that prop to this component, isn't passing the prop correctly. Lets fix it there.

@mzparacha issue is that for me locally is working fine not able to reproduce the bug .even i have latest dump

@Israellund
Copy link
Collaborator

@timolegros Kaleem is unable to replicate this bug locally, but thinks this may be the fix for it. If you're able to see it locally would you take a look at this code and see if it fixes it when you get a minute? I was unable to replicate it locally as well.

@timolegros
Copy link
Collaborator

@timolegros Kaleem is unable to replicate this bug locally, but thinks this may be the fix for it. If you're able to see it locally would you take a look at this code and see if it fixes it when you get a minute? I was unable to replicate it locally as well.

I was able to test but only by adding ? to AdminActions.tsx because of #9858.

This did not fix the issue:
image
Now it says "deleted" even though the user for the top thread is the same as for the bottom thread.

@KaleemNeslit
Copy link
Collaborator Author

@Israellund @timolegros i tried to reproduce this today as well not bale to create in local and production is also working fine
image

@KaleemNeslit
Copy link
Collaborator Author

@timolegros i tried the steps you added above but still not able to reproduce it . can you please share the reproduction Video with console logs .
i also checked the production and it's working fine there for me .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some profiles not loading in threads
4 participants