Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

chore: add deprecation notice to netlify large media docs #948

Merged
merged 2 commits into from
Oct 23, 2023
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
7 changes: 6 additions & 1 deletion packages/docs/content/docs/netlify-large-media.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
group: Media
title: Netlify Large Media
weight: 20
deprecated: true
---

## <img src="https://img.shields.io/badge/-Beta%20Feature-blue" alt="Beta Feature. Use at your own risk" title="Beta Feature. Use at your own risk" />
<Alert severity="warning">
Netlify Large Media is deprecated as of September 1, 2023. Please refer to the deprecation notice
in [Netlify's Support Forums](https://docs.netlify.com/large-media/overview/) (see deprecation
notice).
</Alert>

[Netlify Large Media](https://www.netlify.com/features/large-media/) is a [Git LFS](https://git-lfs.github.com/) implementation for repositories connected to Netlify sites. This means that you can use Git to work with large asset files like images, audio, and video, without bloating your repository. It does this by replacing the asset files in your repository with text pointer files, then uploading the assets to the Netlify Large Media storage service.

Expand Down
35 changes: 35 additions & 0 deletions packages/docs/src/components/docs/DeprecatedImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

const DeprecatedImage = () => {
return (
<Box
title="Beta Feature. Use at your own risk"
sx={{
width: 81,
height: 20,
background: '#ffa726',
borderRadius: 1,
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Typography
variant="caption"
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontWeight: 'bold',
lineHeight: '20px',
color: 'white',
}}
>
Deprecated
</Typography>
</Box>
);
};

export default DeprecatedImage;
3 changes: 2 additions & 1 deletion packages/docs/src/components/docs/DocsLeftNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
import { useState } from 'react';

import BetaImage from './BetaImage';
import DeprecatedImage from './DeprecatedImage';

import type { DocsGroupLink } from '../../interface';

Expand Down Expand Up @@ -66,7 +67,7 @@ const DocsLeftNavGroup = ({ name, links }: DocsLeftNavGroupProps) => {
primary={
<StyledListItemPrimary>
{link.title}
{link.beta ? <BetaImage /> : null}
{link.deprecated ? <DeprecatedImage /> : link.beta ? <BetaImage /> : null}
</StyledListItemPrimary>
}
/>
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const Header = ({ mode, docsGroups, searchablePages, toggleColorMode }: HeaderPr
title: link.title,
url: `/docs/${link.slug}`,
beta: link.beta,
deprecated: link.deprecated,
})),
})),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRouter } from 'next/router';
import { useMemo } from 'react';

import BetaImage from '../../docs/BetaImage';
import DeprecatedImage from '../../docs/DeprecatedImage';

import type { MouseEvent } from 'react';
import type { MenuLink } from '../../../interface';
Expand All @@ -15,7 +16,7 @@ interface MobileNavLinkProps {
}

const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
const { title, url, beta = false } = link;
const { title, url, beta = false, deprecated = false } = link;
const { asPath } = useRouter();

const selected = useMemo(() => {
Expand All @@ -35,7 +36,7 @@ const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
primary={
<>
{title}
{beta ? <BetaImage /> : null}
{deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
</>
}
primaryTypographyProps={{
Expand Down
3 changes: 3 additions & 0 deletions packages/docs/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export interface DocsData {
readonly weight: number;
readonly slug: string;
readonly beta?: boolean;
readonly deprecated?: boolean;
}

export interface DocsPageHeading {
Expand All @@ -95,6 +96,7 @@ export interface DocsGroupLink {
readonly title: string;
readonly slug: string;
readonly beta: boolean;
readonly deprecated: boolean;
}

export interface DocsGroup {
Expand Down Expand Up @@ -133,6 +135,7 @@ export interface MenuLink {
readonly title: string;
readonly url: string;
readonly beta?: boolean;
readonly deprecated?: boolean;
}

export interface MenuLinkSubGroup {
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/lib/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export function fetchDocsContent(): [DocsPage[], DocsGroup[]] {
title: doc.data.title,
slug: doc.data.slug,
beta: doc.data.beta ?? false,
deprecated: doc.data.deprecated ?? false,
});
return acc;
}, {} as Record<string, DocsGroupLink[]>);
Expand Down
7 changes: 6 additions & 1 deletion packages/docs/src/pages/docs/[doc].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { serialize } from 'next-mdx-remote/serialize';
import remarkGfm from 'remark-gfm';

import BetaImage from '../../components/docs/BetaImage';
import DeprecatedImage from '../../components/docs/DeprecatedImage';
import DocsContent from '../../components/docs/DocsContent';
import DocsLeftNav from '../../components/docs/DocsLeftNav';
import DocsRightNav from '../../components/docs/DocsRightNav';
Expand Down Expand Up @@ -81,6 +82,7 @@ interface DocsProps {
title: string;
slug: string;
beta: boolean;
deprecated: boolean;
description: string;
source: MDXRemoteSerializeResult;
}
Expand All @@ -93,6 +95,7 @@ const Docs = ({
description,
source,
beta,
deprecated,
}: DocsProps) => {
const theme = useTheme();

Expand All @@ -111,7 +114,7 @@ const Docs = ({
<DocsContent>
<Header1>
{title}
{beta ? <BetaImage /> : null}
{deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
</Header1>
<MDXRemote
{...source}
Expand All @@ -134,6 +137,7 @@ const Docs = ({
Template,
Templates,
BetaImage,
DeprecatedImage,
Deprecated,
}}
/>
Expand Down Expand Up @@ -186,6 +190,7 @@ export const getStaticProps: GetStaticProps = async ({ params }): Promise<{ prop
title: data.title,
slug: data.slug,
beta: data.beta ?? false,
deprecated: data.deprecated ?? false,
description: '',
source,
},
Expand Down