From ace2f9aea767dfc2596a4c39684082e2f03ae0a3 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 21 Feb 2024 14:11:54 +0100 Subject: [PATCH 1/5] Revert "fix: Reverse logic to explicitly just check for IS_PRODUCTION (#9191)" This reverts commit c4208c4de3b6f8eb6fc7d9c42d22703064d13915. --- next.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 524d1cb06acac..d3ceda722b220 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,8 @@ const createMDX = require('@next/mdx'); const remarkPrism = require('remark-prism'); +const isProd = process.env.NODE_ENV === 'production' && !process.env.IS_PREVIEW; + /** @type {import('next').NextConfig} */ const nextConfig = { headers() { @@ -11,7 +13,7 @@ const nextConfig = { }, ]; }, - assetPrefix: process.env.IS_PRODUCTION ? 'https://docs.sentry.io' : undefined, + assetPrefix: isProd ? 'https://docs.sentry.io' : undefined, pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], From a5697fd87379b1fe49d3a1fec5374b160a582bf1 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 21 Feb 2024 14:12:15 +0100 Subject: [PATCH 2/5] Revert "Prepare domain switch for Changelog (#9152)" This reverts commit 8bfa5188a50ddd3d121a2942d8ff6a571aa1056c. --- app/changelog/globals.css | 4 ---- app/changelog/header.tsx | 6 ++++-- app/changelog/layout.tsx | 3 +-- next.config.js | 17 ++++------------- src/components/changelog/article.tsx | 15 ++++++++++----- 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/app/changelog/globals.css b/app/changelog/globals.css index cc1d4b8d9e167..5a21f3c3fc908 100644 --- a/app/changelog/globals.css +++ b/app/changelog/globals.css @@ -4,10 +4,6 @@ @tailwind components; @tailwind utilities; - -#changelogcontent { - font-family: var(--font-rubik); -} .radix-themes { --cursor-button: pointer; } diff --git a/app/changelog/header.tsx b/app/changelog/header.tsx index 8c3355bbdb092..6a32238f284eb 100644 --- a/app/changelog/header.tsx +++ b/app/changelog/header.tsx @@ -1,10 +1,12 @@ +import Image from 'next/image'; + export default function Header({loading}) { return (
- -
+
{children}
diff --git a/next.config.js b/next.config.js index d3ceda722b220..b634578a39d33 100644 --- a/next.config.js +++ b/next.config.js @@ -1,20 +1,8 @@ const createMDX = require('@next/mdx'); const remarkPrism = require('remark-prism'); -const isProd = process.env.NODE_ENV === 'production' && !process.env.IS_PREVIEW; - /** @type {import('next').NextConfig} */ const nextConfig = { - headers() { - return [ - { - source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)', - headers: [{key: 'Access-Control-Allow-Origin', value: '*'}], - }, - ]; - }, - assetPrefix: isProd ? 'https://docs.sentry.io' : undefined, - pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], images: { @@ -3157,7 +3145,7 @@ module.exports = withSentryConfig( // Suppresses source map uploading logs during build silent: true, org: 'sentry', - project: 'docs', + project: 'sentry-docs-nextjs', }, { // For all available options, see: @@ -3169,6 +3157,9 @@ module.exports = withSentryConfig( // Transpiles SDK to be compatible with IE11 (increases bundle size) transpileClientSDK: true, + // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) + tunnelRoute: '/monitoring', + // Hides source maps from generated client bundles hideSourceMaps: true, diff --git a/src/components/changelog/article.tsx b/src/components/changelog/article.tsx index d7e023cc267a3..f1918989a651f 100644 --- a/src/components/changelog/article.tsx +++ b/src/components/changelog/article.tsx @@ -1,4 +1,5 @@ import {ReactNode} from 'react'; +import Image from 'next/image'; import Date from './date'; import Tag from './tag'; @@ -30,11 +31,15 @@ export default function Article({ return (
{image && ( - {title} +
+ {title} +
)}

{title}

From ddd2e96321a537aabf2b130c6bb7e35ad76168a3 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 21 Feb 2024 14:13:49 +0100 Subject: [PATCH 3/5] Remove Tunnel --- next.config.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/next.config.js b/next.config.js index b634578a39d33..e992ce0a9aefb 100644 --- a/next.config.js +++ b/next.config.js @@ -3145,7 +3145,7 @@ module.exports = withSentryConfig( // Suppresses source map uploading logs during build silent: true, org: 'sentry', - project: 'sentry-docs-nextjs', + project: 'docs', }, { // For all available options, see: @@ -3157,9 +3157,6 @@ module.exports = withSentryConfig( // Transpiles SDK to be compatible with IE11 (increases bundle size) transpileClientSDK: true, - // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) - tunnelRoute: '/monitoring', - // Hides source maps from generated client bundles hideSourceMaps: true, From 9933e9732053a1f78abaed2e981e20baf091ecb2 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 21 Feb 2024 14:17:35 +0100 Subject: [PATCH 4/5] Fix font --- app/changelog/globals.css | 3 +++ app/changelog/layout.tsx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/changelog/globals.css b/app/changelog/globals.css index 5a21f3c3fc908..d2c8a0b8c2623 100644 --- a/app/changelog/globals.css +++ b/app/changelog/globals.css @@ -4,6 +4,9 @@ @tailwind components; @tailwind utilities; +#changelogcontent { + font-family: var(--font-rubik); +} .radix-themes { --cursor-button: pointer; } diff --git a/app/changelog/layout.tsx b/app/changelog/layout.tsx index 4efff430ef4f6..86122ed98c466 100644 --- a/app/changelog/layout.tsx +++ b/app/changelog/layout.tsx @@ -13,6 +13,7 @@ const rubik = Rubik({ weight: ['400', '500', '700'], style: ['normal', 'italic'], subsets: ['latin'], + variable: '--font-rubik', }); export const metadata: Metadata = { @@ -23,7 +24,7 @@ export default function ChangelogLayout({children}: {children: ReactNode}) { return ( -
+
{children}
From 48a5a28229b6f10907fe76200647d836d87c3a8f Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 21 Feb 2024 14:40:51 +0100 Subject: [PATCH 5/5] Add vercel for toolbar --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 852296460d443..d73a249d2329b 100644 --- a/vercel.json +++ b/vercel.json @@ -17,7 +17,7 @@ }, { "key": "Content-Security-Policy", - "value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com www.googletagmanager.com plausible.io; connect-src 'self' *.sentry.io sentry.io *.algolia.net *.algolianet.com *.algolia.io plausible.io reload.getsentry.net storage.googleapis.com; img-src * 'self' data: www.google.com www.googletagmanager.com; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1267915/security/?sentry_key=ad63ba38287245f2803dc220be959636" + "value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com www.googletagmanager.com plausible.io vercel.live; connect-src 'self' *.sentry.io sentry.io *.algolia.net *.algolianet.com *.algolia.io plausible.io reload.getsentry.net storage.googleapis.com; img-src * 'self' data: www.google.com www.googletagmanager.com; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1267915/security/?sentry_key=ad63ba38287245f2803dc220be959636" }, { "key": "NEL",