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

Add info alert for dependents and duplicates in DAM #2469

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/perfect-hounds-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": minor
---

Add info alert for dependents and duplicates in DAM
11 changes: 10 additions & 1 deletion packages/admin/cms-admin/src/dam/FileForm/Duplicates.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gql, useQuery } from "@apollo/client";
import { FormSection, useStackApi } from "@comet/admin";
import { Alert, FormSection, useStackApi } from "@comet/admin";
import { BallTriangle as BallTriangleIcon, Link as LinkIcon, OpenNewTab as OpenNewTabIcon, Reload as ReloadIcon } from "@comet/admin-icons";
import {
Button,
Expand Down Expand Up @@ -98,6 +98,15 @@ const Duplicates: React.FC<{ fileId: string }> = ({ fileId }) => {
</ListItem>
)}
</List>
<Alert
title={<FormattedMessage id="comet.dam.file.duplicates.info.title" defaultMessage="What are duplicate assets?" />}
sx={{ marginTop: 4 }}
>
<FormattedMessage
id="comet.dam.file.duplicates.info.content"
defaultMessage="Duplicates refer to one or more identical copies of a digital asset stored in the DAM system. The DAM automatically detects identical assets, even if their file names are different, to reduce storage usage."
/>
</Alert>
</FormSection>
);
};
Expand Down
8 changes: 7 additions & 1 deletion packages/admin/cms-admin/src/dependencies/DependencyList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TypedDocumentNode, useApolloClient, useQuery } from "@apollo/client";
import { GridColDef, messages, Tooltip, useDataGridRemote } from "@comet/admin";
import { Alert, GridColDef, messages, Tooltip, useDataGridRemote } from "@comet/admin";
import { ArrowRight, OpenNewTab, Reload } from "@comet/admin-icons";
import { IconButton, LinearProgress, tablePaginationClasses } from "@mui/material";
import { LabelDisplayedRowsArgs } from "@mui/material/TablePagination/TablePagination";
Expand Down Expand Up @@ -204,6 +204,12 @@ export const DependencyList = ({ query, variables }: DependencyListProps) => {
return `${row.id}_${row.rootColumnName}_${row.jsonPath}`;
}}
/>
<Alert title={<FormattedMessage id="comet.dam.file.dependents.info.title" defaultMessage="What are dependents?" />} sx={{ marginTop: 4 }}>
<FormattedMessage
id="comet.dam.file.dependents.info.content"
defaultMessage="Dependents are all pages, snippets and content in which a particular asset is used, linked or included. With this list, it's easy to manage or reorganize the integration of your assets."
/>
</Alert>
</>
);
};
Expand Down
Loading