Skip to content

Conversation

@benlife5
Copy link
Contributor

@benlife5 benlife5 commented Nov 4, 2025

  • updates defaultLayoutData
  • merges main again (most significant change: url template functions)
  • adds an additional migration test case

colton-demetriou and others added 30 commits October 1, 2025 14:38
<img width="1221" height="999" alt="Screenshot 2025-10-01 at 1 59 29 PM"
src="https://github.com/user-attachments/assets/80cdc2f4-da2f-413b-ad1d-6ac4ba5263d1"
/>
Confirmed that fonts now load correctly in both the Theme and Layout
Editor and match the live page.

The problem was that the live page used applyTheme but the editor was
only using updateThemeInEditor, so when the font was changed in the
editor, the new styles were applied but the actual font files weren't
loaded, leading to the editor falling back to defaults. The fix was
essentially to just use the applyTheme logic in the editor as well.

Test Site:
https://www.yext.com/s/4259018/yextsites/160744/theme#themeId=font-test-2&pageSetId=font-test-2&locale=en&entityId=1095527849

---------

Co-authored-by: coltondemetriou <coltondemetriou@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
<img width="550" height="332" alt="Screenshot 2025-10-01 at 4 45 11 PM"
src="https://github.com/user-attachments/assets/11927759-652c-49d1-a1b4-85d57ce97bda"
/>

The problem was when the editor first loaded no google fonts were loaded
(only theme-specific fonts), fixed by loading the fonts on initial load.
Verified in local dev that the fonts loaded in the editor on the page
and in the selector.

---------

Co-authored-by: coltondemetriou <coltondemetriou@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
When sending the user's schema to the parent to allow for editing, we
now also send the default schema. A new option in the UI will allow the
user to restore the default schema and clear any edits they've made.

Ran everything locally and logged the payload that was sent to the
front-end, confirming that it included the new defaultValue field.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
https://yexttest.atlassian.net/browse/VULN-40342

Verified that all the fonts still render in editor, dropdown, and live
page


https://www.yext.com/s/4259018/yextsites/160762/theme#themeId=test-vuln-10-2-25&pageSetId=vuln-test&locale=en&entityId=1095527849

---------

Co-authored-by: coltondemetriou <coltondemetriou@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
From Paige's spreadsheet: the color 305af3 (dark blue) was being
displayed with black text.

The issue was that we updated to a better contrast algorithm in the
theme editor but the old algorithm was still being used as a backup in
applyTheme. I think the recent changes to applyTheme changed how those
two values were resolved and the old algorithm was being preferred.

This change fully swaps to the better algorithm and gives saved db
contrast colors precedence over the fallback calculation.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
)

