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

MNTOR-3378 - Data broker manual removal #5287

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
dec0aa7
fix ui
codemist Nov 4, 2024
1bd3c2d
apply ui changes tto scanresultcard
codemist Nov 4, 2024
1ab2f5d
apply styling to button
codemist Nov 4, 2024
a22d17f
add removal under maintenance status
codemist Nov 4, 2024
e7d8016
change cta label and write test
codemist Nov 4, 2024
98a5cd4
add new removal under maintenance page
codemist Nov 4, 2024
2552e73
test exposure card in new view data broker page
codemist Nov 6, 2024
27635ae
change terminology ot data broker
codemist Nov 7, 2024
b0e33d2
make new scan result component for resolution flow
codemist Nov 7, 2024
fc50d36
ui fixes
codemist Nov 7, 2024
517feb7
add header
codemist Nov 8, 2024
dc27aa7
add header string
codemist Nov 8, 2024
24cb2c7
add box shadow
codemist Nov 8, 2024
9f47831
add estimated time of removal
codemist Nov 8, 2024
23439bd
add removal instructions view
codemist Nov 12, 2024
b9a31d3
ui tweaks
codemist Nov 12, 2024
7e39450
rremove ispremium force
codemist Nov 12, 2024
b8c87c0
remove commented out code
codemist Nov 12, 2024
dc69fb9
fix tests
codemist Nov 12, 2024
d052179
add strings
codemist Nov 12, 2024
38b080d
revert back to info for sale
codemist Nov 12, 2024
a2f42ed
fix deprecated strings
codemist Nov 12, 2024
6c06f12
move cta button to the bottom on mobile
codemist Nov 12, 2024
a55ea7d
fix ftl
codemist Nov 13, 2024
6af38e2
fix string changes
codemist Nov 13, 2024
4d4b27a
ftl lint
codemist Nov 13, 2024
fd0e94f
add condition to remove navclose from fixview
codemist Nov 13, 2024
58e3fbf
add back arrow
codemist Nov 13, 2024
06da548
Update locales-pending/dashboard-premium.ftl
codemist Nov 14, 2024
de286dd
chore: rename
mansaj Nov 18, 2024
8ad4508
feat: add db func for return scan results with data broker join
mansaj Nov 18, 2024
b4b65f4
Merge branch 'main' into mntor-3378
mansaj Nov 18, 2024
ab15b38
Merge branch 'mntor-3378' into MNTOR-3815
mansaj Nov 18, 2024
fe04512
feat: maintenance filter
mansaj Nov 18, 2024
8ed685c
Update src/app/(proper_react)/(redesign)/(authenticated)/user/(dashbo…
mansaj Nov 20, 2024
a007c38
Update src/db/tables/onerep_scans.ts
mansaj Nov 20, 2024
a7e77d6
Update src/db/tables/onerep_scans.ts
mansaj Nov 20, 2024
826be42
fix: lint
mansaj Nov 20, 2024
54a859d
Merge pull request #5322 from mozilla/MNTOR-3815
mansaj Nov 20, 2024
3bab78b
MNTOR-3815 - Data broker manual removal integration (#5326)
codemist Nov 21, 2024
b178509
Merge branch 'main' into mntor-3378
codemist Nov 21, 2024
1519e22
premium exposure card by default
codemist Nov 21, 2024
c92294f
port over databrokerremovalcard into main component and add confetti
codemist Nov 25, 2024
6ef0ca7
add loader to secondary button
codemist Nov 25, 2024
4fb481a
remove unused files
codemist Nov 25, 2024
38d03e1
add loading animation
codemist Nov 25, 2024
cbb550b
fix e2e tests
codemist Nov 25, 2024
c50090e
roll back string change
codemist Nov 25, 2024
578505b
fix pbroken test
codemist Nov 26, 2024
32831a1
remove typescript linter
codemist Nov 26, 2024
b18ad97
fix completion order
codemist Nov 26, 2024
b933b17
add mmanual resolution praise
codemist Nov 26, 2024
94c6e2d
dadd dashboard description for fixed state
codemist Nov 26, 2024
19a4554
add unit tests
codemist Nov 26, 2024
c219ccc
fix
codemist Nov 26, 2024
126d164
add toast error
codemist Nov 26, 2024
6c7a59c
add string
codemist Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions locales-pending/dashboard-premium.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ exposure-card-description-info-for-sale-action-needed-dashboard = This site is p
exposure-card-description-info-for-sale-in-progress-dashboard = As a { -brand-monitor-plus } member, we’ve removed <data_broker_profile>this profile</data_broker_profile> and are confirming the data broker’s removal compliance.
exposure-card-description-info-for-sale-fixed = As a { -brand-monitor-plus } member, we’ve <data_broker_profile>removed this profile</data_broker_profile> for you and will continually monitor to make sure they don’t add you back.
exposure-card-description-info-for-sale-fixed-manually-fixed = You marked this profile as fixed. Be sure you’ve followed all instructions on <data_broker_profile>the site</data_broker_profile> to ensure they remove your personal info.
exposure-card-description-info-for-sale-manual-removal-needed = We’ve asked this data broker to remove your profile but they haven’t done it. To start the process sooner, we can guide you step-by-step to manually remove your profile and resolve any exposures. Select <b>Resolve exposures</b> to get started.

## CSAT survey banner for subscribers

Expand Down
1 change: 1 addition & 0 deletions locales/en/exposure-card.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ exposure-card-other = Other
exposure-card-description-data-breach-action-needed = Your information was exposed in the <data_breach_link>{ $data_breach_company } data breach on { $data_breach_date }.</data_breach_link> We’ll walk you through the steps to fix it.
exposure-card-description-data-breach-fixed = You’ve taken the steps needed to fix <data_breach_link>this breach</data_breach_link>. We’ll continually monitor for data breaches and alert you of any new exposures.
exposure-card-your-exposed-info = Your exposed info:
exposure-card-found-the-following-data = { -brand-monitor } found the following exposed data:
exposure-card-exposure-type-data-broker = Info for sale
exposure-card-exposure-type-data-breach = Data breach
exposure-card-cta = Fix all exposures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ const OnerepConfigPage = (props: Props) => {
<option value="new">New</option>
<option value="optout_in_progress">In Progress</option>
<option value="removed">Removed</option>
<option value="removal_under_maintenance">
Removal under maintenance
</option>
</select>
</label>

Expand Down
38 changes: 35 additions & 3 deletions src/app/components/client/exposure_card/ExposureCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,37 @@
.exposureDetailsSection {
margin: 0;
overflow: hidden;
padding: 0 $layout-lg;
padding: 0 $layout-md;
height: 0;
display: none;

.exposureDetailsTopDescription {
display: flex;
flex-direction: column;
align-items: center;
gap: $layout-xs;

@media screen and (min-width: $screen-sm) {
flex-direction: row;
justify-content: space-between;
}

@media screen and (min-width: $screen-md) {
gap: $layout-xl;
}

span {
flex: 0 0 auto;
}
}

.exposureDetailsContent {
margin-top: $layout-xs;
background: $color-grey-05;
padding: $spacing-md $spacing-lg;
border-radius: $border-radius-md;
}

.openInNewTab {
color: $color-blue-50;

Expand All @@ -146,13 +173,17 @@
}

.exposedInfoContainer {
padding-top: $spacing-md;
display: flex;
flex-direction: column;
gap: $layout-xs;

.exposuredInfoSection {
display: flex;
flex-direction: column;
gap: $spacing-md;
}

.exposedInfoWrapper {
font: $text-body-xs;
display: flex;
flex-direction: column;
gap: $spacing-md;
Expand Down Expand Up @@ -217,6 +248,7 @@
display: flex;
align-items: center;
gap: $spacing-xs;
font-weight: 500;

.exposureTypeIcon {
color: $color-purple-60;
Expand Down
22 changes: 21 additions & 1 deletion src/app/components/client/exposure_card/ExposureCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
createRandomScanResult,
} from "../../../../apiMocks/mockData";
import { defaultExperimentData } from "../../../../telemetry/generated/nimbus/experiments";
import { BreachDataTypes } from "../../../functions/universal/breach";

const meta: Meta<typeof ExposureCard> = {
title: "ExposureCard",
Expand Down Expand Up @@ -49,7 +50,19 @@ const ScanMockItemInProgress = createRandomScanResult({
status: "optout_in_progress",
manually_resolved: false,
});
const BreachMockItemRemoved = createRandomBreach({ isResolved: true });
const ScanMockItemRemovalUnderMaintenance = createRandomScanResult({
status: "removal_under_maintenance",
manually_resolved: false,
});
const BreachMockItemRemoved = createRandomBreach({
isResolved: true,
dataClassesEffected: [
{
[BreachDataTypes.Email]: 2,
[BreachDataTypes.Passwords]: 4,
},
],
});
const BreachMockItemNew = createRandomBreach({ isResolved: false });

export const DataBrokerRequestedRemoval: Story = {
Expand Down Expand Up @@ -95,6 +108,13 @@ export const DataBreachActionNeeded: Story = {
},
};

export const DataBrokerRemovalUnderMaintenance: Story = {
args: {
exposureImg: FamilyTreeImage,
exposureData: ScanMockItemRemovalUnderMaintenance,
},
};

export const DataBreachFixed: Story = {
args: {
exposureImg: TwitterImage,
Expand Down
42 changes: 28 additions & 14 deletions src/app/components/client/exposure_card/ScanResultCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ export const ScanResultCard = (props: ScanResultCardProps) => {
},
},
);
case "removal_under_maintenance":
return l10n.getFragment(
"exposure-card-description-info-for-sale-manual-removal-needed",
{
elems: {
b: <b />,
},
},
);
}
};

Expand Down Expand Up @@ -317,28 +326,33 @@ export const ScanResultCard = (props: ScanResultCardProps) => {
props.isExpanded ? styles.isOpen : ""
}`}
>
<div>
<div className={styles.exposureDetailsTopDescription}>
<p>{dataBrokerDescription()}</p>
</div>
<div className={styles.exposedInfoContainer}>
<div className={styles.exposedInfoWrapper}>
<p className={styles.exposedInfoTitle}>
{l10n.getString("exposure-card-your-exposed-info")}
</p>
<div className={styles.dataClassesList}>
{exposureCategoriesArray.map((item) => (
<React.Fragment key={item.key}>{item}</React.Fragment>
))}
</div>
</div>
{
// Verifying the status for automatically removed data brokers v. manually resolved are handled differently
props.scanResult.status === "new" &&
(props.scanResult.status === "new" ||
props.scanResult.status === "removal_under_maintenance") &&
!props.scanResult.manually_resolved ? (
<span className={styles.fixItBtn}>{props.resolutionCta}</span>
) : null
}
</div>
<div className={styles.exposureDetailsContent}>
<div className={styles.exposedInfoContainer}>
<div className={styles.exposuredInfoSection}>
<p className={styles.exposedInfoTitle}>
{l10n.getString("exposure-card-found-the-following-data")}
</p>
<div className={styles.exposedInfoWrapper}>
<div className={styles.dataClassesList}>
{exposureCategoriesArray.map((item) => (
<React.Fragment key={item.key}>{item}</React.Fragment>
))}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
37 changes: 20 additions & 17 deletions src/app/components/client/exposure_card/SubscriberBreachCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,25 +268,28 @@ export const SubscriberBreachCard = (props: SubscriberBreachCardProps) => {
<div>
<p>{dataBreachDescription()}</p>
</div>

<div className={styles.exposedInfoContainer}>
<div className={styles.exposedInfoWrapper}>
<p className={styles.exposedInfoTitle}>
{l10n.getString("exposure-card-your-exposed-info")}
</p>
<div className={styles.dataClassesList}>
{exposureCategoriesArray.map((item) => (
<React.Fragment key={item.key}>{item}</React.Fragment>
))}
<div className={styles.exposureDetailsContent}>
<div className={styles.exposedInfoContainer}>
<div className={styles.exposuredInfoSection}>
<p className={styles.exposedInfoTitle}>
{l10n.getString("exposure-card-found-the-following-data")}
</p>
<div className={styles.exposedInfoWrapper}>
<div className={styles.dataClassesList}>
{exposureCategoriesArray.map((item) => (
<React.Fragment key={item.key}>{item}</React.Fragment>
))}
</div>
</div>
</div>
{
// TODO: Add unit test when changing this code:
/* c8 ignore next */
!props.subscriberBreach.isResolved ? (
<span className={styles.fixItBtn}>{props.resolutionCta}</span>
) : null
}
</div>
{
// TODO: Add unit test when changing this code:
/* c8 ignore next */
!props.subscriberBreach.isResolved ? (
<span className={styles.fixItBtn}>{props.resolutionCta}</span>
) : null
}
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/server/StatusPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export const getExposureStatus = (
: "inProgress";
case "optout_in_progress":
return "inProgress";
case "removal_under_maintenance":
return "actionNeeded";
case "new":
default:
return "actionNeeded";
Expand Down
4 changes: 3 additions & 1 deletion src/app/functions/universal/scanResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ export type RemovalStatus =
| "new"
| "optout_in_progress"
| "waiting_for_verification"
| "removed";
| "removed"
| "removal_under_maintenance";
Comment on lines +11 to +12
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rhelmer I believe this would be our first time consuming this endpoint for the manual data broker removal feature.

export const RemovalStatusMap = {
New: "new",
OptOutInProgress: "optout_in_progress",
WaitingForVerification: "waiting_for_verification",
Removed: "removed",
RemovalUnderMaintenance: "removal_under_maintenance",
};
Loading