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

Data catalog UI: MVP #5628

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

Conversation

jpople
Copy link
Contributor

@jpople jpople commented Dec 20, 2024

Closes HJ-333

Description Of Changes

First pass at data catalog (new D&D view).

  • "Systems" table which displays:
    • Any system with an integration that supports D&D
    • Any system with a non-empty "dataset reference"
  • On applicable systems, "projects" table which displays "database-level" resources
  • Streamlined combined view for resources in detection & discovery

Code Changes

  • Add new pages and tables under "data catalog"
  • Add new handling for D&D resource diff statuses
  • Refactor taxonomy cells and add new taxonomy cell for adding data uses to systems
  • Refactor data use CRUD
  • Regenerate OpenAPI types

Steps to Confirm

To test, run a Plus backend (using the fidesplus image) on this Plus branch. Pin requirements.txt to use the latest commit from this Fides branch, e.g.:

// or the most recent commit hash 
ethyca-fides[all] @ git+https://github.com/ethyca/fides.git@5e0afc137fbf857700209cb3bf9caa0f64324922#egg=ethyca-fides 

Make systems:

  • with an integration with a database layer (e.g. BigQuery); add a monitor to the integration and scan it

  • with an integration without a database layer (e.g. DynamoDB); add a monitor to the integration and scan it

  • with no integration, but a dataset in the system's "dataset reference" field

  • with none of these

  • In nav, click on "data catalog" view

  • In systems table:

    • Should see your systems with integrations and with dataset; should not see the system without
    • Should be able to click into results under the systems with integrations, but not the system with the dataset reference
    • Should be able to click "view details" in the overflow menu for each system to view the system details page
  • On clicking through to the system, should see databases/projects for the system with databases/projects and datasets for the other

  • Should be able to click through to staged resources under the dataset level

  • Should be able to classify a resource in the table, then optionally change data categories and confirm classification

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • Followup issues:
    • Followup issues created (include link)
    • 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 Dec 20, 2024

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

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ❌ Failed (Inspect) Jan 13, 2025 11:21pm

Copy link

cypress bot commented Jan 13, 2025

fides    Run #11726

Run Properties:  status check failed Failed #11726  •  git commit 182a18b265 ℹ️: Merge f1ad82e5e54dd93e57a16ca87fe9f51b5a0507ee into 7ea4ad58d49dfcd525344fdf1de8...
Project fides
Branch Review refs/pull/5628/merge
Run status status check failed Failed #11726
Run duration 01m 03s
Commit git commit 182a18b265 ℹ️: Merge f1ad82e5e54dd93e57a16ca87fe9f51b5a0507ee into 7ea4ad58d49dfcd525344fdf1de8...
Committer jpople
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
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 3
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/smoke_test.cy.ts • 1 failed test

View Output Video

Test Artifacts
Smoke test > can access Mongo and Postgres connectors from the Admin UI Screenshots Video

@jpople jpople marked this pull request as ready for review January 13, 2025 17:04
@jpople jpople requested a review from gilluminate January 13, 2025 17:04
Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

Overall looking good. Loving a lot of the abstractions for clean and more reusable code. Left a few comments, questions, and nit-picks for potential improvement.

import { Badge, BadgeProps } from "fidesui";
import React from "react";

const ResultStatusBadge = React.forwardRef<HTMLSpanElement, BadgeProps>(
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this makes it specific to Result Status? Would this be better as a more generically named component, or does it need specific properties required with more strict type? (eg. colorScheme which has to be of STATUS_COLOR_MAP enum type). You might consider exporting the STATUS_COLOR_MAP enum from this component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good callout-- deleted this component and changed all of its uses to use the more generic BadgeCell.

CHANGELOG.md Show resolved Hide resolved
gap={2}
overflowX="auto"
>
<TaxonomyCellContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this file should be renamed/moved since it's specific to TableV2 cells

import { ChevronDownIcon, Collapse, Flex, Text, useDisclosure } from "fidesui";
import { ReactNode } from "react";

const AdvancedSettings = ({ children }: { children: ReactNode }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this component just seems superfluous. It's either too specifically named (where the label could be another prop), or not specific enough about the children it accepts. Does it always need to be inside a form or can it be moved out to the "common" parent directory?

</Stack>
</AdvancedSettings>
</Flex>
<div className="flex w-full justify-between">
Copy link
Contributor

@gilluminate gilluminate Jan 13, 2025

Choose a reason for hiding this comment

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

This file also uses Chakra's Box quite a bit. What do you think about updating those to use tailwind like this for consistency? This could potentially use Ant's Flex component as well.

<Flex
alignItems="center"
gap={1.5}
cursor={onClick ? "pointer" : "default"}
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you are just moving this down, but this method is better for a11y and automatically gets the correct cursor so we might as well do that while we're here :)

Suggested change
cursor={onClick ? "pointer" : "default"}
as={onClick ? "button" : undefined}

<Button
size="small"
icon={<SmallAddIcon mb="1px" />}
className=" max-h-[20px] max-w-[20px] rounded-sm border-gray-200 bg-white hover:!bg-gray-100"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should only be using tailwind for layout and never for colors as we don't plan to maintain it with the palette. Isn't this just a variation of one of our defined button types anyway? That's by far the more preferred method for this so that the theme gets applied. Review the Order of priority for styling if needed.

const TaxonomyAddButton = (props: ButtonProps) => (
<Button
size="small"
icon={<SmallAddIcon mb="1px" />}
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use the Carbon version of the icon in this new component?

Comment on lines 27 to 28
alignItems="center"
gap={1.5}
Copy link
Contributor

@gilluminate gilluminate Jan 13, 2025

Choose a reason for hiding this comment

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

the alignment of the + button is off during testing, I think this alignItems and gap still belongs in the parent (probably both?). Probably don't need a margin on the button with gap on parent.

Comment on lines 90 to 92
if (isLoading || isFetching || systemIsLoading) {
return <TableSkeletonLoader rowHeight={36} numRows={36} />;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this falls outside of the Layout the skeleton is taking up the entire page (bleeding edge to edge) which I don't think is the desired effect. This should probably be moved in lower.

Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

None of the breadcrumbs seem to be working properly. Clicking down in to a child level and then clicking a breadcrumb to go back just results in an empty table.

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