From 294f9c814846677edeec1224a9ce7f0fe0d5ad8c Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Thu, 1 Oct 2026 13:15:45 -0400 Subject: [PATCH] OpenConceptLab/ocl_online#299 | Banner: subscription dates (Nov 1 / Dec 1 grace period), "Learn more" and "See pricing" New announcement id, so the banner shows again to everyone who dismissed the preview one. Two links now, the letter and the pricing page, each kept on one line on narrow screens. "See pricing" is a new pricing_label key in en/es/zh; link_label stays "Learn more". Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019j2N6BFoNmA32L2DHKZV41 --- src/common/constants.js | 3 ++- src/components/app/AnnouncementBanner.jsx | 23 +++++++++++++++++------ src/i18n/locales/en/translations.json | 5 +++-- src/i18n/locales/es/translations.json | 5 +++-- src/i18n/locales/zh/translations.json | 5 +++-- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/common/constants.js b/src/common/constants.js index 005a84b2d..2772d306f 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -103,4 +103,5 @@ export const DEFAULT_CASCADE_PARAMS = { export const ALL = '*'; export const URL_REGISTRY_DOC_LINK = 'https://docs.openconceptlab.org/en/latest/oclapi/apireference/urlregistry.html' -export const TBV3_ANNOUNCEMENT_URL = 'https://openconceptlab.org/blog/letter-to-the-ocl-community?utm_source=tbv3&utm_medium=banner&utm_campaign=preview_launch' +export const TBV3_ANNOUNCEMENT_LETTER_URL = 'https://openconceptlab.org/blog/letter-to-the-ocl-community?utm_source=tbv3&utm_medium=banner&utm_campaign=subscription_dates' +export const TBV3_ANNOUNCEMENT_PRICING_URL = 'https://openconceptlab.org/pricing?utm_source=tbv3&utm_medium=banner&utm_campaign=subscription_dates' diff --git a/src/components/app/AnnouncementBanner.jsx b/src/components/app/AnnouncementBanner.jsx index e4d7a3804..e977fdd89 100644 --- a/src/components/app/AnnouncementBanner.jsx +++ b/src/components/app/AnnouncementBanner.jsx @@ -6,14 +6,20 @@ import Link from '@mui/material/Link'; import Typography from '@mui/material/Typography'; import CampaignOutlinedIcon from '@mui/icons-material/CampaignOutlined'; import CloseIcon from '@mui/icons-material/Close'; -import { TBV3_ANNOUNCEMENT_URL } from '../../common/constants'; +import { TBV3_ANNOUNCEMENT_LETTER_URL, TBV3_ANNOUNCEMENT_PRICING_URL } from '../../common/constants'; // OCL Online-wide announcement strip, fixed above the app bar and styled like // the community site's AnnouncementBanner, so it reads as sitting above the // tool rather than inside it. Same component in the Mapper and TBv2. Update // announcement.* in the locale bundles (and bump ANNOUNCEMENT_ID) to re-show a // new announcement to visitors who dismissed a previous one. -const ANNOUNCEMENT_ID = 'tbv3-public-preview-2026-09-v2'; +const ANNOUNCEMENT_ID = 'subscription-dates-2026-10'; + +// Shown in this order after announcement.text, separated by a middle dot. +const ANNOUNCEMENT_LINKS = [ + { labelKey: 'announcement.link_label', href: TBV3_ANNOUNCEMENT_LETTER_URL }, + { labelKey: 'announcement.pricing_label', href: TBV3_ANNOUNCEMENT_PRICING_URL }, +]; const DISMISSED_KEY = 'announcementDismissed'; @@ -95,10 +101,15 @@ const AnnouncementBanner = () => { {t('announcement.title')} - {t('announcement.text')}{' '} - - {t('announcement.link_label')} - + {t('announcement.text')} + {ANNOUNCEMENT_LINKS.map(({ labelKey, href }, i) => ( + + {i ? ' · ' : ' '} + + {t(labelKey)} + + + ))} diff --git a/src/i18n/locales/en/translations.json b/src/i18n/locales/en/translations.json index ec08b2d7e..b695344fb 100644 --- a/src/i18n/locales/en/translations.json +++ b/src/i18n/locales/en/translations.json @@ -1078,9 +1078,10 @@ "clear": "Reset Sort" }, "announcement": { - "title": "Welcome to the public preview of the new OCL TermBrowser v3!", - "text": "Your content is already here, and you can switch back to TBv2 any time.", + "title": "Subscriptions open November 1.", + "text": "Existing accounts using premium features have a grace period until December 1.", "link_label": "Learn more", + "pricing_label": "See pricing", "dismiss": "Dismiss" }, "quota": { diff --git a/src/i18n/locales/es/translations.json b/src/i18n/locales/es/translations.json index 4a0eef83a..1c15541e7 100644 --- a/src/i18n/locales/es/translations.json +++ b/src/i18n/locales/es/translations.json @@ -577,9 +577,10 @@ "clear": "Restablecer orden" }, "announcement": { - "title": "¡Te damos la bienvenida a la vista previa pública del nuevo OCL TermBrowser v3!", - "text": "Tu contenido ya está aquí, y puedes volver a TBv2 en cualquier momento.", + "title": "Las suscripciones abren el 1 de noviembre.", + "text": "Las cuentas existentes que usan funciones premium tienen un periodo de gracia hasta el 1 de diciembre.", "link_label": "Más información", + "pricing_label": "Ver precios", "dismiss": "Descartar" }, "quota": { diff --git a/src/i18n/locales/zh/translations.json b/src/i18n/locales/zh/translations.json index abe4d43b3..5af128717 100644 --- a/src/i18n/locales/zh/translations.json +++ b/src/i18n/locales/zh/translations.json @@ -665,9 +665,10 @@ "view_canonical_url_registry": "查看规范型 URL 注册库" }, "announcement": { - "title": "欢迎体验全新 OCL TermBrowser v3 公开预览版!", - "text": "您的内容已在这里,并可随时切换回 TBv2。", + "title": "订阅将于 11 月 1 日开放。", + "text": "使用高级功能的现有账户可享受宽限期至 12 月 1 日。", "link_label": "了解更多", + "pricing_label": "查看价格", "dismiss": "关闭" }, "quota": {