fix: preserve directory card data - #1284
Conversation
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
|
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. |
Walkthrough
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
auto-screenshot-update: true
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.