From 9c4b6aff1860a567953050fbf82fbaa6dff184f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Tue, 2 Jun 2026 15:46:42 +0200 Subject: [PATCH] Link cookie policy doc and revamp tracker rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expose the generated cookie policy Document on the CookieBanner GraphQL type through a nullable policyDocument field and resolver, and surface a link to it from the banner configuration header next to the origin and ID. The link is hidden until a banner version is published and the document exists. Rework the tracker table rows: drop the Source column in favour of a tracker Type badge, and move each tracker's description inline beneath its name (and into the add/edit row inputs) instead of a separate Description column. Signed-off-by: Émile Ré --- .../CookieBannerConfigLayout.tsx | 16 +++++- .../display/_components/AddCookieRow.tsx | 20 ++++---- .../display/_components/CategorySection.tsx | 35 ++++++------- .../display/_components/EditCookieRow.tsx | 49 ++++++++++--------- .../api/console/v1/cookie_banner_resolvers.go | 26 ++++++++++ .../console/v1/graphql/cookie_banner.graphql | 2 + .../api/console/v1/types/cookie_banner.go | 8 ++- 7 files changed, 103 insertions(+), 53 deletions(-) diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/CookieBannerConfigLayout.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/CookieBannerConfigLayout.tsx index 40d2e0e49..c33ee8c13 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/CookieBannerConfigLayout.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/CookieBannerConfigLayout.tsx @@ -29,7 +29,7 @@ import { useToast, } from "@probo/ui"; import { type PreloadedQuery, useMutation, usePreloadedQuery } from "react-relay"; -import { Outlet, useParams } from "react-router"; +import { Link, Outlet, useParams } from "react-router"; import { graphql } from "relay-runtime"; import type { CookieBannerConfigLayoutActivateMutation } from "#/__generated__/core/CookieBannerConfigLayoutActivateMutation.graphql"; @@ -52,6 +52,9 @@ export const cookieBannerConfigLayoutQuery = graphql` version state } + policyDocument { + id + } } } } @@ -214,6 +217,17 @@ export default function CookieBannerConfigLayout({ queryRef }: CookieBannerConfi + {banner.policyDocument && ( + <> + · + + {__("Cookie Policy")} + + + )} )} > diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/display/_components/AddCookieRow.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/display/_components/AddCookieRow.tsx index 8343009b6..5730757d7 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/display/_components/AddCookieRow.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/display/_components/AddCookieRow.tsx @@ -58,10 +58,16 @@ export function AddCookieRow({ return ( - +
+ + +
@@ -78,12 +84,6 @@ export function AddCookieRow({ )} /> - - -