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

Introduce custom reports to Data map #5352

Merged
merged 20 commits into from
Oct 8, 2024

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Oct 4, 2024

Closes PROD-2680

Description Of Changes

Allow customers to save custom reporting templates. Saved reports are accessible in reporting views with specific filter/grouping/column setting applied. Reports are accessible to everyone in an org/workspace.

The Data map report can be broken down to these various states:

  • Group By
  • Filters
  • Column Ordering
  • Column Visibility
  • Column Sizing
  • Column Expand/Collapse (view more applied)
  • Column Wrap Results

All 7 should persist across sessions (local storage) for when the user reloads their page or returns to the app later.

The saved report should exclude Column Sizing, Column Expand/Collapse, and Column Wrap Results.

Code Changes

  • Refactor DatamapReportTable component, breaking it up into multiple files for better maintainability
  • New CustomReportsTemplate custom popover component with ability to create, load, apply, and delete custom reports
  • New datamap react context/provider to more easily maintain and access data stored in local storage
  • Pass report_id to endpoint for downloading reports for backend support
  • Cypress tests

Steps to Confirm

  • Log in to Admin UI > Data map report (eg. http://localhost:3000/reporting/datamap)
  • Adjust some of the options:
    • Group by Data Use
    • Reorder columns
    • Hide a column or two
    • Apply a filter
  • Reload the page (all settings should remain applied)
  • Open the Reports popover
  • Create a new report by giving it a name
  • Log in to Admin UI > Data map report in an Incognito window where none of the customization has been applied.
  • Open the Reports popover
  • Select the newly created report and click Apply
  • All of the customization should now be applied to the table
  • The popover trigger button should be renamed to the selected report (with ellipsis if it's long)
  • Verify that each selection is reflected in the various menus
  • Make a different change (eg. hide another column)
  • The applied report is no longer active, the popover trigger button should be named Reports again, when opened there should be no filter applied
  • Select the report again and click reset (selection should be cleared)
  • Select the report again and click outside of the popover
  • Report should be applied even without clicking the Apply button
  • Open the popover again and attempt to create a new report
  • Give the report the "exact" same name as before
  • You should see an error disallowing duplicate names
  • Change the name and save a new report
  • Now click the trash icon next to one of the saved reports
  • You should see a dialog confirming
  • Canceling the dialog should close the modal without deleting
  • Continue button should close the modal and delete the report from the list
  • Apply a report again
  • Resizing columns, expanding/collapsing columns, and wrapping columns should not reset the applied report and should not have any bearing on the report itself (doesn't get saved with the report) but reloading the page should retain these settings for the current user only.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:42pm

@gilluminate gilluminate force-pushed the PROD-2680-fe-introduce-custom-reports branch from 0940d87 to 3a3749c Compare October 4, 2024 21:27
Copy link

cypress bot commented Oct 4, 2024

fides    Run #10354

Run Properties:  status check passed Passed #10354  •  git commit 8b9580b363 ℹ️: Merge b28b8c43512c44b137bb04ebcd5475adb10956eb into 754940326780bc9e6c259f57ec44...
Project fides
Run status status check passed Passed #10354
Run duration 00m 38s
Commit git commit 8b9580b363 ℹ️: Merge b28b8c43512c44b137bb04ebcd5475adb10956eb into 754940326780bc9e6c259f57ec44...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

💯

@gilluminate gilluminate merged commit c87ca78 into main Oct 8, 2024
13 checks passed
@gilluminate gilluminate deleted the PROD-2680-fe-introduce-custom-reports branch October 8, 2024 22:57
Copy link

cypress bot commented Oct 8, 2024

fides    Run #10355

Run Properties:  status check passed Passed #10355  •  git commit c87ca783d3: Introduce custom reports to Data map (#5352)
Project fides
Run status status check passed Passed #10355
Run duration 00m 38s
Commit git commit c87ca783d3: Introduce custom reports to Data map (#5352)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4

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