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

Commit f6c5110

Browse files
authored
chore: add deprecation notice to netlify large media docs (#948)
1 parent c1ccc15 commit f6c5110

File tree

8 files changed

+57
-5
lines changed

8 files changed

+57
-5
lines changed

packages/docs/content/docs/netlify-large-media.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
group: Media
33
title: Netlify Large Media
44
weight: 20
5+
deprecated: true
56
---
67

7-
## <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" />
8+
<Alert severity="warning">
9+
Netlify Large Media is deprecated as of September 1, 2023. Please refer to the deprecation notice
10+
in [Netlify's Support Forums](https://docs.netlify.com/large-media/overview/) (see deprecation
11+
notice).
12+
</Alert>
813

914
[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.
1015

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Box from '@mui/material/Box';
2+
import Typography from '@mui/material/Typography';
3+
4+
const DeprecatedImage = () => {
5+
return (
6+
<Box
7+
title="Beta Feature. Use at your own risk"
8+
sx={{
9+
width: 81,
10+
height: 20,
11+
background: '#ffa726',
12+
borderRadius: 1,
13+
display: 'inline-flex',
14+
alignItems: 'center',
15+
justifyContent: 'center',
16+
}}
17+
>
18+
<Typography
19+
variant="caption"
20+
sx={{
21+
display: 'flex',
22+
alignItems: 'center',
23+
justifyContent: 'center',
24+
fontWeight: 'bold',
25+
lineHeight: '20px',
26+
color: 'white',
27+
}}
28+
>
29+
Deprecated
30+
</Typography>
31+
</Box>
32+
);
33+
};
34+
35+
export default DeprecatedImage;

packages/docs/src/components/docs/DocsLeftNavGroup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
99
import { useState } from 'react';
1010

1111
import BetaImage from './BetaImage';
12+
import DeprecatedImage from './DeprecatedImage';
1213

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

@@ -66,7 +67,7 @@ const DocsLeftNavGroup = ({ name, links }: DocsLeftNavGroupProps) => {
6667
primary={
6768
<StyledListItemPrimary>
6869
{link.title}
69-
{link.beta ? <BetaImage /> : null}
70+
{link.deprecated ? <DeprecatedImage /> : link.beta ? <BetaImage /> : null}
7071
</StyledListItemPrimary>
7172
}
7273
/>

packages/docs/src/components/layout/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const Header = ({ mode, docsGroups, searchablePages, toggleColorMode }: HeaderPr
134134
title: link.title,
135135
url: `/docs/${link.slug}`,
136136
beta: link.beta,
137+
deprecated: link.deprecated,
137138
})),
138139
})),
139140
},

packages/docs/src/components/layout/mobile-drawer/MobileNavLink.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useRouter } from 'next/router';
55
import { useMemo } from 'react';
66

77
import BetaImage from '../../docs/BetaImage';
8+
import DeprecatedImage from '../../docs/DeprecatedImage';
89

910
import type { MouseEvent } from 'react';
1011
import type { MenuLink } from '../../../interface';
@@ -15,7 +16,7 @@ interface MobileNavLinkProps {
1516
}
1617

1718
const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
18-
const { title, url, beta = false } = link;
19+
const { title, url, beta = false, deprecated = false } = link;
1920
const { asPath } = useRouter();
2021

2122
const selected = useMemo(() => {
@@ -35,7 +36,7 @@ const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
3536
primary={
3637
<>
3738
{title}
38-
{beta ? <BetaImage /> : null}
39+
{deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
3940
</>
4041
}
4142
primaryTypographyProps={{

packages/docs/src/interface.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export interface DocsData {
7676
readonly weight: number;
7777
readonly slug: string;
7878
readonly beta?: boolean;
79+
readonly deprecated?: boolean;
7980
}
8081

8182
export interface DocsPageHeading {
@@ -95,6 +96,7 @@ export interface DocsGroupLink {
9596
readonly title: string;
9697
readonly slug: string;
9798
readonly beta: boolean;
99+
readonly deprecated: boolean;
98100
}
99101

100102
export interface DocsGroup {
@@ -133,6 +135,7 @@ export interface MenuLink {
133135
readonly title: string;
134136
readonly url: string;
135137
readonly beta?: boolean;
138+
readonly deprecated?: boolean;
136139
}
137140

138141
export interface MenuLinkSubGroup {

packages/docs/src/lib/docs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export function fetchDocsContent(): [DocsPage[], DocsGroup[]] {
137137
title: doc.data.title,
138138
slug: doc.data.slug,
139139
beta: doc.data.beta ?? false,
140+
deprecated: doc.data.deprecated ?? false,
140141
});
141142
return acc;
142143
}, {} as Record<string, DocsGroupLink[]>);

packages/docs/src/pages/docs/[doc].tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { serialize } from 'next-mdx-remote/serialize';
44
import remarkGfm from 'remark-gfm';
55

66
import BetaImage from '../../components/docs/BetaImage';
7+
import DeprecatedImage from '../../components/docs/DeprecatedImage';
78
import DocsContent from '../../components/docs/DocsContent';
89
import DocsLeftNav from '../../components/docs/DocsLeftNav';
910
import DocsRightNav from '../../components/docs/DocsRightNav';
@@ -81,6 +82,7 @@ interface DocsProps {
8182
title: string;
8283
slug: string;
8384
beta: boolean;
85+
deprecated: boolean;
8486
description: string;
8587
source: MDXRemoteSerializeResult;
8688
}
@@ -93,6 +95,7 @@ const Docs = ({
9395
description,
9496
source,
9597
beta,
98+
deprecated,
9699
}: DocsProps) => {
97100
const theme = useTheme();
98101

@@ -111,7 +114,7 @@ const Docs = ({
111114
<DocsContent>
112115
<Header1>
113116
{title}
114-
{beta ? <BetaImage /> : null}
117+
{deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
115118
</Header1>
116119
<MDXRemote
117120
{...source}
@@ -134,6 +137,7 @@ const Docs = ({
134137
Template,
135138
Templates,
136139
BetaImage,
140+
DeprecatedImage,
137141
Deprecated,
138142
}}
139143
/>
@@ -186,6 +190,7 @@ export const getStaticProps: GetStaticProps = async ({ params }): Promise<{ prop
186190
title: data.title,
187191
slug: data.slug,
188192
beta: data.beta ?? false,
193+
deprecated: data.deprecated ?? false,
189194
description: '',
190195
source,
191196
},

0 commit comments

Comments
 (0)