From 36ddbc44356c002742a93a07ea0d6c0d30988d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Thu, 8 Jan 2026 15:05:43 +0000 Subject: [PATCH] Merged in chore/add-release-version-meta-tag (pull request #3399) Add release version meta tag + preview environment * include release version in meta tag do polyfills in one place * fix: add preview as a named sentry environment Approved-by: Linus Flood --- apps/partner-sas/app/layout.tsx | 4 ++++ apps/scandic-web/app/[lang]/(live)/layout.tsx | 1 - apps/scandic-web/app/[lang]/(no-layout)/layout.tsx | 1 - apps/scandic-web/app/[lang]/(partner)/layout.tsx | 1 - apps/scandic-web/app/[lang]/webview/layout.tsx | 1 - apps/scandic-web/app/layout.tsx | 7 +++++++ .../components/EnvironmentWatermark/index.tsx | 9 ++++++++- 7 files changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/partner-sas/app/layout.tsx b/apps/partner-sas/app/layout.tsx index 26485055f..610ee4449 100644 --- a/apps/partner-sas/app/layout.tsx +++ b/apps/partner-sas/app/layout.tsx @@ -1,5 +1,6 @@ import "@scandic-hotels/common/polyfills" +import { env } from "@/env/server" import { configureTrpc } from "@/lib/trpc" import { getTitlePrefix } from "@/util/metadata/getTitlePrfiex" @@ -18,6 +19,9 @@ export async function generateMetadata(): Promise { ]), default: combineSegments([getTitlePrefix(), "SAS by Scandic Hotels"]), }, + other: { + "x-release": env.RELEASE_TAG || "-", + }, } } diff --git a/apps/scandic-web/app/[lang]/(live)/layout.tsx b/apps/scandic-web/app/[lang]/(live)/layout.tsx index 48ae4d6bc..ee225425d 100644 --- a/apps/scandic-web/app/[lang]/(live)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(live)/layout.tsx @@ -3,7 +3,6 @@ import "@scandic-hotels/design-system/normalize.css" import "@/app/globals.css" import "@scandic-hotels/design-system/design-system-new-deprecated.css" import "@scandic-hotels/design-system/style.css" -import "@scandic-hotels/common/polyfills" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import Script from "next/script" diff --git a/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx b/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx index 3e97721d6..b84ab4b64 100644 --- a/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(no-layout)/layout.tsx @@ -3,7 +3,6 @@ import "@scandic-hotels/design-system/normalize.css" import "@/app/globals.css" import "@scandic-hotels/design-system/design-system-new-deprecated.css" import "@scandic-hotels/design-system/style.css" -import "@scandic-hotels/common/polyfills" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import Script from "next/script" diff --git a/apps/scandic-web/app/[lang]/(partner)/layout.tsx b/apps/scandic-web/app/[lang]/(partner)/layout.tsx index cfbae2a5a..85b1571d9 100644 --- a/apps/scandic-web/app/[lang]/(partner)/layout.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/layout.tsx @@ -3,7 +3,6 @@ import "@scandic-hotels/design-system/normalize.css" import "@/app/globals.css" import "@scandic-hotels/design-system/design-system-new-deprecated.css" import "@scandic-hotels/design-system/style.css" -import "@scandic-hotels/common/polyfills" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import Script from "next/script" diff --git a/apps/scandic-web/app/[lang]/webview/layout.tsx b/apps/scandic-web/app/[lang]/webview/layout.tsx index a2e1f53a5..e877070d8 100644 --- a/apps/scandic-web/app/[lang]/webview/layout.tsx +++ b/apps/scandic-web/app/[lang]/webview/layout.tsx @@ -3,7 +3,6 @@ import "@scandic-hotels/design-system/normalize.css" import "@/app/globals.css" import "@scandic-hotels/design-system/style.css" import "@scandic-hotels/design-system/design-system-new-deprecated.css" -import "@scandic-hotels/common/polyfills" import Script from "next/script" import { SessionProvider } from "next-auth/react" diff --git a/apps/scandic-web/app/layout.tsx b/apps/scandic-web/app/layout.tsx index 3897ac07f..e1b2bf15e 100644 --- a/apps/scandic-web/app/layout.tsx +++ b/apps/scandic-web/app/layout.tsx @@ -1,3 +1,7 @@ +import "@scandic-hotels/common/polyfills" + +import { env } from "@/env/server" + import { getTitlePrefix } from "@/utils/metadata/title/getTitlePrefix" import type { Metadata } from "next" @@ -8,6 +12,9 @@ export async function generateMetadata(): Promise { template: combineSegments([getTitlePrefix(), "%s", "Scandic Hotels"]), default: combineSegments([getTitlePrefix(), "Scandic Hotels"]), }, + other: { + "x-release": env.RELEASE_TAG || "-", + }, } } diff --git a/apps/scandic-web/components/EnvironmentWatermark/index.tsx b/apps/scandic-web/components/EnvironmentWatermark/index.tsx index b773a007b..e2c245584 100644 --- a/apps/scandic-web/components/EnvironmentWatermark/index.tsx +++ b/apps/scandic-web/components/EnvironmentWatermark/index.tsx @@ -12,11 +12,18 @@ const variants = cva(styles.environmentWatermark, { "pre-prod": styles.preprod, stage: styles.stage, test: styles.test, + preview: styles.test, development: styles.development, }, }, }) -const namedEnvironments = ["pre-prod", "stage", "test", "development"] as const +const namedEnvironments = [ + "development", + "pre-prod", + "preview", + "stage", + "test", +] as const export function EnvironmentWatermark() { if (