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

Move report table to own component #610

Merged
merged 2 commits into from
Nov 9, 2021

Conversation

jasalisbury
Copy link
Contributor

Description of change

  • Report table is now it's own component
  • Activity reports table replaced with new stand alone component
  • My alerts still needs to be updated to use new component. There are a few difference between the two tables that need to be handled. Saving for a later date to keep the change smaller
  • withWidgetData uses deep compare to prevent multiple renders
  • Moved table related tests from landing page to new component
  • Add report table to grantee dashboard

Only added functionality is the ability to show or hide the filter menu on report tables, and dynamically setting the table caption.

How to test

View activity reports table on landing page. Check the following:

  • filters, changing regions
  • filters are preserved through region changes and regions through filter changes
  • correct results are displayed when filtering
  • download buttons still function
  • you can select individual and all reports
  • sorting still works
  • paging still works

View reports on the grantee TTA record page. Check the same as above. There won't be filter controls and the reports should be scoped to the current grantee.

Issue(s)

Notes

This PR will wait for global filters to show up on the grantee TTA page before merging.

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

 * Report table is now it's own component
 * Activity reports table replaced with new stand alone component
 * My alerts still needs to be updated to use new component. There are a
few difference between the two tables that need to be handled. Saving
for a later date to keep the change smaller
 * withWidgetData uses deep compare to prevent multiple renders
 * Moved table related tests from landing page to new component
 * Add report table to grantee dashboard
collaborators,
lastSaved,
calculatedStatus,
legacyId,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be better to make the API for generating the report more generic, and an instance of the API have the required specifics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it would be nice to have some way of defining which fields are required for the table be passed in as props. We will need something like that when we update the "My Alerts" table to use this component. However in this PR I'm trying to keep changes to a minimum, only want to move the table to a new component, not make any substantial changes.

);
};

const displayReports = reports.length ? reports : [emptyReport];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm probably not understanding something - do we want an row with an empty report rather than an empty array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not too sure, I was trying to move over the table to it's own component without changing how the report works in any way. Now that it is in it's own component it is easier to refactor.

thewatermethod
thewatermethod previously approved these changes Nov 8, 2021
Copy link
Collaborator

@thewatermethod thewatermethod 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

I did notice while testing it out a bit that those ariaLiveContext.annouce functions weren't reading anything off to me, but that is a pre-existing condition, nothing to do with this.

Conflicts:
	frontend/src/pages/GranteeRecord/index.js
	frontend/src/pages/GranteeRecord/pages/TTAHistory.js
Copy link
Collaborator

@thewatermethod thewatermethod left a comment

Choose a reason for hiding this comment

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

Still looks good!

@jasalisbury jasalisbury merged commit 139e7e3 into main Nov 9, 2021
@jasalisbury jasalisbury deleted the js-396-add-activity-reports-to-tta-history branch November 9, 2021 16:11
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