Skip to content

Commit 07573a2

Browse files
Merge branch 'master' into v8-docs
2 parents a0ec24b + 6aefdcb commit 07573a2

File tree

974 files changed

+8369
-6779
lines changed

Some content is hidden

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

974 files changed

+8369
-6779
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "💻 Docs Platform: 🔗 404 Error"
2+
labels: "Type: Platform,404"
3+
description: Broken links, missing pages, and other 404 errors.
4+
5+
body:
6+
- type: textarea
7+
id: url
8+
attributes:
9+
label: URL
10+
description: The broken link or missing page.
11+
placeholder: |-
12+
https://docs.sentry.io/your-broken-link
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: notes
17+
attributes:
18+
label: Additional Info
19+
description: Where did you find the link? Anything else we should know?
20+
validations:
21+
required: false
22+
- type: markdown
23+
attributes:
24+
value: |-
25+
## Thanks 🙏
26+
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
27+
validations:
28+
required: false

app/[[...path]]/layout.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ import 'prism-sentry/index.css';
22

33
import type {Metadata} from 'next';
44

5-
import 'sentry-docs/styles/screen.scss';
5+
import {HotReload} from 'sentry-docs/components/hotReload';
66

77
export const metadata: Metadata = {
88
title: {template: '%s | Sentry Documentation', default: 'Home'},
99
};
1010

1111
export default function DocsLayout({children}: {children: React.ReactNode}) {
12-
return <div>{children}</div>;
12+
return (
13+
<div>
14+
{children}
15+
<HotReload />
16+
</div>
17+
);
1318
}

