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

feat: serverside pagination for the questions table done #836

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

yoganandaness
Copy link
Contributor

Description

Serverside Pagination for the questions table

Motivation and Context

Improve performance in the questions table

How Has This Been Tested

Manually. Test cases also have been updated. Extensive test case for server side pagination need to be done in a separate task.

Fixes

Changes

Backend query change to facilitate serverside pagination.

Depends on

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@yoganandaness yoganandaness requested a review from a team as a code owner October 30, 2024 11:40
@yoganandaness yoganandaness requested review from RasmiaKulan and janosbabik and removed request for a team October 30, 2024 11:40
Copy link
Contributor

@Scott-James-Hurley Scott-James-Hurley left a comment

Choose a reason for hiding this comment

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

This looks great. I did notice though that when trying to sort by number of answers or number of templates an error is thrown. It looks like the value passed as sortField is either answerCountButton or templateCountButton, neither of which are in fieldMap. Could this please be addressed? I understand the reasoning behind putting paginated table tests in a different PR but perhaps this should wait until the tests are ready? Would like to hear people's thoughts.

@yoganandaness
Copy link
Contributor Author

This looks great. I did notice though that when trying to sort by number of answers or number of templates an error is thrown. It looks like the value passed as sortField is either answerCountButton or templateCountButton, neither of which are in fieldMap. Could this please be addressed? I understand the reasoning behind putting paginated table tests in a different PR but perhaps this should wait until the tests are ready? Would like to hear people's thoughts.

Thanks for the comment @Scott-James-Hurley. I have fixed the issue with sorting the column of Answers count and Templates count. Also, as you mentioned, it is a good idea to wait for the test cases before merging the PR. I am expecting to write the test cases for these next week. Will club these together.

Until then, moving this to Draft.

@yoganandaness yoganandaness marked this pull request as draft November 25, 2024 13:03
Copy link
Contributor

@jekabs-karklins jekabs-karklins left a comment

Choose a reason for hiding this comment

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

@yoganandaness I really like the PR, especially the frontend part 👍🏻
I just left a comment one for the backed but looks good so I can already approve it, or is this still in draft?

public dataType?: DataType[];

@Field(() => [DataType], { nullable: true })
public excludeDataType?: DataType[];
Copy link
Contributor

Choose a reason for hiding this comment

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

question: It appears that the excludeDataType is not used? Shall we remove it then?

@jekabs-karklins
Copy link
Contributor

@yoganandaness I really like the PR, especially the frontend part 👍🏻 I just left a comment one for the backed but looks good so I can already approve it, or is this still in draft?

@yoganandaness
Ah, I just noticed the reason for it being in the draft. Okay, I'll wait 👍🏻

@jekabs-karklins jekabs-karklins marked this pull request as ready for review December 20, 2024 21:24
@Scott-James-Hurley
Copy link
Contributor

When accessing the questions table I get the following error:
Variable "$filter" got invalid value { excludeDataType: ["FEEDBACK_BASIS", "GENERIC_TEMPLATE_BASIS", "PROPOSAL_BASIS", "PROPOSAL_ESI_BASIS", "SAMPLE_BASIS", "SAMPLE_ESI_BASIS", "SHIPMENT_BASIS", "VISIT_BASIS", "FAP_REVIEW_BASIS"] }; Field "excludeDataType" is not defined by type "AllQuestionsFilter". Did you mean "dataType"?
Perhaps I missed something when running it locally?

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.

4 participants