Skip to content

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jul 29, 2025

Closes ENG-237

Description Of Changes

Added filtering capabilities to the discovered assets table in the action center, allowing users to filter by resource type, data uses, locations, and consent status. Improved query parameter handling with new utility functions and enhanced API endpoints to support the filtering functionality. Also improved time display formatting and fixed UI interaction issues.

Code Changes

  • Added buildArrayQueryParams utility function to handle array-based URL query parameters
  • Added convertToAntFilters utility function to transform arrays into Ant Design filter objects
  • Created new getWebsiteMonitorResourceFilters API endpoint to fetch available filter options
  • Enhanced getDiscoveredAssets API query to support filtering by resource type, data uses, locations, and consent status
  • Added sorting capabilities with typed column keys via DiscoveredAssetsColumnKeys enum
  • Improved time display in MonitorResult component using formatDistanceStrict for more precise formatting
  • Fixed dropdown click propagation issue in MenuHeaderCell component
  • Improved mutation return types from any to specific types (string, Schema)
  • Enhanced Cypress tests for better reliability and added clear filters button test

Steps to Confirm

  1. Navigate to the action center and select a monitor result system
  2. Verify that filter dropdowns appear for Resource Type, Data Uses, Locations, and Discovery columns
  3. Apply various filter combinations and confirm the table updates correctly
  4. Test sorting functionality on each column
  5. Verify the clear filters button works properly
  6. Check that time display shows precise formatting (e.g., "2 hours ago" instead of "about 2 hours ago")

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Jul 29, 2025

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 Jul 30, 2025 8:46pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-privacy-center ⬜️ Ignored (Inspect) Jul 30, 2025 8:46pm

@@ -5,8 +5,7 @@ import {
Page_ConsentReportingSchema_,
PreferencesSavedExtended,
} from "~/types/api";
import { DateRange } from "~/types/common/DateRange";
import { PaginationQueryParams } from "~/types/common/PaginationQueryParams";
import { DateRangeParams, PaginationQueryParams } from "~/types/query-params";
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 ended up consolidating all of the various "Params" files in to one query-params.d.ts file. Many of these updates like this are just updating that and you can just gloss over them.

@@ -1,4 +1,4 @@
import { formatDistance } from "date-fns";
import { formatDistanceStrict } from "date-fns";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this removes the "about..." prefix, etc for a cleaner column.

@@ -105,14 +106,12 @@ export const MonitorResult = ({
</Col>
<Col span={3} className="flex items-center justify-end">
{!!lastMonitoredDistance && (
<Tooltip title={formattedLastMonitored}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

redundant tooltip clean up here

React.Children.count(props.children) === 1 &&
React.isValidElement(props.children) &&
typeof props.children.type === "object";
const WrappedTag = React.forwardRef<HTMLElement, CustomTagProps>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is the only real change here. Addressing some console errors that complained about lack of forwardRef on these components.

CustomTypographyTextProps) => (
<Typography.Link className={getTextSizeClassName(size)} {...props} />
);
const CustomLink = React.forwardRef<
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here, just adding the forwardRef

@gilluminate gilluminate force-pushed the gill/ENG-237/action-center-filters branch from e6de0a5 to b398184 Compare July 30, 2025 20:43
@gilluminate gilluminate merged commit d259172 into main Jul 30, 2025
20 checks passed
@gilluminate gilluminate deleted the gill/ENG-237/action-center-filters branch July 30, 2025 20:59
Copy link

cypress bot commented Jul 30, 2025

fides    Run #13185

Run Properties:  status check passed Passed #13185  •  git commit d25917255b: Filtering and sorting for discovered assets in Action Center (#6401)
Project fides
Branch Review main
Run status status check passed Passed #13185
Run duration 00m 55s
Commit git commit d25917255b: Filtering and sorting for discovered assets in Action Center (#6401)
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 5
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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.

2 participants