From ff5c7a2ba331c37f1f7b24735515d2a7431be2e1 Mon Sep 17 00:00:00 2001 From: Barry Grenon Date: Wed, 20 May 2026 15:06:10 -0300 Subject: [PATCH 1/2] feat: re-enable docs corner overlay for video promotion Reuses the previously-dormant Slack-modal pattern (cleared Oct 2025) to surface new videos to docs readers. First entry promotes the branching explainer (PR #4942) on the docs home. modal.jsx gains optional embedId for thumbnail rendering; data.js gets the registry entry. Co-authored-by: Isaac --- src/components/pages/doc/modal/data.js | 22 +++++++------- src/components/pages/doc/modal/modal.jsx | 38 ++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/src/components/pages/doc/modal/data.js b/src/components/pages/doc/modal/data.js index f130d8c391..477a9bf68e 100644 --- a/src/components/pages/doc/modal/data.js +++ b/src/components/pages/doc/modal/data.js @@ -1,17 +1,17 @@ // pagesToShow - array of page titles and sections where the modal should be shown // 'Neon Docs' - show modal on the introduction page const MODALS = [ - // Example modal configuration: - // { - // id: 'slack', - // pagesToShow: ['Neon Docs'], - // title: 'Manage Neon in Slack', - // description: 'Get alerts, track usage, and manage your team right from Slack', - // link: { - // title: 'Get the Neon App for Slack', - // url: '/docs/manage/slack-app', - // }, - // }, + { + id: 'branching-video', + pagesToShow: ['Neon Docs'], + embedId: 'UuHnFlg66Io', + title: 'New: Branching in 90 seconds', + description: 'See how copy-on-write branches work in practice.', + link: { + title: 'Watch the video', + url: '/docs/introduction/branching', + }, + }, ]; export default MODALS; diff --git a/src/components/pages/doc/modal/modal.jsx b/src/components/pages/doc/modal/modal.jsx index c285d08a48..a7659be623 100644 --- a/src/components/pages/doc/modal/modal.jsx +++ b/src/components/pages/doc/modal/modal.jsx @@ -1,6 +1,7 @@ 'use client'; import { AnimatePresence, LazyMotion, domAnimation, m } from 'framer-motion'; +import Image from 'next/image'; import { PropTypes } from 'prop-types'; import { useState, useEffect } from 'react'; @@ -9,6 +10,7 @@ import useLocalStorage from 'hooks/use-local-storage'; import CloseIcon from 'icons/close-small.inline.svg'; // import SlackIcon from 'icons/docs/modal/slack.inline.svg'; import SupportIcon from 'icons/docs/modal/support.inline.svg'; +import PlayIcon from 'icons/play.inline.svg'; import { cn } from 'utils/cn'; import sendGtagEvent from 'utils/send-gtag-event'; @@ -17,7 +19,7 @@ const icons = { // slack: SlackIcon, }; -const Modal = ({ id, title, description, link }) => { +const Modal = ({ id, title, description, link, embedId }) => { const [closedModals, setClosedModals] = useLocalStorage('closedModals', []); const [isMounted, setIsMounted] = useState(false); @@ -38,7 +40,8 @@ const Modal = ({ id, title, description, link }) => { {isMounted && !isClosed && ( { animate={{ opacity: 1, transition: { delay: 3 } }} exit={{ opacity: 0, transition: { duration: 0.1 } }} > - {Icon && } + {embedId ? ( + { + sendGtagEvent('click_docs_modal_link', { + modal: id, + link: 'thumbnail', + }); + }} + > + + + + + + + + ) : ( + Icon && + )}

{title}

@@ -93,6 +124,7 @@ Modal.propTypes = { title: PropTypes.string.isRequired, url: PropTypes.string.isRequired, }).isRequired, + embedId: PropTypes.string, }; export default Modal; From 9fd3a91ba9d04e33e4e86c397e28ad5b817e0698 Mon Sep 17 00:00:00 2001 From: Barry Grenon Date: Fri, 22 May 2026 14:52:06 -0300 Subject: [PATCH 2/2] docs: align video overlay copy with branching page framing Use the video's own "Git for databases" framing instead of a made-up "90 seconds" claim. Co-authored-by: Isaac --- src/components/pages/doc/modal/data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/pages/doc/modal/data.js b/src/components/pages/doc/modal/data.js index 477a9bf68e..5a97c65f0b 100644 --- a/src/components/pages/doc/modal/data.js +++ b/src/components/pages/doc/modal/data.js @@ -5,8 +5,8 @@ const MODALS = [ id: 'branching-video', pagesToShow: ['Neon Docs'], embedId: 'UuHnFlg66Io', - title: 'New: Branching in 90 seconds', - description: 'See how copy-on-write branches work in practice.', + title: 'Watch: Git for databases', + description: 'See how Neon branching works in practice.', link: { title: 'Watch the video', url: '/docs/introduction/branching',