From bab129dfd48f4a092fc67b4dcbbdc052e02fc8a6 Mon Sep 17 00:00:00 2001 From: Shane Date: Fri, 10 Jul 2026 14:59:59 -0500 Subject: [PATCH] Reorganize editor: full-width Format selector, Layout moves to a canvas carousel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Format was a small pill row buried alongside Brand — promoted it to full-width stacked rows (label + dimensions) since it's the decision that determines everything downstream (canvas size, available templates, content rules). Layout picker moves out of the sidebar entirely into a horizontally scrollable thumbnail carousel floating above the bottom toolbar, so browsing layouts feels like flipping through visual samples instead of scanning a static sidebar grid. Still uses the existing CSS-diagram LayoutThumb visuals for now — swapping in real rendered examples is a deferred polish pass, not blocking this reorg. Sidebar now reads Brand -> Format -> Content, with Content's fields already gated on a layout being selected (showContentControls), so the flow reads as sequential steps rather than three parallel groups. Co-Authored-By: Claude Sonnet 5 --- apps/og-generator/app/page.tsx | 116 ++++++++++++++++----------------- 1 file changed, 56 insertions(+), 60 deletions(-) diff --git a/apps/og-generator/app/page.tsx b/apps/og-generator/app/page.tsx index add2d926755..f299ed5cfe2 100644 --- a/apps/og-generator/app/page.tsx +++ b/apps/og-generator/app/page.tsx @@ -447,17 +447,6 @@ export default function Page() { // of the standard 4 templates. const activeTemplates = formatId === 'newsletter' ? NEWSLETTER_TEMPLATES : formatId === 'twitter' ? SOCIAL_TEMPLATES : TEMPLATES - // Grouped by category (in first-seen order) so the Layout picker scales as - // more templates get added, instead of one ever-growing flat grid. - const templateGroups = useMemo(() => { - const groups: { category: string; templates: typeof activeTemplates }[] = [] - for (const t of activeTemplates) { - const group = groups.find((g) => g.category === t.category) - if (group) group.templates.push(t) - else groups.push({ category: t.category, templates: [t] }) - } - return groups - }, [activeTemplates]) const [view, setView] = useState('og') const [headline, setHeadline] = useState('Postgres full text search just got faster') @@ -824,10 +813,39 @@ export default function Page() { {/* Floating guides / view-in-context / zoom toolbar — bottom-aligned, centered on the same content box as the View toggle above, and - likewise anchored outside main's scroll container. One bar instead - of two so the canvas doesn't have controls floating on both - corners. */} -
+ likewise anchored outside main's scroll container. Stacked in a + column with the Layout carousel (when applicable) so the canvas + only ever has controls floating on the bottom edge, not scattered + across corners. */} +
+ {showContentControls && inContext === 'none' && ( +
+ {activeTemplates.map((t) => ( + + ))} +
+ )}
+ ) + })} +
- {showContentControls && ( - -
- {templateGroups.map((g) => ( -
- {templateGroups.length > 1 && ( - {g.category} - )} -
- {g.templates.map((t) => ( - - ))} -
-
- ))} -
-
- )} - {showContentControls && showEyebrowControl && (