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

Export records from tables #1646

Open
wants to merge 16 commits into
base: john/20202-page-and-record-counts
Choose a base branch
from

Conversation

johnclary
Copy link
Member

@johnclary johnclary commented Jan 3, 2025

Associated issues

This PR adds a basic CSV export to the grid table. I decided to hold off on some more sophisticated functionality, which can be addressed via cityofaustin/atd-data-tech#20481. The main thing this export does not do versus the old VZE is allow exporting related records. That will require some bigger changes to the structure of the queryConfig and the queryBuilder.

See also some discussion here about the style of the pagination + record counts 👀

Screenshot 2025-01-06 at 2 11 23 PM Screenshot 2025-01-06 at 2 15 27 PM

Testing

URL to test: Local

Steps to test:

⚠️ In order to see this new functionality, you will need to hit the Reset filters button on each table to clear out the old query config from local storage.

These tables are now exportable:

  1. Try exporting each table. Verify that the suggested filename makes sense to you.
  2. Search and filter and export again.
  3. Open the CSVs in your favorite spreadsheet editor to verify that they look ok 👍

Ship list

  • Check migrations for any conflicts with latest migrations in main branch
  • Confirm Hasura role permissions for necessary access
  • Code reviewed
  • Product manager approved

@johnclary johnclary added the WIP Work in progress label Jan 3, 2025
// update the provided query with export settings
return produce(queryConfig, (newQueryConfig) => {
// reset limit and offset
newQueryConfig.limit = MAX_RECORD_EXPORT_LIMIT;
Copy link
Member Author

Choose a reason for hiding this comment

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

Hasura will accept a limit of null, but modifying this typing to accept null was a headache i didn't really want to deal with 🤷

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.

1 participant