The locator cards should use the base entity's url templates (currently
they are looking at the locator page set's templates which do not
exist). This is a change we already made for directory
Other entity types like "Restaurant" were previously using the basic
fallback schema, but any built-in entity type that is a location should
be considered as such.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
[slack
thread](https://yext.slack.com/archives/C02UVSE7P6W/p1759774392931519)

Works in editor and live page.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
<img width="1840" height="1104" alt="Screenshot 2025-10-09 at 3 58
45 PM"
src="https://github.com/user-attachments/assets/93c2093f-6fa7-4e77-8ffe-0219126267bd"
/>
<img width="1840" height="1104" alt="Screenshot 2025-10-09 at 3 57
48 PM"
src="https://github.com/user-attachments/assets/3f839a20-ce6f-4123-a387-4e2736f50089"
/>

Puck 0.20.2 includes a fix for the "Other" category

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
https://github.com/user-attachments/assets/ab992086-993f-4b6e-9fc9-3dd8c3d76b29

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pages-components has a few css overrides that were being dropped on the
live page in the last artifact

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This fixes the phone number link on the locator and changes the text in
the search input from "Current Location" to the current location itself
when the user searches for locations nearby.

Tested and verified that phone links work as expected and the search
input is populated correctly.
Only if siteDomain is set + exists will this canonical url tag be added
to the head

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
J=WAT-5112
TEST=manual

tested in dev mode & live site


https://github.com/user-attachments/assets/4622d774-4833-4a6f-95fe-8eea2a3c4c2d

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alexis Sanehisa <106991746+asanehisa@users.noreply.github.com>
Co-authored-by: Alexis Sanehisa <asanehisa@yext.com>
Confirmed timezone was passed everywhere else (Hero, LocatorCard,
NearbyLocationCard, DirectoryCard)
The directory meta fields were broken because the default fields are
only populated if `root.props` is undefined and `root.props` was
partially defined in the defaultLayoutData.

This fixed by explicitly adding the title and description fields to the
directory and locator layouts. The field and constantValue are both set
to `""` -- this might change in the future
(https://yext.slack.com/archives/C06A06BCUUF/p1760728433383689?thread_ts=1760724818.768159&cid=C06A06BCUUF)
but we don't have the brand name available right now.
Co-authored-by: coltondemetriou <coltondemetriou@gmail.com>
#826)

Adds a new field type, `DynamicOptionsSelector`. This field type can be
populated with options from a function using hooks, which will allow
e.g. reading off the stream document to determine which set of options
to show.

This PR also uses this type for the `Locator` component's `Dynamic
Fields` (facet fields) setting. The actual implementation of the dynamic
fields in the component will come in a separate change / commit.


J=[WAT-4911](https://yexttest.atlassian.net/browse/WAT-4911?atlOrigin=eyJpIjoiMGEzNzFiYjg1ZDA3NDg1MDliN2ZiZTQwOTdmNTg1ZDQiLCJwIjoiaiJ9)


https://github.com/user-attachments/assets/103a6f27-acf3-4950-a7e7-ab2d536243cc

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Life <blife@yext.com>
We were importing by package instead of by file, so treeshaking was not
happening. The plugin build is now immensely faster and the output size
went from ~8mb to ~8kb.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
J=WAT-5143,WAT-5144
TEST=manual

confirmed it worked in dev mode and live pages

https://drive.google.com/file/d/172DeYAyBHMZcJQbOiFK5qYThSmHPFAti/view?usp=sharing

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This updates the directory schema to be a `CollectionPage` with the
`dm_directoryChildren` as the list elements, adds a new default schema
for locators, and fixes the fallback default schema.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Allows migrations for root.props
- Migrates our current location schemas to set `@id` with the domain and
path
- Migrates directory and locator schemas based on #845

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
For Get Directions previously using Coordinates:
```
if (ref_listings):
   build link with ref_listings
else:
   build link with yextDisplayCoordinate
```
For Get Directions previously using Address:
```
if currentlySelectedAddress is address && ref_listings:
   build link with ref_listings
else 
   build link with Address 
```

Remove static value from Address prop. Don't allow users to select
coordinates to use, always use "yextDisplayCoordinate"

Tested in platform and confirmed setting address field to a diff field
works. Confirmed ref_listings is used if it exists and gives a valid
link. Confirmed fallbacks work as expected.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Automatically add breadcrumbs and reviews schema to entity pages, if the
data is present on the document.

Breadcrumbs and reviews get added as separate blocks. Wraps the whole
schema in `@graph`.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Forgot to migrate the local starter to use data instead of document for
schema

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@benlife5 benlife5 added the create-dev-release Triggers dev release workflow label Nov 4, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 4, 2025

pages-visual-editor-starter

npm i https://pkg.pr.new/yext/visual-editor/@yext/visual-editor@863

commit: a7864a0

mkilpatrick
mkilpatrick previously approved these changes Nov 4, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/visual-editor/src/components/pageSections/heroVariants/HeroContent.tsx (1)

80-84: Responsive CTA styling looks good.

The important modifiers (!) successfully enforce full-width on mobile and fit-content on desktop, which is a standard pattern for CTA buttons.

If the ! modifiers are being added to override competing styles, consider whether the source of the specificity conflict could be addressed to avoid relying on !important. However, this is a pragmatic solution that works well for the immediate need.

packages/visual-editor/src/components/Locator.test.tsx (1)

69-109: Good test coverage for non-default props.

This test case provides valuable coverage for the latest version with customized props (mapStyle and filters). The structure is consistent with existing test patterns.

The document structure (lines 72-100) is nearly identical to lines 35-64 and appears across multiple test cases. Consider extracting common document fixtures into a factory function to improve maintainability:

const createTestDocument = (overrides = {}) => ({
  locale: "en",
  businessId: "4174974",
  __: {
    isPrimaryLocale: true,
  },
  _env: {
    YEXT_PUBLIC_VISUAL_EDITOR_APP_API_KEY: import.meta.env.COMPONENT_TESTS_VISUAL_EDITOR_APP_API_KEY,
    // ... other env vars
  },
  _pageset: JSON.stringify({
    // ... pageset config
  }),
  ...overrides,
});
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f12e651 and a8d7429.

📒 Files selected for processing (4)
  • packages/visual-editor/src/components/Locator.test.tsx (6 hunks)
  • packages/visual-editor/src/components/migrations/0021_set_open_now_default.ts (1 hunks)
  • packages/visual-editor/src/components/migrations/0022_adjust_locator_open_now_schema.ts (1 hunks)
  • packages/visual-editor/src/components/pageSections/heroVariants/HeroContent.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-29T22:00:03.843Z
Learnt from: mkouzel-yext
Repo: yext/visual-editor PR: 833
File: packages/visual-editor/src/components/Locator.tsx:1050-1057
Timestamp: 2025-10-29T22:00:03.843Z
Learning: In packages/visual-editor/src/components/Locator.tsx, the AppliedFilters component is intentionally rendered in two locations (inside the filter modal and outside it) as per the design requirements. This dual rendering should not be flagged as a duplicate issue.

Applied to files:

  • packages/visual-editor/src/components/migrations/0022_adjust_locator_open_now_schema.ts
  • packages/visual-editor/src/components/Locator.test.tsx
🧬 Code graph analysis (1)
packages/visual-editor/src/components/Locator.test.tsx (4)
packages/visual-editor/src/components/Locator.tsx (1)
  • LocatorComponent (542-551)
packages/visual-editor/src/components/index.ts (1)
  • LocatorComponent (14-14)
packages/visual-editor/src/utils/migrate.test.ts (1)
  • migrationRegistry (79-82)
packages/visual-editor/src/components/migrations/migrationRegistry.ts (1)
  • migrationRegistry (49-91)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: call_unit_test / unit_tests (18.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: create-dev-release
  • GitHub Check: semgrep/ci
🔇 Additional comments (6)
packages/visual-editor/src/components/migrations/0022_adjust_locator_open_now_schema.ts (1)

4-4: LGTM! Consistent rename and correct migration logic.

The key rename from LocatorComponent to Locator is consistent with migration 0021. The transformation correctly moves openNowButton from the top level into filters.openNowButton, maintaining the proper migration sequence.

packages/visual-editor/src/components/migrations/0021_set_open_now_default.ts (1)

4-4: LGTM! Migration correctly uses Locator key with proper prop transformation.

Verification confirms the change is correct:

  • File 0021_set_open_now_default.ts properly uses Locator: as the migration identifier (line 4)
  • No references to LocatorComponent exist in migration files, as expected
  • Migration 0022 follows the same Locator: pattern, confirming consistency
  • The openNowopenNowButton transformation with false default is correct
packages/visual-editor/src/components/Locator.test.tsx (4)

28-28: LGTM: Test naming improves clarity.

The explicit "latest version" prefix clearly indicates these tests verify behavior after all migrations are applied, distinguishing them from version-specific test cases.

Also applies to: 34-34


292-296: LGTM: Props align with migration structure.

The addition of filters: { openNowButton: false } correctly reflects the migration that restructured the openNowButton prop, ensuring the default behavior is preserved after version 22 migration.


336-336: LGTM: Tests new facet fields feature.

The addition of facetFields to the version 22 non-default props test case appropriately covers the new facet filtering functionality.


347-347: LGTM: Component registration updated consistently.

The change from implicit to explicit component registration (Locator: LocatorComponent) and the corresponding type reference update (type: "Locator") are consistent. This represents a breaking change in how the component is keyed in the Puck config but aligns with the refactored component structure.

Also applies to: 373-373

mkilpatrick
mkilpatrick previously approved these changes Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-dev-release Triggers dev release workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants