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

CRDCDH-1995 Validation Results Aggregated/Expanded Table Views #557

Merged
merged 28 commits into from
Jan 16, 2025

Conversation

Alejandro-Vega
Copy link
Collaborator

@Alejandro-Vega Alejandro-Vega commented Dec 9, 2024

Overview

Added Aggregated/Expanded view to the table in Validation Results tab in a Data Submission.

Note

The BE currently does not populate issue codes. (They all return as null) which breaks some functionality such as the issue type filter, "Expand" and button. There is also a BE bug when passing -1 for the "first" param of the aggregated submission QC results API.

Change Details (Specifics)

  • Added switch to toggle between Aggregated and Expanded view
  • Added additional filter "Issue Type" to filter by a specific issue code
  • Defined table for Aggregated view. The Expanded view is the existing table
  • Set default pagination to 20
  • When user clicks on "Expand" button it should select the filter in the Issue Type dropdown and switch to Expanded view

Related Ticket(s)

CRDCDH-2037 (Aggregated View Task)
CRDCDH-1995 (Expanded View Task)
CRDCDH-1889 (US)

@Alejandro-Vega Alejandro-Vega added the 🚧 Do Not Merge This PR is not ready for merging label Dec 9, 2024
@Alejandro-Vega Alejandro-Vega added this to the 3.2.0 (PMVP-M3) milestone Dec 9, 2024
@coveralls
Copy link
Collaborator

coveralls commented Dec 10, 2024

Pull Request Test Coverage Report for Build 12813170611

Details

  • 149 of 173 (86.13%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 58.006%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/DataSubmissions/ExportValidationButton.tsx 46 50 92.0%
src/content/dataSubmissions/QualityControl.tsx 51 71 71.83%
Files with Coverage Reduction New Missed Lines %
src/content/dataSubmissions/QualityControl.tsx 1 72.08%
Totals Coverage Status
Change from base Build 12812387937: 0.3%
Covered Lines: 4031
Relevant Lines: 6519

💛 - Coveralls

@Alejandro-Vega Alejandro-Vega marked this pull request as ready for review December 31, 2024 22:49
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

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

I tested it locally as best as I could and annotated a few comments. Feel free to dismiss any.

src/content/dataSubmissions/QualityControl.test.tsx Outdated Show resolved Hide resolved
src/content/dataSubmissions/QualityControl.tsx Outdated Show resolved Hide resolved
src/types/Submissions.d.ts Outdated Show resolved Hide resolved
amattu2
amattu2 previously approved these changes Jan 7, 2025
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

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

Changes LGTM!

Everything seems to work, except the type filter and expand button (as noted). Feel free to merge when verified against the finished API.

@Alejandro-Vega
Copy link
Collaborator Author

@amattu2 The BE is now ready and working properly. I also made some slight changes so that the filters reset when toggling the table view in 7bda97e, so please review my changes and check if you find any issues that I couldn't. Otherwise, it seems good to go.

@Alejandro-Vega Alejandro-Vega removed the 🚧 Do Not Merge This PR is not ready for merging label Jan 15, 2025
@amattu2
Copy link
Member

amattu2 commented Jan 16, 2025

@Alejandro-Vega It looks like Jest keeps failing (I tried rerunning it too). Could you check and see if it's related to these changes?

@Alejandro-Vega
Copy link
Collaborator Author

Alejandro-Vega commented Jan 16, 2025

@Alejandro-Vega It looks like Jest keeps failing (I tried rerunning it too). Could you check and see if it's related to these changes?

Oops, thanks for catching that I forgot to rerun them at the end. I went ahead and fixed them in 136264d.

Also FYI, I did find one additional issue on the BE for Data File related errors. Their codes are returning null, but the Metadata related error codes are populated correctly. Still should be fine to merge though.

amattu2
amattu2 previously approved these changes Jan 16, 2025
Copy link
Member

@amattu2 amattu2 left a comment

Choose a reason for hiding this comment

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

All the changes still LGTM and it seems to work as expected.


I annotated a suggestion to skip the queries for the hidden filters when viewing aggregated view, which saves 3 network requests initially. The only downside is, when you toggle between aggregated/expanded, it will re-execute the queries every time instead of just once on mount (current implementation).

I'm unsure if it's worth the tradeoff, since I don't know how often people will switch between the views. With that being said, I'll defer to you for the decision on this.

src/components/DataSubmissions/QualityControlFilters.tsx Outdated Show resolved Hide resolved
src/components/DataSubmissions/QualityControlFilters.tsx Outdated Show resolved Hide resolved
src/components/DataSubmissions/QualityControlFilters.tsx Outdated Show resolved Hide resolved
@amattu2 amattu2 merged commit 93cad2a into 3.2.0 Jan 16, 2025
7 checks passed
@amattu2 amattu2 deleted the CRDCDH-1995 branch January 16, 2025 17:18
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.

3 participants