Skip to content

Commit 115607e

Browse files
Merge branch 'main' into HA-450_staged-resource-user-assigned-fields
2 parents 0a463a0 + c0f3d2b commit 115607e

File tree

60 files changed

+1320
-610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1320
-610
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,24 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
2727
### Changed
2828
- Add properties for user assigned systems/data_uses on staged resources [5841](https://github.com/ethyca/fides/pull/5841) https://github.com/ethyca/fides/labels/db-migration
2929
- Bumped supported Python versions to `3.10.16` and `3.9.21` [#5840](https://github.com/ethyca/fides/pull/5840)
30+
- Update the privacy request detail page to a new layout and improved styling [#5824](https://github.com/ethyca/fides/pull/5824)
3031

3132
### Developer Experience
3233
- Moved non-prod Admin UI dependencies to devDependencies [#5832](https://github.com/ethyca/fides/pull/5832)
34+
- Prevent Admin UI and Privacy Center from starting when running `nox -s dev` with datastore params [#5843](https://github.com/ethyca/fides/pull/5843)
35+
- Remove plotly (unused package) to reduce fides image size [#5852](https://github.com/ethyca/fides/pull/5852)
36+
37+
### Fixed
38+
- Corrected the Tag color for some columns of the Privacy requests table. [#5848](https://github.com/ethyca/fides/pull/5848)
3339

3440
## [2.56.1](https://github.com/ethyca/fides/compare/2.56.0...2.56.1)
3541

3642
### Changed
3743
- Custom TCF purposes respect NOTICE_ONLY [#5830](https://github.com/ethyca/fides/pull/5830)
3844

45+
### Fixed
46+
- Fixed usage of stale DB sessions when running privacy requests [#5834](https://github.com/ethyca/fides/pull/5834)
47+
3948
## [2.56.0](https://github.com/ethyca/fides/compare/2.55.4...2.56.0)
4049

4150
### Added
@@ -59,6 +68,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
5968
- Removed version pins in LDFLAGS & CFLAGS for local MSSQL builds [#5760](https://github.com/ethyca/fides/pull/5760)
6069

6170
### Fixed
71+
- Fixed background color of the message indicating the rows selected [#5847](https://github.com/ethyca/fides/pull/5847)
6272
- Fixed bug with D&D table column widths [#5813](https://github.com/ethyca/fides/pull/5813)
6373
- Fixed `poll_for_exited_privacy_request_tasks` for DSR-processing improvements [#5820](https://github.com/ethyca/fides/pull/5820)
6474

clients/admin-ui/cypress/e2e/privacy-requests.cy.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ describe("Privacy Requests", () => {
102102

103103
it("shows the request details", () => {
104104
cy.getByTestId("privacy-request-details").within(() => {
105-
cy.contains("Request ID").parent().contains(/pri_/);
105+
cy.getByTestId("request-detail-value-id")
106+
.should("have.prop", "value")
107+
.should("match", /pri_/);
106108
cy.getByTestId("request-status-badge").contains("New");
107109
});
108110
});
109111

110112
it("allows approving a new request", () => {
113+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
111114
cy.getByTestId("privacy-request-approve-btn").click();
112115
cy.getByTestId("continue-btn").click();
113116

@@ -117,6 +120,7 @@ describe("Privacy Requests", () => {
117120
});
118121

119122
it("allows denying a new request", () => {
123+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
120124
cy.getByTestId("privacy-request-deny-btn").click();
121125

122126
cy.getByTestId("deny-privacy-request-modal").within(() => {
@@ -130,6 +134,7 @@ describe("Privacy Requests", () => {
130134
});
131135

132136
it("shouldn't show the download button for pending requests", () => {
137+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
133138
cy.getByTestId("download-results-btn").should("not.exist");
134139
});
135140
});
@@ -148,7 +153,11 @@ describe("Privacy Requests", () => {
148153
}).as("getAccessResultURL");
149154
stubPrivacyRequests(PrivacyRequestStatus.COMPLETE);
150155
cy.wait("@getAccessResultURL");
151-
cy.getByTestId("download-results-btn").should("not.be.disabled");
156+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
157+
cy.getByTestId("download-results-btn")
158+
.parents(".ant-dropdown-menu-item")
159+
.should("not.have.class", "ant-dropdown-menu-item-disabled")
160+
.should("have.attr", "aria-disabled", "false");
152161
});
153162

154163
it("can't download when request info is stored locally", () => {
@@ -157,7 +166,11 @@ describe("Privacy Requests", () => {
157166
}).as("getAccessResultURL");
158167
stubPrivacyRequests(PrivacyRequestStatus.COMPLETE);
159168
cy.wait("@getAccessResultURL");
160-
cy.getByTestId("download-results-btn").should("be.disabled");
169+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
170+
cy.getByTestId("download-results-btn")
171+
.parents(".ant-dropdown-menu-item")
172+
.should("have.class", "ant-dropdown-menu-item-disabled")
173+
.should("have.attr", "aria-disabled", "true");
161174
});
162175

163176
it("doesn't show the button for non-access requests", () => {
@@ -167,6 +180,7 @@ describe("Privacy Requests", () => {
167180
key: "test",
168181
});
169182
cy.wait("@getPrivacyRequest");
183+
cy.getByTestId("privacy-request-actions-dropdown-btn").click();
170184
cy.getByTestId("download-results-btn").should("not.exist");
171185
});
172186
});

clients/admin-ui/src/features/common/DaysLeftTag.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const DaysLeftTag = ({ daysLeft, includeText, status }: DaysLeftTagProps) => {
1717
status === PrivacyRequestStatus.DENIED ||
1818
status === PrivacyRequestStatus.IDENTITY_UNVERIFIED
1919
) {
20-
return null;
20+
return <span>-</span>;
2121
}
2222

2323
let color = "";

clients/admin-ui/src/features/common/RequestStatusBadge.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ export const statusPropMap: {
2828
label: "Awaiting Email Send",
2929
},
3030
denied: {
31-
color: "error",
31+
color: "warning",
3232
label: "Denied",
3333
},
3434
canceled: {
3535
color: "marble",
3636
label: "Canceled",
3737
},
3838
error: {
39-
color: "warning",
39+
color: "error",
4040
label: "Error",
4141
},
4242
in_processing: {
@@ -68,7 +68,7 @@ interface RequestBadgeProps {
6868
const RequestStatusBadge = ({ status }: RequestBadgeProps) => (
6969
<Tag
7070
color={statusPropMap[status].color}
71-
className="w-[120px] justify-center"
71+
className="justify-center"
7272
data-testid="request-status-badge"
7373
>
7474
{statusPropMap[status].label}

clients/admin-ui/src/features/common/RequestType.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AntTag as Tag, Box } from "fidesui";
1+
import { AntTypography as Typography } from "fidesui";
22
import { Rule } from "privacy-requests/types";
33
import React from "react";
44

@@ -23,11 +23,11 @@ export const getActionTypes = (rules: Rule[]): ActionType[] =>
2323
);
2424

2525
const RequestType = ({ rules }: RequestTypeProps) => {
26-
const tags = getActionTypes(rules)
26+
const actionTypeLabels = getActionTypes(rules)
2727
.map((action) => capitalize(action))
28-
.map((action_type) => <Tag key={action_type}>{action_type}</Tag>);
28+
.map((action_type) => action_type);
2929

30-
return <Box>{tags}</Box>;
30+
return <Typography.Text>{actionTypeLabels.join(" - ")}</Typography.Text>;
3131
};
3232

3333
export default RequestType;

clients/admin-ui/src/features/common/table/v2/RowSelectionBar.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Table as TableInstance } from "@tanstack/react-table";
22
import { AntButton as Button, HStack, Td, Text, Tr } from "fidesui";
3+
import palette from "fidesui/src/palette/palette.module.scss";
34

45
type RowSelectionBarProps<T> = {
56
tableInstance: TableInstance<T>;
@@ -34,6 +35,7 @@ export const RowSelectionBar = <T,>({
3435
pr={2}
3536
py={0}
3637
colSpan={tableInstance.getAllColumns().length}
38+
bgColor={palette.FIDESUI_FULL_WHITE}
3739
>
3840
<HStack>
3941
<Text data-testid="selected-row-count" fontSize="xs">

clients/admin-ui/src/features/privacy-requests/DownloadAccessResults.tsx

-52
This file was deleted.

clients/admin-ui/src/features/privacy-requests/PrivacyRequest.tsx

+42-19
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { Box, VStack } from "fidesui";
2-
import { useMemo } from "react";
1+
import { AntTabs as Tabs, AntTabsProps as TabsProps } from "fidesui";
2+
import { useMemo, useState } from "react";
33

44
import { useGetAllPrivacyRequestsQuery } from "~/features/privacy-requests";
55
import { PrivacyRequestStatus } from "~/types/api";
66

7-
import EventsAndLogs from "./events-and-logs/EventsAndLogs";
7+
import ActivityTimeline from "./events-and-logs/ActivityTimeline";
88
import ManualProcessingList from "./manual-processing/ManualProcessingList";
99
import RequestDetails from "./RequestDetails";
10-
import SubjectIdentities from "./SubjectIdentities";
1110
import { PrivacyRequestEntity } from "./types";
1211

1312
type PrivacyRequestProps = {
@@ -36,23 +35,47 @@ const PrivacyRequest = ({ data: initialData }: PrivacyRequestProps) => {
3635
// Use latest data if available, otherwise use initial data
3736
const subjectRequest = latestData?.items[0] ?? initialData;
3837

38+
const isManualStepsRequired =
39+
subjectRequest.status === PrivacyRequestStatus.REQUIRES_INPUT;
40+
41+
const [activeTabKey, setActiveTabKey] = useState(
42+
isManualStepsRequired ? "manual-steps" : "activity",
43+
);
44+
const items: TabsProps["items"] = useMemo(
45+
() => [
46+
{
47+
key: "activity",
48+
label: "Activity",
49+
children: <ActivityTimeline subjectRequest={subjectRequest} />,
50+
},
51+
{
52+
key: "manual-steps",
53+
label: "Manual steps",
54+
children: (
55+
<ManualProcessingList
56+
subjectRequest={subjectRequest}
57+
onComplete={() => setActiveTabKey("activity")}
58+
/>
59+
),
60+
disabled: !isManualStepsRequired,
61+
},
62+
],
63+
[isManualStepsRequired, subjectRequest],
64+
);
65+
3966
return (
40-
<VStack align="stretch" display="flex-start" spacing={6}>
41-
<Box data-testid="privacy-request-details">
67+
<div className="flex gap-8">
68+
<div className="flex-1">
69+
<Tabs
70+
items={items}
71+
activeKey={activeTabKey}
72+
onChange={setActiveTabKey}
73+
/>
74+
</div>
75+
<div className="w-[432px]" data-testid="privacy-request-details">
4276
<RequestDetails subjectRequest={subjectRequest} />
43-
</Box>
44-
<Box>
45-
<SubjectIdentities subjectRequest={subjectRequest} />
46-
</Box>
47-
{subjectRequest.status === PrivacyRequestStatus.REQUIRES_INPUT && (
48-
<Box>
49-
<ManualProcessingList subjectRequest={subjectRequest} />
50-
</Box>
51-
)}
52-
<Box>
53-
<EventsAndLogs subjectRequest={subjectRequest} />
54-
</Box>
55-
</VStack>
77+
</div>
78+
</div>
5679
);
5780
};
5881

0 commit comments

Comments
 (0)