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

cleanup community container #2406

Merged
merged 3 commits into from Aug 5, 2022
Merged

Conversation

aliseyalvi
Copy link
Collaborator

What does this PR?

Removed extra/unnecessary usage of getSubscriptions api call in multiple components and replaced with data already saved in redux.

Issue number

fixes #2385

Copy link
Collaborator

@noumantahir noumantahir left a comment

Choose a reason for hiding this comment

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

only one missing check, other than that we are good here.

setNoResult(true);
}
});
if (subscribedCommunities.data && subscribedCommunities.data.length) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

apparently this section is not considering subscribedCommunitiesCache as done is communityContainer, perhaps it can also use similar approach...

const itemExistInCache = subscribedCommunitiesCache.get(data.name);

Check how Gaming Hive group is actually joined but search is still showing option to join communities while is should be showing leave, I did try refreshing the list but since data it is not yet updated in subscribedCommunities store and only available in subscribedCommunitiesCache which is not being considered here.
https://user-images.githubusercontent.com/6298342/182150778-ed235f21-c0af-41b8-ba65-7db754904d58.mov

@aliseyalvi
Copy link
Collaborator Author

@noumantahir actually cache wasn't implemented in communities results screen.
Implemented cache in communities screen when user subscribe/leave from communities search poage 418101b

Copy link
Collaborator

@noumantahir noumantahir left a comment

Choose a reason for hiding this comment

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

something if off in cache when you join community from various pages, for instance in screen shot with mobile screen included, check how community name is missing, that community was joined from search result page, redux cache store wise, same data comes out when we join community from community-profile screen

Screenshot 2022-08-03 at 11 37 26 AM
Screenshot 2022-08-03 at 11 40 59 AM

@aliseyalvi
Copy link
Collaborator Author

@noumantahir I am unable to reproduce this error. Can u please record a video for it. Here u can see in screenshots, community joined from search result page has correct data and showing in community list in editor
image
image

@noumantahir
Copy link
Collaborator

sure, let me do try to do it...

Copy link
Collaborator

@noumantahir noumantahir left a comment

Choose a reason for hiding this comment

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

@aliseyalvi odd, I was not able to reproduce it again, but it did happen once, I will add to blocked section of project board until we are able to find out why it happened in the first place.

I did face another issue though while testing, adding to backlog. For now we can approve and close this PR

@feruzm feruzm merged commit 6d6c47d into development Aug 5, 2022
@feruzm feruzm deleted the sa/cleanup-community-container branch August 5, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants