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

fix(933): refetching in /orgpost after deleting a post #962

Conversation

ThePiyushAggarwal
Copy link

In the /orgpost page, posts are listed but after deleting a post, the page was being reloaded to fetch the latest posts. This was a bad UX.
I have made use of refetchQueries method from the hooks provided by @apollo/client, it will delete the post and fetch latest data and then complete the process. This actually makes it a lot faster than before.

What kind of change does this PR introduce?
Fix

Issue Number:

Fixes #933

Did you add tests for your changes?
No. Not required.

Snapshots/Videos:

talawa-delete-post-refetching.webm

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?
No

Other information

Have you read the contributing guide?
Yes

@github-actions
Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

@palisadoes
Copy link
Contributor

@ThePiyushAggarwal Please write the appropriate tests to verify your work

@ThePiyushAggarwal
Copy link
Author

Ok. I will write the tests. I have some experience with testing but not much. I plan to complete this by end of this week.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #962 (5514363) into develop (b1f513f) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #962      +/-   ##
===========================================
- Coverage    94.69%   94.69%   -0.01%     
===========================================
  Files          111      111              
  Lines         2339     2338       -1     
  Branches       611      611              
===========================================
- Hits          2215     2214       -1     
  Misses         117      117              
  Partials         7        7              
Files Changed Coverage Δ
src/components/OrgPostCard/OrgPostCard.tsx 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ThePiyushAggarwal
Copy link
Author

@palisadoes

There are tests already available for this functionality
image

I tried to enhance the tests more but I could not do more than what is already done.

@aashimawadhwa
Copy link
Member

This has already been taken care of , under the revamp of newsfeed managament @palisadoes @ThePiyushAggarwal

@ThePiyushAggarwal
Copy link
Author

@aashimawadhwa Can you please point me to the PR/branch for this resolved issue?

@ThePiyushAggarwal
Copy link
Author

@palisadoes Shall I close the PR if it is not required?

@palisadoes
Copy link
Contributor

@JamaicanFriedChicken @jordan-barrett-jm Pleases review

@github-actions
Copy link

This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

@github-actions github-actions bot added the no-pr-activity No pull request activity label Sep 17, 2023
@github-actions github-actions bot removed the no-pr-activity No pull request activity label Sep 18, 2023
@palisadoes
Copy link
Contributor

Closing as @aashimawadhwa is already working on this

@palisadoes palisadoes closed this Sep 20, 2023
@ThePiyushAggarwal ThePiyushAggarwal deleted the ThePiyushAggarwal-fix-933-refetching-in-orgpost branch September 20, 2023 15:14
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.

Improve data update mechanism throughout the application after query/mutation
3 participants