Skip to content

fix: preserve directory card data - #1284

Merged
jwartofsky-yext merged 3 commits into
mainfrom
fixDirectoryCardProps
Aug 7, 2026
Merged

fix: preserve directory card data#1284
jwartofsky-yext merged 3 commits into
mainfrom
fixDirectoryCardProps

Conversation

@jwartofsky-yext

@jwartofsky-yext jwartofsky-yext commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

In the Directory component, Heading Text Color and some other fields were being dropped.

These fields were:

Directory Card > Heading Text > color
Directory Card > Address > color
Directory Card > Phone > color
Directory Card > Hours Status > timeFormat
Directory Card > Hours Status > bodyVariant

These fields below were explicitly preserved, and the fields above have been updated to the working pattern.

Already preserved:

Heading: level, align

Address: showRegion, showCountry, showGetDirectionsLink, ctaVariant Phone phoneFormat, includePhoneHyperlink, includeIcon

Hours: dayOfWeekFormat, showDayNames, showCurrentStatus, className

You can see the issue here: https://www.yext.com/s/1911914/yextsites/168074/branches/142516/editor#pageSetId=location-pages-directory-city&locale=en&themeId=nordstrom-new-pages&entityId=2079182808

If you change the color prop and refresh the page, the prop were revert back. If you change a preserved prop like alignment, it will be preserved properly.

Tested with local starter and verified that this fix preserves the fields.

The Heading Text Color and some other fields were being dropped.

Directory Card > Heading Text > color
Directory Card > Address > color
Directory Card > Phone > color
Directory Card > Hours Status > timeFormat
Directory Card > Hours Status > bodyVariant

These fields were explicitly preserved before, and the fields above
have been updated to the working pattern.

Heading level, align
Address showRegion, showCountry, showGetDirectionsLink, ctaVariant
Phone phoneFormat, includePhoneHyperlink, includeIcon
Hours dayOfWeekFormat, showDayNames, showCurrentStatus, className
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Warning: Component files have been updated but no migrations have been added. See https://github.com/yext/visual-editor/blob/main/packages/visual-editor/src/components/migrations/README.md for more information.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

defaultDirectoryCardSlotData now preserves existing Heading, Address, Phone, and Hours styles before applying fallback values. Tests verify that configured colors, time formats, and body variants persist when seeded directory cards are re-resolved. Local development data adds four Galaxy Grill locations in Arlington. Footer slot documentation now groups image styling options under a single styles object.

Possibly related PRs

Suggested reviewers: mkilpatrick, briantstephan, benlife5

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: preserving directory card data.
Description check ✅ Passed The description identifies the dropped directory card fields, the preservation pattern, and the verification performed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fixDirectoryCardProps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jwartofsky-yext
jwartofsky-yext marked this pull request as ready for review August 7, 2026 16:52
@jwartofsky-yext
jwartofsky-yext requested review from asanehisa, benlife5, briantstephan, mkilpatrick and nanhu95 and removed request for benlife5 and nanhu95 August 7, 2026 16:52
@jwartofsky-yext
jwartofsky-yext merged commit 7f3bd98 into main Aug 7, 2026
17 checks passed
@jwartofsky-yext
jwartofsky-yext deleted the fixDirectoryCardProps branch August 7, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants