-
Notifications
You must be signed in to change notification settings - Fork 0
fix: directory title redirects and props #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: directory title redirects and props #894
Conversation
|
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. |
WalkthroughThis PR adds a Sequence Diagram(s)sequenceDiagram
participant DW as DirectoryWrapper
participant DC as DirectoryCard
participant ML as MaybeLink
participant CTA as CTA
Note over DW: resolveData regenerates cards preserving styles + slots
DW->>DC: defaultDirectoryCardSlotData(id,index,profile,styles, existingSlots)
DC->>DC: Populate slot props from existingSlots when present
DC->>DW: Return DirectoryCardProps with slots populated
DW->>DW: setDeep updates props.slots.CardSlot[i]
Note over DC: Runtime rendering of heading/link
DC->>ML: Render MaybeLink(href, disabled = puck.isEditing)
alt puck.isEditing = true
ML->>CTA: CTA(href, disabled=true)
CTA->>CTA: Render Button (non-interactive) with linkContent
else puck.isEditing = false
ML->>CTA: CTA(href, disabled=false)
CTA->>CTA: Render Link with linkContent (label + caret)
end
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocations.tsx(1 hunks)
packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocations.tsx
Outdated
Show resolved
Hide resolved
commit: |
...omponents/testing/screenshots/CoreInfoSection/[desktop] default props with document data.png
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/visual-editor/src/components/directory/DirectoryCard.tsx (1)
51-121: Preserve existing slot style fields before applying defaults.When
resolveDatarebuilds cards, these new objects replace the entirestylespayload for the HeadingSlot, PhoneSlot, and HoursSlot. Because we don’t spread the existing styles first, any user-defined keys (for example a customstyles.classNameon the PhoneSlot) are wiped the moment the directory re-syncs with stream data. Please merge the previous styles before layering the defaults so we don’t regress saved customizations.Apply this diff:
styles: { + ...existingSlots?.HeadingSlot?.[0]?.props?.styles, level: existingSlots?.HeadingSlot?.[0]?.props?.styles?.level ?? 3, align: existingSlots?.HeadingSlot?.[0]?.props?.styles?.align ?? "left", }, @@ styles: { + ...existingSlots?.PhoneSlot?.[0]?.props?.styles, phoneFormat: existingSlots?.PhoneSlot?.[0]?.props?.styles?.phoneFormat ?? "domestic", includePhoneHyperlink: existingSlots?.PhoneSlot?.[0]?.props?.styles ?.includePhoneHyperlink ?? true, includeIcon: existingSlots?.PhoneSlot?.[0]?.props?.styles?.includeIcon ?? false, }, @@ styles: { + ...existingSlots?.HoursSlot?.[0]?.props?.styles, dayOfWeekFormat: existingSlots?.HoursSlot?.[0]?.props?.styles?.dayOfWeekFormat ?? "long", showDayNames: existingSlots?.HoursSlot?.[0]?.props?.styles?.showDayNames ??
🧹 Nitpick comments (1)
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs (1)
156-177: Optional: Reduce duplication in cssStubPlugin.The conditional logic checking CSS file patterns is duplicated between
resolveIdandloadhooks. Consider extracting to a helper function for maintainability.+const shouldStubCss = (id: string) => + (id.endsWith(".css") || id.endsWith(".scss")) && + !id.endsWith("componentTests.css") && + !id.endsWith("style.css"); + const cssStubPlugin: Plugin = { name: "css-stub", enforce: "pre", resolveId(id) { - if ( - (id.endsWith(".css") || id.endsWith(".scss")) && - !id.endsWith("componentTests.css") && - !id.endsWith("style.css") - ) { + if (shouldStubCss(id)) { return id; } }, load(id) { - if ( - (id.endsWith(".css") || id.endsWith(".scss")) && - !id.endsWith("componentTests.css") && - !id.endsWith("style.css") - ) { + if (shouldStubCss(id)) { return "export default {}"; } }, };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (77)
packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 1 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 1 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 1 props with partial entity values 1.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 1 props with partial entity values 2.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[desktop] version 26 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 1 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 1 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 1 props with partial entity values 1.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 1 props with partial entity values 2.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[mobile] version 26 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 1 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 1 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 1 props with partial entity values 1.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 1 props with partial entity values 2.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/CoreInfoSection/[tablet] version 26 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[desktop] version 14 with cityDocument and default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[desktop] version 18 with cityDocument and siteName field.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 14 with cityDocument and default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 18 with cityDocument and siteName field.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[tablet] version 14 with cityDocument and default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[tablet] version 18 with cityDocument and siteName field.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/EventSection/[desktop] version 25 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/EventSection/[mobile] version 25 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/EventSection/[tablet] version 25 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[desktop] version 18 - atoms used to make a CoreInfoSection.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[desktop] version 19 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[desktop] version 19 - various atoms.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[desktop] version 28 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 18 - atoms used to make a CoreInfoSection.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 19 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 19 - various atoms.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 28 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[tablet] version 18 - atoms used to make a CoreInfoSection.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[tablet] version 19 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[tablet] version 19 - various atoms.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Grid/[tablet] version 28 - various CTAs.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Header/[mobile] default props with document data (after interactions).pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Header/[mobile] version 2 props (after interactions).pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/ProductSection/[desktop] version 31 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/ProductSection/[mobile] version 31 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/ProductSection/[tablet] version 31 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/PromoSection/[desktop] version 29 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/PromoSection/[mobile] version 29 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/PromoSection/[tablet] version 29 props with mixed values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] default props with empty document.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 33 props with constant values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 33 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 7 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[desktop] version 7 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] default props with empty document.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 33 props with constant values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 33 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 7 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[mobile] version 7 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] default props with document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] default props with empty document.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 0 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 0 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 33 props with constant values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 33 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 7 props with constant value.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/TeamSection/[tablet] version 7 props with entity values.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (6)
packages/visual-editor/src/components/atoms/cta.tsx(5 hunks)packages/visual-editor/src/components/atoms/maybeLink.tsx(3 hunks)packages/visual-editor/src/components/directory/DirectoryCard.tsx(6 hunks)packages/visual-editor/src/components/directory/DirectoryWrapper.tsx(1 hunks)packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs(1 hunks)starter/localData/dev-dm-city-stream__en__8932945.json(5 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
packages/visual-editor/src/components/directory/DirectoryWrapper.tsx (1)
packages/visual-editor/src/components/directory/DirectoryCard.tsx (1)
defaultDirectoryCardSlotData(22-136)
packages/visual-editor/src/components/directory/DirectoryCard.tsx (1)
packages/visual-editor/src/components/atoms/maybeLink.tsx (1)
MaybeLink(15-44)
packages/visual-editor/src/components/atoms/cta.tsx (1)
packages/visual-editor/src/components/atoms/button.tsx (1)
Button(89-115)
🔇 Additional comments (1)
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs (1)
68-142: This review comment is incorrect—the referenced .mjs file is not part of this PR.The PR contains only PNG image changes. Neither
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjsnor the sourcevite.config.tsare included in the PR diff. The .mjs file is a temporary Vite build artifact that exists on disk but is not staged or committed. The sourcevite.config.tsis properly maintained and unmodified by this PR.Likely an incorrect or invalid review comment.
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs
Outdated
Show resolved
Hide resolved
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs
Outdated
Show resolved
Hide resolved
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs
Outdated
Show resolved
Hide resolved
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs
Outdated
Show resolved
Hide resolved
...ts/testing/screenshots/Directory/[tablet] version 14 with cityDocument and default props.png
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] default props - country - document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] default props - region - document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] default props - root - document data.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 11 with default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 39 with countryDocument and default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 4 - directory list - default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 4 - directory list - non-default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 7 - directory list - default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 7 - directory list - non-default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 8 - country - default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 8 - directory list - non-default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 8 - region - default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**packages/visual-editor/src/components/testing/screenshots/Directory/[mobile] version 8 - root - default props.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (2)
packages/visual-editor/src/components/atoms/cta.tsx(4 hunks)packages/visual-editor/src/components/directory/DirectoryCard.tsx(5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/visual-editor/src/components/directory/DirectoryCard.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
packages/visual-editor/src/components/atoms/cta.tsx (1)
packages/visual-editor/src/components/atoms/button.tsx (1)
Button(89-115)
🔇 Additional comments (2)
packages/visual-editor/src/components/atoms/cta.tsx (2)
29-29: LGTM! Clean addition of the disabled prop.The
disabledprop is properly typed as optional and defaults tofalse, maintaining backward compatibility.Also applies to: 141-141
159-179: LGTM! Good refactor to eliminate duplication.Extracting the
linkContentinto a shared variable eliminates duplication between the disabled and normal rendering paths while preserving all the original caret visibility logic.
packages/visual-editor/vite.config.ts.timestamp-1762894860199-2804037bc8f35.mjs
Outdated
Show resolved
Hide resolved
891bbf9
into
fall-2025-slot-ify-components
Added functionality so that props are actually saved for directory cards, also added "disabled" link functionality so that you can click on the heading slot without being redirected to the child entity. Lastly, added local dev data to be able to test the directory locally. This should also resolve the 404 issue that was being seen on the redirect since it's no longer a link in the editor (I assume the child being redirected to in the bug bash no longer existed or something).