app/[[...path]]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default async function Page({params}) {
5353
const docs = await getDocsFrontMatter();
5454
const rootNode = await getDocsRootNode();
5555
if (!rootNode) {
56+
// eslint-disable-next-line no-console
5657
console.warn('no root node');
5758
return notFound();
5859
}
@@ -78,6 +79,7 @@ export default async function Page({params}) {
7879

7980
const pageNode = nodeForPath(rootNode, params.path);
8081
if (!pageNode) {
82+
// eslint-disable-next-line no-console
8183
console.warn('no page node', params.path);
8284
return notFound();
8385
}
@@ -88,6 +90,7 @@ export default async function Page({params}) {
8890
doc = await getFileBySlug(`docs/${pageNode.path}`);
8991
} catch (e) {
9092
if (e.code === 'ENOENT') {
93+
// eslint-disable-next-line no-console
9194
console.error('ENOENT', pageNode.path);
9295
return notFound();
9396
}
@@ -121,7 +124,7 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
121124

122125
const rootNode = await getDocsRootNode();
123126

124-
if (rootNode && params.path) {
127+
if (params.path) {
125128
const pageNode = nodeForPath(rootNode, params.path);
126129
if (pageNode) {
127130
const guideOrPlatform = getCurrentPlatformOrGuide(rootNode, params.path);

app/api/auth/[...nextauth]/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import {PrismaAdapter} from '@auth/prisma-adapter';
22
import NextAuth from 'next-auth';
3+
import {Adapter} from 'next-auth/adapters';
34
import GoogleProvider from 'next-auth/providers/google';
45

56
import prisma from 'sentry-docs/prisma';
67

78
const handler = NextAuth({
8-
adapter: PrismaAdapter(prisma),
9+
adapter: PrismaAdapter(prisma) as Adapter,
910
providers: [
1011
GoogleProvider({
1112
clientId: process.env.GOOGLE_CLIENT_ID || '',

app/changelog/%5Fadmin/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const metadata: Metadata = {
1313
export default async function Layout({children}: {children: ReactNode}) {
1414
const session = await getServerSession(GET);
1515
let content = (
16-
<div className="relative min-h-[calc(100vh-8rem)] w-full mx-auto bg-gray-200 pt-16 grid grid-cols-12">
16+
<div className="relative min-h-[calc(100vh-8rem)] w-full mx-auto bg-gray-200 pt-16">
1717
{children}
1818
<div className="fixed top-3 right-4 z-50">
1919
<Suspense fallback={null}>

app/changelog/%5Fadmin/page.tsx

Lines changed: 85 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -25,97 +25,102 @@ export default async function ChangelogsListPage() {
2525

2626
return (
2727
<Fragment>
28-
<header className="mb-4 col-start-2 col-span-2 text-left">
28+
<header className="text-left pl-4 mb-4">
2929
<Button>
3030
<PlusIcon />
3131
<Link href="/changelog/_admin/create">New Changelog</Link>
3232
</Button>
3333
</header>
34-
<section className="overflow-x-auto col-start-2 col-span-10 shadow-md rounded-lg">
35-
<table className="w-full text-sm text-left text-gray-500">
36-
<thead className="text-xs text-gray-700 uppercase bg-gray-50">
34+
35+
<table className="table-fixed w-11/12 mx-auto text-sm text-left text-gray-500">
36+
<colgroup>
37+
<col style={{width: '30%'}} />
38+
<col style={{width: '30%'}} />
39+
<col style={{width: '20%'}} />
40+
<col style={{width: '20%'}} />
41+
</colgroup>
42+
<thead className="text-xs text-gray-700 uppercase bg-gray-50">
43+
<tr>
44+
<th className="whitespace-nowrap px-4 py-2">Title</th>
45+
<th className="px-4 py-2 break-words">Categories</th>
46+
<th className="whitespace-nowrap px-4 py-2">Published by</th>
47+
<th className="px-4 py-2" />
48+
</tr>
49+
</thead>
50+
<tbody className="divide-y divide-gray-200 bg-white border-b hover:bg-gray-50 dark:hover:bg-gray-600">
51+
{changelogs.length === 0 && (
3752
<tr>
38-
<th className="whitespace-nowrap px-4 py-2">Title</th>
39-
<th className="whitespace-nowrap px-4 py-2">Categories</th>
40-
<th className="whitespace-nowrap px-4 py-2">Published by</th>
41-
<th className="px-4 py-2" />
53+
<td
54+
colSpan={4}
55+
className="text-center font-medium text-gray-900 whitespace-nowrap"
56+
>
57+
No changelogs found
58+
</td>
4259
</tr>
43-
</thead>
44-
<tbody className="divide-y divide-gray-200 bg-white border-b hover:bg-gray-50 dark:hover:bg-gray-600">
45-
{changelogs.length === 0 && (
46-
<tr>
47-
<td
48-
colSpan={10}
49-
className="text-center font-medium text-gray-900 whitespace-nowrap"
50-
>
51-
No changelogs found
52-
</td>
53-
</tr>
54-
)}
60+
)}
5561

56-
{changelogs.map(changelog => (
57-
<tr key={changelog.id} className="bg-white border-b hover:bg-gray-50">
58-
<td className="px-6 py-4 font-medium text-gray-900">{changelog.title}</td>
62+
{changelogs.map(changelog => (
63+
<tr key={changelog.id} className="bg-white border-b hover:bg-gray-50">
64+
<td className="px-6 py-2 font-medium text-gray-900">{changelog.title}</td>
5965

60-
<td className="px-4 py-2">
61-
{changelog.categories.map(category => (
62-
<div
63-
key={category.id}
64-
className="inline whitespace-nowrap p-2 uppercase shadow-sm no-underline rounded-full text-red text-xs mr-1 bg-gray-100"
65-
>
66-
{category.name}
67-
</div>
68-
))}
69-
</td>
70-
<td className="px-4 py-2 text-center">
71-
{changelog.published && (
72-
<span className="text-gray-500">
73-
<Text size="1">
74-
{' '}
75-
{new Date(changelog.publishedAt || '').toLocaleDateString(
76-
undefined,
77-
{month: 'long', day: 'numeric'}
78-
)}
79-
</Text>
80-
<br />
81-
</span>
82-
)}
83-
<Text size="1">{changelog.author?.name}</Text>
84-
</td>
66+
<td className="px-4 py-2 break-words">
67+
{changelog.categories.map(category => (
68+
<div
69+
key={category.id}
70+
className="inline whitespace-nowrap p-2 uppercase shadow-sm no-underline rounded-full text-red text-xs mr-1 mb-4 bg-gray-100"
71+
>
72+
{category.name}
73+
</div>
74+
))}
75+
</td>
76+
<td className="px-4 py-2 text-center">
77+
{changelog.published && (
78+
<span className="text-gray-500">
79+
<Text size="1">
80+
{' '}
81+
{new Date(changelog.publishedAt || '').toLocaleDateString(
82+
undefined,
83+
{month: 'long', day: 'numeric'}
84+
)}
85+
</Text>
86+
<br />
87+
</span>
88+
)}
89+
<Text size="1">{changelog.author?.name}</Text>
90+
</td>
8591

86-
<td className="px-4 py-2">
87-
<div className="flex h-full justify-end">
88-
<Link
89-
href={`/changelog/${changelog.slug}`}
90-
className="text-indigo-600 hover:bg-indigo-100 rounded-md px-1 py-2 text-xs whitespace-nowrap"
91-
>
92-
👀 Show
93-
</Link>
94-
<Link
95-
href={`/changelog/_admin/${changelog.id}/edit`}
96-
className="text-indigo-600 hover:bg-indigo-100 rounded-md px-1 py-2 text-xs whitespace-nowrap"
97-
>
98-
📝 Edit
99-
</Link>
100-
{changelog.published ? (
101-
<Confirm action={unpublishChangelog} changelog={changelog}>
102-
⛔️ Unpublish?
103-
</Confirm>
104-
) : (
105-
<Confirm action={publishChangelog} changelog={changelog}>
106-
✅ Publish?
107-
</Confirm>
108-
)}
109-
<Confirm action={deleteChangelog} changelog={changelog}>
110-
💀 Delete?
92+
<td className="px-4 py-2">
93+
<div className="flex h-full justify-end">
94+
<Link
95+
href={`/changelog/${changelog.slug}`}
96+
className="text-indigo-600 hover:bg-indigo-100 rounded-md px-1 py-2 text-xs whitespace-nowrap"
97+
>
98+
👀 Show
99+
</Link>
100+
<Link
101+
href={`/changelog/_admin/${changelog.id}/edit`}
102+
className="text-indigo-600 hover:bg-indigo-100 rounded-md px-1 py-2 text-xs whitespace-nowrap"
103+
>
104+
📝 Edit
105+
</Link>
106+
{changelog.published ? (
107+
<Confirm action={unpublishChangelog} changelog={changelog}>
108+
⛔️ Unpublish?
111109
</Confirm>
112-
</div>
113-
</td>
114-
</tr>
115-
))}
116-
</tbody>
117-
</table>
118-
</section>
110+
) : (
111+
<Confirm action={publishChangelog} changelog={changelog}>
112+
✅ Publish?
113+
</Confirm>
114+
)}
115+
<Confirm action={deleteChangelog} changelog={changelog}>
116+
💀 Delete?
117+
</Confirm>
118+
</div>
119+
</td>
120+
</tr>
121+
))}
122+
</tbody>
123+
</table>
119124
</Fragment>
120125
);
121126
}

app/changelog/[slug]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {getServerSession} from 'next-auth/next';
99
import {MDXRemote} from 'next-mdx-remote/rsc';
1010

1111
import Article from 'sentry-docs/components/changelog/article';
12+
import ArticleFooter from 'sentry-docs/components/changelog/articleFooter';
1213
import {mdxOptions} from 'sentry-docs/mdxOptions';
1314
import prisma from 'sentry-docs/prisma';
1415

@@ -114,6 +115,7 @@ export default async function ChangelogEntry({params}) {
114115
/>
115116
</Suspense>
116117
</Article>
118+
<ArticleFooter />
117119
</div>
118120
</div>
119121
</div>

app/changelog/globals.css

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1 @@
1-
@import '@radix-ui/themes/styles.css';
21

3-
@tailwind base;
4-
@tailwind components;
5-
@tailwind utilities;
6-
7-
#changelogcontent {
8-
font-family: var(--font-rubik);
9-
}
10-
.radix-themes {
11-
--cursor-button: pointer;
12-
}
13-
.fancy-border {
14-
transition-property: box-shadow, border-color;
15-
transition-duration: 0.25s;
16-
transition-timing-function: ease-out;
17-
18-
&:hover {
19-
box-shadow:
20-
0 2px 0 rgba(54, 45, 89, 0.15),
21-
-0.1875rem -0.1875rem 0 0.1875rem #f2b712,
22-
0 0 0 0.375rem #e1567c;
23-
text-decoration: none;
24-
cursor: pointer;
25-
}
26-
}
27-
28-
.hero-top-left-down-slope {
29-
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%);
30-
}
31-
32-
.hero-bottom-left-down-slope {
33-
clip-path: polygon(0 0, 100% 100%, 100% 100%, 0 100%)
34-
}
35-
36-
.footer-top-right-down-slope {
37-
clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
38-
}
39-
40-
.icon {
41-
margin-left: 0.25em;
42-
43-
svg {
44-
display: inline;
45-
width: 14px;
46-
height: 14px;
47-
}
48-
}

app/changelog/header.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ export default function Header({loading}) {
22
return (
33
<div className="w-full mx-auto h-96 relative bg-darkPurple">
44
<div className="relative w-full lg:max-w-7xl mx-auto px-4 lg:px-8 pt-8 grid grid-cols-12 items-center">
5+
{/* this needs to be a plain <img> next/image doesn't work here because of redirects we do */}
6+
{/* eslint-disable-next-line @next/next/no-img-element */}
57
<img
6-
className={`justify-self-center col-span-10 z-20 hidden lg:block ${loading ? 'animate-fade-in-left' : ''}`}
8+
className={`justify-self-center col-span-10 hidden lg:block ${loading ? 'animate-fade-in-left' : ''}`}
79
src="https://docs.sentry.io/changelog/assets/hero.png"
810
alt="Sentry Changelog"
911
height={273}
@@ -12,16 +14,24 @@ export default function Header({loading}) {
1214
<div
1315
className={`relative col-span-12 mt-32 lg:absolute lg:w-96 lg:right-1/4 lg:-bottom-2 ${loading ? 'animate-fade-in-right' : ''}`}
1416
>
15-
<h1 className="justify-self-center text-white font-bold text-4xl text-center lg:text-left">
17+
<h1 className="justify-self-center text-white font-bold text-4xl text-center lg:text-left mb-2">
1618
Sentry Changelog
1719
</h1>
18-
<h2 className="justify-self-center z-20 text-gold text-1xl text-center lg:text-left">
19-
Stay up to date on everything big and small, from product updates to SDK
20-
changes with the Sentry Changelog.
20+
<h2 className="justify-self-center text-gold text-1xl text-center lg:text-left">
21+
Follow&nbsp;
22+
<a
23+
href="https://twitter.com/SentryChangelog"
24+
target="_blank"
25+
rel="noreferrer"
26+
className="underline underline-offset-2"
27+
>
28+
@SentryChangelog
29+
</a>
30+
&nbsp;to stay up to date on everything from product updates to SDK changes.
2131
</h2>
2232
</div>
2333
</div>
24-
<div className="hero-bottom-left-down-slope absolute bottom-0 w-full h-10 bg-gray-200" />
34+
<div className="hero-bottom-left-down-slope absolute -bottom-0.5 w-full h-10 bg-gray-200 border-none" />
2535
</div>
2636
);
2737
}

0 commit comments

Comments
 (0)