From 4c6ca49b1739946bb61f31b8b81aad66585d825e Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Tue, 1 Sep 2026 19:15:04 +0200 Subject: [PATCH] fix(gallery): restore the download CTA under headerStyle "none" The report asked whether this was intentional. It is collateral damage from the #386 swap, not intent. There are two header download affordances. GalleryView sets showDownloadAll={false} unconditionally -- "replaced by the new showHeaderDownload (#386)" -- and passes showHeaderDownload={allowDownloads}. GalleryLayout renders HeaderDownloadButton in the standard, minimal and hero branches, but the isNoHeader branch only ever had the now-dead showDownloadAll button. Net effect: zero download CTA on headerStyle 'none'. The comment claiming intent -- "Intentionally NOT shown in the no-header variant where the gallery is fully chromeless by design" -- is factually wrong about its own branch: isNoHeader renders the menu button, headerExtra (upload button, countdown timer) and logout. It is a functional-controls bar, not chromeless. The sentence predates the #386 swap, when showDownloadAll still gave that bar a download button. Renders HeaderDownloadButton in that branch in the same slot order as the other three; it is icon-only below sm, so it fits the compact bar. Removed the two now-false comments. Beta themes are unaffected: gallery-premium and gallery-story return from an earlier branch that never mounts GalleryLayout and get download-all via their own onDownloadEverything prop, so there is no double CTA. Refs testplan REPORT.md, headerStyle:none download-CTA warning. --- .../src/components/gallery/GalleryLayout.tsx | 18 +++- .../GalleryLayout.downloadCta.test.tsx | 97 +++++++++++++++++++ 2 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 frontend/src/components/gallery/__tests__/GalleryLayout.downloadCta.test.tsx diff --git a/frontend/src/components/gallery/GalleryLayout.tsx b/frontend/src/components/gallery/GalleryLayout.tsx index ce92927d..7888a27e 100644 --- a/frontend/src/components/gallery/GalleryLayout.tsx +++ b/frontend/src/components/gallery/GalleryLayout.tsx @@ -506,8 +506,7 @@ export const GalleryLayout: React.FC = ({ )} {/* Accent Download CTA — also rendered in the minimal header so the action stays one click away regardless of header - style. Intentionally NOT shown in the no-header variant - where the gallery is fully chromeless by design. */} + style. */} {showHeaderDownload && onHeaderDownload && ( = ({ {t('gallery.downloadAll')} )} + {/* Accent Download CTA — 'none' suppresses the *title* header, + not the download affordance: this bar still renders the + menu, headerExtra and logout, so leaving the CTA out just + stranded guests with per-tile downloads only (QA P4-B.05). */} + {showHeaderDownload && onHeaderDownload && ( + + )} {showLogout && onLogout && (