Skip to content

Commit 06c2123

Browse files
committed
Merge branch 'master' into martinhaintz/fix-flutter-multiview
* master: (213 commits) Remove feature flag documentation from issue details page (#11734) docs(insights): Remove EA note from Queries re: MongoDB (#11735) docs(nuxt): `piniaIntegration` in Nuxt (#11684) feat(flags): Add OpenFeature and LaunchDarkly integration documentation (#11675) Cleaning up mermaid code and made it a bit more readable in dark mode (#11726) docs(scopes): Add graphics for scope forking (#11702) Unreal Engine plugin documentation update (#11625) Bump API schema to 25e528ff (#11728) Bump API schema to 12bd311c (#11725) fix dark theme resolution (#11718) Update sign in to go to sentry (#11723) getsentry/relay@4bdad17 API examples syntax highlighting (#11715) feat: Convert mermaid code blocks to SVGs client side (#11690) Trace context is required for transactions (#11456) deps: Bump SDK to 8.36.0 (#11696) getsentry/relay@2e2587c MAUI screenshot `SetBeforeScreenshotCapture`(#11672) Add CSS rule to fix color of bold links (#11707) Fix small typo on web-vitals-concepts (#11706) ...
2 parents 97c512c + 9a7bded commit 06c2123

File tree

663 files changed

+14727
-3885
lines changed

Some content is hidden

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

663 files changed

+14727
-3885
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "📝 Documentation on develop.sentry.dev"
2+
labels: ["Type: Content", "Develop"]
3+
description: Missing, incorrect, or unclear developer documentation.
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |-
8+
Is the documentation issue something you know how to fix? Consider contributing to Open Source by opening a PR to fix it instead!
9+
- type: input
10+
id: area-specific
11+
attributes:
12+
label: Which section?
13+
description: Which section of the developer documentation needs to be updated?
14+
validations:
15+
required: true
16+
- type: input
17+
id: page-url
18+
attributes:
19+
label: Page URL
20+
description: Please provide the URL of the page which should be changed (if applicable).
21+
- type: textarea
22+
id: description
23+
attributes:
24+
label: Description
25+
description: What were you looking for/trying to do/expecting?
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: solution
30+
attributes:
31+
label: Suggested Solution
32+
description: If you have an idea on how we can solve this, please share.
33+
- type: markdown
34+
attributes:
35+
value: |-
36+
## Thanks 🙏
37+
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
38+

.github/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
# Product Areas - www.notion.so/sentry/473791bae5bf43399d46093050b77bf0
8181
- name: 'Product Area: Unknown'
8282
color: '8D5494'
83-
- name: 'Product Area: Sign In'
83+
- name: 'Product Area: Go to Sentry'
8484
color: '8D5494'
8585
- name: 'Product Area: Issues'
8686
color: '8D5494'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Enforce Version Conventions
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
check-version-convention:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Install bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Run script for checking conventions
22+
run: bun scripts/check-version-conventions.ts

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
with:
5858
github-token: ${{ steps.token.outputs.token }}
5959

60-
# TODO(mjq): Bring this back once tests are working.
6160
job_test:
6261
name: Test
6362
runs-on: ubuntu-latest
@@ -72,5 +71,4 @@ jobs:
7271
- run: yarn install --frozen-lockfile
7372
if: steps.cache.outputs.cache-hit != 'true'
7473
- name: Run Tests
75-
# run: yarn test
76-
run: true
74+
run: yarn test

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

Lines changed: 100 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,24 @@ import {Home} from 'sentry-docs/components/home';
1111
import {Include} from 'sentry-docs/components/include';
1212
import {PlatformContent} from 'sentry-docs/components/platformContent';
1313
import {
14+
DocNode,
1415
getCurrentPlatformOrGuide,
1516
getDocsRootNode,
17+
getNextNode,
18+
getPreviousNode,
1619
nodeForPath,
1720
} from 'sentry-docs/docTree';
1821
import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
19-
import {getDevDocsFrontMatter, getDocsFrontMatter, getFileBySlug} from 'sentry-docs/mdx';
22+
import {
23+
getDevDocsFrontMatter,
24+
getDocsFrontMatter,
25+
getFileBySlug,
26+
getVersionsFromDoc,
27+
} from 'sentry-docs/mdx';
2028
import {mdxComponents} from 'sentry-docs/mdxComponents';
2129
import {setServerContext} from 'sentry-docs/serverContext';
30+
import {PaginationNavNode} from 'sentry-docs/types/paginationNavNode';
31+
import {stripVersion} from 'sentry-docs/versioning';
2232

2333
export async function generateStaticParams() {
2434
const docs = await (isDeveloperDocs ? getDevDocsFrontMatter() : getDocsFrontMatter());
@@ -36,7 +46,11 @@ export const dynamic = 'force-static';
3646

3747
const mdxComponentsWithWrapper = mdxComponents(
3848
{Include, PlatformContent},
39-
({children, frontMatter}) => <DocPage frontMatter={frontMatter}>{children}</DocPage>
49+
({children, frontMatter, nextPage, previousPage}) => (
50+
<DocPage frontMatter={frontMatter} nextPage={nextPage} previousPage={previousPage}>
51+
{children}
52+
</DocPage>
53+
)
4054
);
4155

4256
function MDXLayoutRenderer({mdxSource, ...rest}) {
@@ -47,11 +61,48 @@ function MDXLayoutRenderer({mdxSource, ...rest}) {
4761
export default async function Page({params}: {params: {path?: string[]}}) {
4862
// get frontmatter of all docs in tree
4963
const rootNode = await getDocsRootNode();
64+
5065
setServerContext({
5166
rootNode,
5267
path: params.path ?? [],
5368
});
5469

70+
if (!params.path && !isDeveloperDocs) {
71+
return <Home />;
72+
}
73+
74+
const pageNode = nodeForPath(rootNode, params.path ?? '');
75+
76+
if (!pageNode) {
77+
// eslint-disable-next-line no-console
78+
console.warn('no page node', params.path);
79+
return notFound();
80+
}
81+
82+
// gather previous and next page that will be displayed in the bottom pagination
83+
const getPaginationDetails = (
84+
getNode: (node: DocNode) => DocNode | undefined | 'root',
85+
page: PaginationNavNode | undefined
86+
) => {
87+
if (page && 'path' in page && 'title' in page) {
88+
return page;
89+
}
90+
91+
const node = getNode(pageNode);
92+
93+
if (node === 'root') {
94+
return {path: '', title: 'Welcome to Sentry'};
95+
}
96+
97+
return node ? {path: node.path, title: node.frontmatter.title} : undefined;
98+
};
99+
100+
const previousPage = getPaginationDetails(
101+
getPreviousNode,
102+
pageNode?.frontmatter?.previousPage
103+
);
104+
const nextPage = getPaginationDetails(getNextNode, pageNode?.frontmatter?.nextPage);
105+
55106
if (isDeveloperDocs) {
56107
// get the MDX for the current doc and render it
57108
let doc: Awaited<ReturnType<typeof getFileBySlug>> | null = null;
@@ -67,13 +118,17 @@ export default async function Page({params}: {params: {path?: string[]}}) {
67118
}
68119
const {mdxSource, frontMatter} = doc;
69120
// pass frontmatter tree into sidebar, rendered page + fm into middle, headers into toc
70-
return <MDXLayoutRenderer mdxSource={mdxSource} frontMatter={frontMatter} />;
71-
}
72-
if (!params.path) {
73-
return <Home />;
121+
return (
122+
<MDXLayoutRenderer
123+
mdxSource={mdxSource}
124+
frontMatter={frontMatter}
125+
nextPage={nextPage}
126+
previousPage={previousPage}
127+
/>
128+
);
74129
}
75130

76-
if (params.path[0] === 'api' && params.path.length > 1) {
131+
if (params.path?.[0] === 'api' && params.path.length > 1) {
77132
const categories = await apiCategories();
78133
const category = categories.find(c => c.slug === params?.path?.[1]);
79134
if (category) {
@@ -87,13 +142,6 @@ export default async function Page({params}: {params: {path?: string[]}}) {
87142
}
88143
}
89144

90-
const pageNode = nodeForPath(rootNode, params.path);
91-
if (!pageNode) {
92-
// eslint-disable-next-line no-console
93-
console.warn('no page node', params.path);
94-
return notFound();
95-
}
96-
97145
// get the MDX for the current doc and render it
98146
let doc: Awaited<ReturnType<typeof getFileBySlug>> | null = null;
99147
try {
@@ -108,8 +156,19 @@ export default async function Page({params}: {params: {path?: string[]}}) {
108156
}
109157
const {mdxSource, frontMatter} = doc;
110158

159+
// collect versioned files
160+
const allFm = await getDocsFrontMatter();
161+
const versions = getVersionsFromDoc(allFm, pageNode.path);
162+
111163
// pass frontmatter tree into sidebar, rendered page + fm into middle, headers into toc.
112-
return <MDXLayoutRenderer mdxSource={mdxSource} frontMatter={frontMatter} />;
164+
return (
165+
<MDXLayoutRenderer
166+
mdxSource={mdxSource}
167+
frontMatter={{...frontMatter, versions}}
168+
nextPage={nextPage}
169+
previousPage={previousPage}
170+
/>
171+
);
113172
}
114173

115174
type MetadataProps = {
@@ -118,6 +177,17 @@ type MetadataProps = {
118177
};
119178
};
120179

180+
// Helper function to clean up canonical tags missing leading or trailing slash
181+
function formatCanonicalTag(tag: string) {
182+
if (tag.charAt(0) !== '/') {
183+
tag = '/' + tag;
184+
}
185+
if (tag.charAt(tag.length - 1) !== '/') {
186+
tag = tag + '/';
187+
}
188+
return tag;
189+
}
190+
121191
export async function generateMetadata({params}: MetadataProps): Promise<Metadata> {
122192
const domain = isDeveloperDocs
123193
? 'https://develop.sentry.dev'
@@ -128,27 +198,37 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
128198
: domain;
129199
let title =
130200
'Sentry Docs | Application Performance Monitoring &amp; Error Tracking Software';
201+
let customCanonicalTag;
131202
let description =
132203
'Self-hosted and cloud-based application performance monitoring &amp; error tracking that helps software teams see clearer, solve quicker, &amp; learn continuously.';
133204
const images = [{url: `${previewDomain ?? domain}/meta.jpg`, width: 1200, height: 822}];
134205

135206
const rootNode = await getDocsRootNode();
136207

137208
if (params.path) {
138-
const pageNode = nodeForPath(rootNode, params.path);
209+
const pageNode = nodeForPath(
210+
rootNode,
211+
stripVersion(params.path.join('/')).split('/')
212+
);
139213
if (pageNode) {
140214
const guideOrPlatform = getCurrentPlatformOrGuide(rootNode, params.path);
215+
141216
title =
142217
pageNode.frontmatter.title +
143218
(guideOrPlatform ? ` | Sentry for ${guideOrPlatform.title}` : '');
144219
description = pageNode.frontmatter.description ?? '';
220+
221+
if (pageNode.frontmatter.customCanonicalTag) {
222+
customCanonicalTag = formatCanonicalTag(pageNode.frontmatter.customCanonicalTag);
223+
}
145224
}
146225
}
147226

148-
let canonical = domain;
149-
if (params.path) {
150-
canonical = `${domain}/${params.path.join('/')}/`;
151-
}
227+
const canonical = customCanonicalTag
228+
? domain + customCanonicalTag
229+
: params.path
230+
? `${domain}/${params.path.join('/')}/`
231+
: domain;
152232

153233
return {
154234
title,

app/platform-redirect/page.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {redirect} from 'next/navigation';
22

3+
import {Alert} from 'sentry-docs/components/alert';
34
import {DocPage} from 'sentry-docs/components/docPage';
45
import {PlatformIcon} from 'sentry-docs/components/platformIcon';
56
import {SmartLink} from 'sentry-docs/components/smartLink';
@@ -14,16 +15,31 @@ export default async function Page({
1415
if (Array.isArray(next)) {
1516
next = next[0];
1617
}
18+
1719
// discard the hash
1820
const [pathname, _] = next.split('#');
1921
const rootNode = await getDocsRootNode();
22+
const defaultTitle = 'Platform Specific Content';
23+
let description = '';
24+
const platformInfo =
25+
"The page you are looking for is customized for each platform. Select your platform below and we'll direct you to the most specific documentation on it.";
26+
let title = defaultTitle;
27+
2028
// get rid of irrelevant platforms for the `next` path
2129
const platformList = extractPlatforms(rootNode).filter(platform_ => {
22-
return !!nodeForPath(rootNode, [
30+
const node = nodeForPath(rootNode, [
2331
'platforms',
2432
platform_.key,
2533
...pathname.split('/').filter(Boolean),
2634
]);
35+
36+
// extract title and description for displaying it on page
37+
if (node && title === defaultTitle && pathname.length > 0) {
38+
title = node.frontmatter.title ?? title;
39+
description = node.frontmatter.description || '';
40+
}
41+
42+
return !!node;
2743
});
2844

2945
if (platformList.length === 0) {
@@ -42,18 +58,16 @@ export default async function Page({
4258
}
4359

4460
const frontMatter = {
45-
title: 'Platform Specific Content',
61+
title,
62+
description,
4663
};
4764

4865
// make the Sidebar aware of the current path
4966
setServerContext({rootNode, path: ['platform-redirect']});
5067

5168
return (
5269
<DocPage frontMatter={frontMatter}>
53-
<p>
54-
The page you are looking for is customized for each platform. Select your platform
55-
below and we&apos;ll direct you to the most specific documentation on it.
56-
</p>
70+
<Alert level="info">{platformInfo}</Alert>
5771

5872
<ul>
5973
{platformList.map(p => (

apps/changelog/package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
"@radix-ui/react-icons": "^1.3.0",
2222
"@radix-ui/react-toolbar": "^1.0.4",
2323
"@radix-ui/themes": "^2.0.3",
24-
"@sentry/nextjs": "8.29.0",
24+
"@sentry/nextjs": "8.36.0",
2525
"@spotlightjs/spotlight": "^2.1.1",
26-
"next": "^15.0.0-canary.83",
26+
"next": "15.0.0-rc.1",
2727
"next-auth": "^4.24.5",
2828
"next-mdx-remote": "^4.4.1",
2929
"nextjs-toploader": "^1.6.6",
3030
"nuqs": "^1.17.7",
3131
"prism-sentry": "^1.0.2",
32-
"react": "beta",
33-
"react-dom": "beta",
32+
"react": "19.0.0-rc-cd22717c-20241013",
33+
"react-dom": "19.0.0-rc-cd22717c-20241013",
3434
"react-select": "^5.7.3",
3535
"react-textarea-autosize": "^8.5.3",
3636
"rehype-prism-plus": "^1.6.3",
@@ -44,8 +44,8 @@
4444
"@tailwindcss/forms": "^0.5.7",
4545
"@tailwindcss/typography": "^0.5.10",
4646
"@types/node": "^20",
47-
"@types/react": "^18",
48-
"@types/react-dom": "^18.3.0",
47+
"@types/react": "npm:[email protected]",
48+
"@types/react-dom": "npm:[email protected]",
4949
"@types/rss": "^0.0.32",
5050
"autoprefixer": "^10.4.17",
5151
"dotenv-cli": "^7.4.2",
@@ -58,5 +58,9 @@
5858
},
5959
"volta": {
6060
"extends": "../../package.json"
61+
},
62+
"resolutions": {
63+
"@types/react": "npm:[email protected]",
64+
"@types/react-dom": "npm:[email protected]"
6165
}
6266
}

0 commit comments

Comments
 (0)