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

SPIKE: Find anything that needs to be renamed or refactored for consistency in Data Files code #1132

Closed
3 of 5 tasks
jtwillis92 opened this issue Jul 21, 2021 · 6 comments
Closed
3 of 5 tasks

Comments

@jtwillis92
Copy link

jtwillis92 commented Jul 21, 2021

Description:
As mentioned in #755 we still need to update the backend to rename ReportFile and associated code to DataFile. However, this also needs to be done for the frontend code and as found in #1061 there are a number of inconsistencies between the frontend and the backend. This ticket serves the purpose to identify everything that needs to be refactored or renamed across the frontend and backend so that we can accurately determine scope of work in renaming.

Acceptance Criteria:
Create a list of functional outcomes that must be achieved to complete this issue

  • We have a complete list of everything that needs to be refactored or renamed in the frontend and backend
  • Testing Checklist has been run and all tests pass
  • README is updated, if necessary

Tasks:
Create a list of granular, specific work items that must be completed to deliver the desired outcomes of this issue

  • Investigate all code relating to the Data Files and identify a list of what needs to be renamed and/or refactored.
  • Run Testing Checklist and confirm all tests pass

Notes:

Supporting Documentation:

Open Questions:

@riatzukiza
Copy link

If you just search the term "reports" and restrict it to files in frontend/src, most of what you will find is what has to change, with the exception of a few references to
the idea of reporting within the visible text of the pages, and in the documentation

  • mirage endpoints
  • mirage mock data
  • scss imports
  • a comment in acrions/reports.js, and the name the rest of this files referencs were already removed when we updated the rest endpoints it was hitting
  • reports action tests, a few lines need to be updated and it needs to be renamed
  • the name of the FileUpload.jsx and 3 lines of its content
  • Reports component folder name
  • the imports in the Reports component folder list
  • there are a lot of references to the idea of a report in the Report.jsx file, a lot of it comeing to references to data from redux

In addition to changing the names, I think we should take this opertunity to think about how they are generally organized as well.
The names were not very good even when we were calling them reports. For example, UploadReport sounds verby, when components are objects we compose together

@riatzukiza
Copy link

Not sure where to place this now, there won't be a pr for this, if this comment is good enough. Let me know @abottoms-coder how I should proceed

@andrew-jameson
Copy link
Collaborator

My apologies that this has slipped through the cracks -- I missed the tag. @riatzukiza , I'd like if you could provide an exhaustive list of the filenames and potentially line numbers if the file is rather long. When done, please assign this ticket to me and I'll create a new ticket for actually refactoring to follow-on to this spike.

@riatzukiza
Copy link

tdrs-frontend/src/index.scss 1
tdrs-frontend/src/mirage.data.js 1
tdrs-frontend/src/mirage.js 6
7,18,37,38,41
tdrs-frontend/src/actions/reports.test.js 2

tdrs-frontend/src/components/FileUpload.jsx 2

tdrs-frontend/src/components/Reports/index.js 3
tdrs-frontend/src/components/Reports/Reports.jsx 10
12,18,23,24,25,26,28,29,284
tdrs-frontend/src/components/Reports/Reports.test.js 26
7,8,10,12,88,106,133,142,146,171,174,175,184,199,202,203,212,238,239,248,265,266,277,311,376

tdrs-frontend/src/components/Routes/Routes.jsx 3
tdrs-frontend/src/components/Routes/Routes.test.js 3

tdrs-frontend/src/components/UploadReport/UploadReport.jsx 6
9,11,15-19
tdrs-frontend/src/components/UploadReport/UploadReport.test.js 2

tdrs-frontend/src/reducers/index.js 3
tdrs-frontend/src/reducers/reports.js 3
tdrs-frontend/src/reducers/reports.test.js 3

@riatzukiza
Copy link

Screen Shot 2021-11-12 at 2 14 36 PM

@andrew-jameson
Copy link
Collaborator

#1438 created to implement findings in this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants