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

3407 - FRA Reports - submission history #3460

Open
wants to merge 41 commits into
base: 3398-fra-frontend
Choose a base branch
from

Conversation

jtimpe
Copy link

@jtimpe jtimpe commented Feb 7, 2025

Summary of Changes

Pull request closes #3407

  • Implements Submission History table on FRA Reports page

How to Test

cd tdrs-frontend && docker-compose up --build
cd tdrs-backend && docker-compose up --build
  1. Open http://localhost:3000/ and sign in. Enable fra_access feature flag for your user
  2. Navigate to the FRA Reports page. Select options in the filter and search. Ensure empty-table state works as expected.
  3. Upload a file. Observe auto-refresh of submission history with new file. Ensure row appears as expected.Ensure file download works as expected.
  4. Upload > 5 files to enable pagination.

Demo GIF(s) and screenshots for testing procedure

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • Create the "Submission History" section in alignment with the provided mockups, including adding a loading spinner.
  • Implement functionality to dynamically render the "Submission History" table after the FRA data file is uploaded.
  • Ensure that the backend call is made to fetch and display the submission history immediately following the upload action.
  • Run Testing Checklist and confirm all tests pass
  • lfrohlich and/or adpennington confirmed that ACs are met.

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@jtimpe jtimpe self-assigned this Feb 7, 2025
@jtimpe jtimpe added the raft review This issue is ready for raft review label Feb 10, 2025
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 58.82353% with 21 lines in your changes missing coverage. Please review.

Project coverage is 90.63%. Comparing base (f1c9431) to head (f990af4).

Files with missing lines Patch % Lines
tdrs-frontend/src/actions/fraReports.js 13.33% 13 Missing ⚠️
...drs-frontend/src/components/Reports/FRAReports.jsx 72.00% 4 Missing and 3 partials ⚠️
...src/components/PrivateTemplate/PrivateTemplate.jsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                  @@
##           3398-fra-frontend    #3460      +/-   ##
=====================================================
- Coverage              90.80%   90.63%   -0.17%     
=====================================================
  Files                    318      318              
  Lines                   9204     9251      +47     
  Branches                 721      733      +12     
=====================================================
+ Hits                    8358     8385      +27     
- Misses                   710      727      +17     
- Partials                 136      139       +3     
Flag Coverage Δ
dev-backend 90.50% <ø> (ø)
dev-frontend 91.37% <58.82%> (-1.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rs-frontend/src/components/Paginator/Paginator.jsx 100.00% <100.00%> (ø)
...ontend/src/components/PrivateRoute/PrivateRoute.js 100.00% <ø> (ø)
tdrs-frontend/src/components/Routes/Routes.js 100.00% <ø> (ø)
tdrs-frontend/src/reducers/fraReports.js 100.00% <100.00%> (ø)
...src/components/PrivateTemplate/PrivateTemplate.jsx 71.42% <0.00%> (-11.91%) ⬇️
...drs-frontend/src/components/Reports/FRAReports.jsx 87.61% <72.00%> (-1.66%) ⬇️
tdrs-frontend/src/actions/fraReports.js 71.11% <13.33%> (-28.89%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1c9431...f990af4. Read the comment docs.

@jtimpe jtimpe added the a11y-review PR is ready for accessibility review label Feb 10, 2025
@jtimpe jtimpe changed the title 3407 fra submission history 3407 - FRA Reports - submission history Feb 10, 2025
Copy link

@andrew-jameson andrew-jameson left a comment

Choose a reason for hiding this comment

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

Works great for me locally

@victoriaatraft victoriaatraft added the Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI label Feb 12, 2025
@victoriaatraft victoriaatraft added Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI and removed Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Feb 19, 2025
@reitermb reitermb added Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI and removed Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Feb 19, 2025
Copy link

@victoriaatraft victoriaatraft left a comment

Choose a reason for hiding this comment

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

LGTM -- just need to make sure the required fields have an * next to them like the TANF Data Files

@@ -11,13 +11,20 @@ import { accountCanSelectStt } from '../../selectors/auth'
import { handlePreview, tryGetUTF8EncodedFile } from '../FileUpload/utils'
Copy link

Choose a reason for hiding this comment

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

I also noticed if I upload a file, and then select a new file to upload, the download button for the original file upload remains available.

Screenshot 2025-02-21 at 12 14 00 PM

Copy link

Choose a reason for hiding this comment

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

Another interesting visual bug. Upload and submit a file, click to change the file, cancel the file selector modal, see that the original file and download button are still there. This is different behavior than the data files page.

Copy link

Choose a reason for hiding this comment

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

I was also able to get the file input element to collapse like the datafiles one. The PR that fixed the issue for the datafiles page merged so you should be able to use the same logic. Note I had to actually expose functions to handle that, it wasn't the removal of our custom css classes completely causing the issue.

Screenshot 2025-02-21 at 12 19 40 PM

Copy link
Author

Choose a reason for hiding this comment

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

good callouts, thank you! i will take a look

Copy link
Author

Choose a reason for hiding this comment

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

I was only able to address your first comment here - hiding the download button when there's a previous upload and an error.

For the second and third comments, i did not experience the same behavior locally. The FRA and DF pages appear to work the same with respect to the original file/download button, and i actually have the input collapse every time i select a file when trying to implement the remove preview logic from the other PR. happy to pair and try to work through it if you're still having issues

Copy link

Choose a reason for hiding this comment

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

Everything looks good on this. I also could not reproduce the second bug I called out. As for the file collapse, Im going to write up a bug ticket for it. The preview logic is a little different than the datafiles page and can't use the exact same solution to prevent the input collapse.

Copy link

@raftmsohani raftmsohani left a comment

Choose a reason for hiding this comment

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

looks good TM

@jtimpe jtimpe requested a review from elipe17 February 25, 2025 13:56
@jtimpe jtimpe added QASP Review and removed raft review This issue is ready for raft review a11y-review PR is ready for accessibility review Deploy with CircleCI-a11y Deploy to https://tdp-frontend-a11y.app.cloud.gov through CircleCI labels Feb 25, 2025
@jtimpe jtimpe requested review from ADPennington and removed request for reitermb February 25, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants