Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4b79e25
zone
asanehisa Apr 13, 2026
bb1b3fa
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
2d02040
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
c389a24
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
58beea5
update
asanehisa Apr 13, 2026
97c8faa
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
228f25c
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
0535e73
add comment
asanehisa Apr 13, 2026
6d2a595
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
2fe0d8e
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
d374fa3
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
b4569b7
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
9714ec2
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
05d48d7
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
cf0431f
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
009d371
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
ff60a8f
move
asanehisa Apr 13, 2026
5f06017
mend
asanehisa Apr 13, 2026
6ab502f
add comment
asanehisa Apr 13, 2026
0d733a7
Merge branch 'main' into zones
asanehisa Apr 13, 2026
a793ddb
Update component screenshots for visual-editor
github-actions[bot] Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/visual-editor/src/components/Locator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { LocatorComponent } from "./Locator.tsx";
import { Render, Config, resolveAllData } from "@puckeditor/core";
import { page } from "@vitest/browser/context";
import { backgroundColors } from "../utils/themeConfigOptions.ts";
import { MainContent } from "./structure/MainContent.tsx";

vi.mock("@yext/search-ui-react", async () => {
const actual = await vi.importActual<typeof import("@yext/search-ui-react")>(
Expand Down Expand Up @@ -1141,7 +1142,7 @@ const screenshotThreshold = 30;

describe("Locator", async () => {
const puckConfig: Config = {
components: { Locator: LocatorComponent },
components: { Locator: LocatorComponent, MainContent },
root: {
render: ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
27 changes: 20 additions & 7 deletions packages/visual-editor/src/components/configs/directoryConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,30 @@ import {
} from "../categories/SlotsCategory.tsx";
import { resolveDirectoryRootProps } from "../../utils/getPageMetadata.ts";
import { pt } from "../../utils/i18n/platform.ts";
import { MainContent, MainContentProps } from "../structure/MainContent.tsx";
import { rootAllowedComponents } from "./rootAllowedComponents.ts";

export interface DirectoryConfigProps
extends DirectoryCategoryProps,
SlotsCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps {
BannerSection: BannerSectionProps;
MainContent: MainContentProps;
}

const components: Config<DirectoryConfigProps>["components"] = {
...DirectoryCategoryComponents,
...SlotsCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
BannerSection,
MainContent,
};

// The config used for all levels of directory pages
export const directoryConfig: Config<DirectoryConfigProps> = {
components: {
...DirectoryCategoryComponents,
...SlotsCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
BannerSection,
},
components,
categories: {
pageSections: {
title: pt("categories.standardSections", "Standard Sections"),
Expand All @@ -49,6 +55,10 @@ export const directoryConfig: Config<DirectoryConfigProps> = {
components: SlotsCategory,
visible: false,
},
structure: {
components: ["MainContent"],
visible: false,
},
// deprecated components are hidden in the sidebar but still render if used in the page
deprecatedComponents: {
visible: false,
Expand Down Expand Up @@ -78,6 +88,9 @@ export const directoryConfig: Config<DirectoryConfigProps> = {
flexDirection: "column",
minHeight: "100vh",
}}
disallow={Object.keys(components).filter(
(componentName) => !rootAllowedComponents.includes(componentName)
)}
/>
);
},
Expand Down
27 changes: 20 additions & 7 deletions packages/visual-editor/src/components/configs/locatorConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,30 @@ import {
SlotsCategoryProps,
} from "../categories/SlotsCategory.tsx";
import { pt } from "../../utils/i18n/platform.ts";
import { MainContent, MainContentProps } from "../structure/MainContent.tsx";
import { rootAllowedComponents } from "./rootAllowedComponents.ts";

export interface LocatorConfigProps
extends LocatorCategoryProps,
SlotsCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps {
BannerSection: BannerSectionProps;
MainContent: MainContentProps;
}

const components: Config<LocatorConfigProps>["components"] = {
...LocatorCategoryComponents,
...SlotsCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
BannerSection,
MainContent,
};

// The config used for the locator
export const locatorConfig: Config<LocatorConfigProps> = {
components: {
...LocatorCategoryComponents,
...SlotsCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
BannerSection,
},
components,
categories: {
pageSections: {
title: pt("categories.standardSections", "Standard Sections"),
Expand All @@ -48,6 +54,10 @@ export const locatorConfig: Config<LocatorConfigProps> = {
components: SlotsCategory,
visible: false,
},
structure: {
components: ["MainContent"],
visible: false,
},
// deprecated components are hidden in the sidebar but still render if used in the page
deprecatedComponents: {
visible: false,
Expand All @@ -67,6 +77,9 @@ export const locatorConfig: Config<LocatorConfigProps> = {
flexDirection: "column",
minHeight: "100vh",
}}
disallow={Object.keys(components).filter(
(componentName) => !rootAllowedComponents.includes(componentName)
)}
/>
);
},
Expand Down
15 changes: 13 additions & 2 deletions packages/visual-editor/src/components/configs/mainConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,25 @@ import {
SlotsCategoryComponents,
SlotsCategoryProps,
} from "../categories/SlotsCategory.tsx";
import { MainContent, MainContentProps } from "../structure/MainContent.tsx";
import { rootAllowedComponents } from "./rootAllowedComponents.ts";

export interface MainConfigProps
extends PageSectionCategoryProps,
DeprecatedCategoryProps,
OtherCategoryProps,
AdvancedCoreInfoCategoryProps,
SlotsCategoryProps {}
SlotsCategoryProps {
MainContent: MainContentProps;
}

const components: Config<MainConfigProps>["components"] = {
...PageSectionCategoryComponents,
...DeprecatedCategoryComponents,
...OtherCategoryComponents,
...AdvancedCoreInfoCategoryComponents,
...SlotsCategoryComponents,
MainContent,
};

// The config used for base entities (locations, financial professionals, etc.)
Expand All @@ -61,6 +66,10 @@ export const mainConfig: Config<MainConfigProps> = {
components: SlotsCategory,
visible: false,
},
structure: {
components: ["MainContent"],
visible: false,
},
// deprecated components are hidden in the sidebar but still render if used in the page
deprecatedComponents: {
visible: false,
Expand All @@ -77,7 +86,9 @@ export const mainConfig: Config<MainConfigProps> = {
flexDirection: "column",
minHeight: "100vh",
}}
disallow={AdvancedCoreInfoCategory.filter((k) => k !== "Grid")}
disallow={Object.keys(components).filter(
(componentName) => !rootAllowedComponents.includes(componentName)
)}
/>
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const rootAllowedComponents = [
"ExpandedHeader",
"ExpandedFooter",
"Header",
"Footer",
"MainContent",
"CustomCodeSection",
];
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { migrationRegistry } from "../migrations/migrationRegistry.ts";
import { VisualEditorProvider } from "../../utils/VisualEditorProvider.tsx";
import { Render, Config } from "@puckeditor/core";
import { page } from "@vitest/browser/context";
import { MainContent } from "../structure/MainContent.tsx";

const tests: ComponentTest[] = [
{
Expand Down Expand Up @@ -149,7 +150,7 @@ const tests: ComponentTest[] = [

describe("CustomCodeSection", async () => {
const puckConfig: Config = {
components: { CustomCodeSection },
components: { CustomCodeSection, MainContent },
root: {
render: ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { SlotsCategoryComponents } from "../categories/SlotsCategory.tsx";
import { VisualEditorProvider } from "../../utils/VisualEditorProvider.tsx";
import { Render, Config, resolveAllData } from "@puckeditor/core";
import { page } from "@vitest/browser/context";
import { MainContent } from "../structure/MainContent.tsx";

const rootDocument = {
locale: "en",
Expand Down Expand Up @@ -653,7 +654,7 @@ const tests: ComponentTest[] = [

describe("Directory", async () => {
const puckConfig: Config = {
components: { Directory, ...SlotsCategoryComponents },
components: { Directory, MainContent, ...SlotsCategoryComponents },
root: {
render: ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { SlotsCategoryComponents } from "../categories/SlotsCategory.tsx";
import { Render, Config } from "@puckeditor/core";
import { page } from "@vitest/browser/context";
import { ExpandedFooter, validPatterns } from "./ExpandedFooter.tsx";
import { MainContent } from "../structure/MainContent.tsx";

const testLogoUrl: string = "https://placehold.co/100";

Expand Down Expand Up @@ -2456,7 +2457,7 @@ const socialLinkTestCases = [

describe("ExpandedFooter", async () => {
const puckConfig: Config = {
components: { ExpandedFooter, ...SlotsCategoryComponents },
components: { ExpandedFooter, MainContent, ...SlotsCategoryComponents },
root: {
render: ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { VisualEditorProvider } from "../../utils/VisualEditorProvider.tsx";
import { Render, Config, resolveAllData } from "@puckeditor/core";
import { page, type BrowserPage } from "@vitest/browser/context";
import { defaultBannerProps } from "../pageSections/Banner.tsx";
import { MainContent } from "../structure/MainContent.tsx";

const clickMenuIfVisible = async (page: BrowserPage) => {
const menuButton = page.getByLabelText("Open menu");
Expand Down Expand Up @@ -2632,7 +2633,12 @@ const screenshotThreshold = 45;

describe("ExpandedHeader", async () => {
const puckConfig: Config = {
components: { ExpandedHeader, BannerSection, ...SlotsCategoryComponents },
components: {
ExpandedHeader,
BannerSection,
MainContent,
...SlotsCategoryComponents,
},
root: {
render: ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const ExpandedHeaderWrapper: PuckComponent<ExpandedHeaderProps> = ({
}) => {
return (
<ExpandedHeaderMenuProvider>
<div className={headerWrapper({ position: styles.headerPosition })}>
<header className={headerWrapper({ position: styles.headerPosition })}>
{/* Secondary Header (Top Bar) */}
<div className="hidden md:flex">
<slots.SecondaryHeaderSlot
Expand All @@ -119,7 +119,7 @@ const ExpandedHeaderWrapper: PuckComponent<ExpandedHeaderProps> = ({
<slots.PrimaryHeaderSlot
style={{ height: "auto", position: "relative" }}
/>
</div>
</header>
</ExpandedHeaderMenuProvider>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
transformTests,
} from "../testing/componentTests.setup.ts";
import { AdvancedCoreInfoCategoryComponents } from "../categories/AdvancedCoreInfoCategory.tsx";
import { MainContent } from "../structure/MainContent.tsx";

const testAddress = {
city: "Brooklyn",
Expand Down Expand Up @@ -2144,7 +2145,7 @@ const tests: ComponentTest[] = [

describe("Grid", async () => {
const puckConfig: Config = {
components: AdvancedCoreInfoCategoryComponents,
components: { ...AdvancedCoreInfoCategoryComponents, MainContent },
Comment thread
asanehisa marked this conversation as resolved.
root: {
render: ({ children }: { children: React.ReactNode }) => <>{children}</>,
},
Expand Down
Loading
Loading