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

SIMSBIOHUB-483: Paginate the Projects lists endpoint #1212

Merged
merged 22 commits into from
Feb 20, 2024
Merged

Conversation

curtisupshall
Copy link
Contributor

@curtisupshall curtisupshall commented Feb 14, 2024

Overview

Paginates the projects list table, removes dead code, and optimizes code associated with projects.

Links to Jira Tickets

Description of Changes

  • Adds new environment variables used to the set number of seed projects and surveys to generate:
    • NUM_SEED_PROJECTS
    • NUM_SEED_SURVEYS_PER_PROJECT
  • Removes frontend code associated with creating, editing and deleting project drafts.
  • Optimizes SQL queries used to fetch the projects list
  • Removes the project submission status from the projects list response; Removes the project submission status banner
  • Modifies the list projects endpoint to support server-side pagination

Testing Notes

You should be able to:

  • Create several seed projects and seed surveys using the two new environment variables
  • Create a new project
  • Edit an existing project
  • List projects at varying page sizes
  • Sort the projects list

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (d306ce3) 56.63% compared to head (86fbe61) 56.64%.

Files Patch % Lines
app/src/hooks/api/useProjectApi.ts 23.07% 8 Missing and 2 partials ⚠️
...pp/src/features/projects/list/ProjectsListPage.tsx 80.00% 6 Missing and 2 partials ⚠️
api/src/paths/project/list.ts 46.15% 0 Missing and 7 partials ⚠️
api/src/repositories/project-repository.ts 61.11% 4 Missing and 3 partials ⚠️
app/src/features/admin/users/AccessRequestList.tsx 0.00% 0 Missing and 1 partial ⚠️
app/src/features/admin/users/ActiveUsersList.tsx 0.00% 0 Missing and 1 partial ⚠️
...-sources/details/FundingSourceSurveyReferences.tsx 0.00% 1 Missing ⚠️
...es/funding-sources/list/FundingSourcesListPage.tsx 0.00% 0 Missing and 1 partial ⚠️
...src/features/projects/create/CreateProjectPage.tsx 0.00% 0 Missing and 1 partial ⚠️
...features/surveys/telemetry/ManualTelemetryList.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1212      +/-   ##
==========================================
+ Coverage   56.63%   56.64%   +0.01%     
==========================================
  Files         589      587       -2     
  Lines       17903    17849      -54     
  Branches     2765     2769       +4     
==========================================
- Hits        10139    10111      -28     
+ Misses       7105     7068      -37     
- Partials      659      670      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@curtisupshall curtisupshall marked this pull request as ready for review February 16, 2024 00:40
@curtisupshall curtisupshall requested review from NickPhura and al-rosenthal and removed request for NickPhura February 16, 2024 00:40
@curtisupshall curtisupshall added the Ready For Review PR is ready for review label Feb 16, 2024
env_config/env.docker Outdated Show resolved Hide resolved
@NickPhura
Copy link
Collaborator

NickPhura commented Feb 20, 2024

Looks good. The project advanced filters are a bit messed up though (partially related to pagination, but also related to other changes we've made recently, like the taxon changes). But maybe we should handle that as part of a different ticket. We probably need to run it by Jeremy first, to see what filters are even relevant still, etc.

Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@curtisupshall
Copy link
Contributor Author

Looks good. The project advanced filters are a bit messed up though (partially related to pagination, but also related to other changes we've made recently, like the taxon changes). But maybe we should handle that as part of a different ticket. We probably need to run it by Jeremy first, to see what filters are even relevant still, etc.

Good call. I've opened a ticket to get the conversation started.

Copy link
Collaborator

@NickPhura NickPhura left a comment

Choose a reason for hiding this comment

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

📃

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

ran this locally and it works as expected 🍰

@curtisupshall curtisupshall merged commit 493e17b into dev Feb 20, 2024
19 checks passed
@curtisupshall curtisupshall deleted the SIMSBIOHUB-483 branch February 20, 2024 22:29
curtisupshall added a commit that referenced this pull request Feb 20, 2024
* Added new environment variables used to the set number of seed projects and surveys to generate: NUM_SEED_PROJECTS and NUM_SEED_SURVEYS_PER_PROJECT.
* Removed frontend code associated with creating, editing and deleting project drafts.
* Optimized SQL queries used to fetch the projects list
* Removed the project submission status from the projects list response
* Removed the project submission status banner
* Modified the list projects endpoint to support server-side pagination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants