chore: enable AdvancedCoreInfo components for all accounts#1135
chore: enable AdvancedCoreInfo components for all accounts#1135jwartofsky-yext merged 8 commits intomainfrom
Conversation
Removes the gating behind the business_setting vle-advanced-core-info-category This makes every account behave as if this setting were set and enables the following components: Grid Address BodyText CTAGroup CTAWrapper Emails GetDirections HeadingText HoursTable HoursStatus ImageWrapper MapboxStaticMap Phone TextList Text
WalkthroughThis PR removes the Sequence Diagram(s)sequenceDiagram
participant Client
participant MessageReceiver as Message Receiver
participant Registry as Component Registry
participant Renderer as Render Pipeline
Client->>MessageReceiver: send "getTemplateMetadata"(templateId, additionalLayoutComponents, additionalLayoutCategories)
MessageReceiver->>Registry: lookup componentRegistry[templateId]
Registry-->>MessageReceiver: puckConfig (unfiltered)
MessageReceiver-->>Client: return puckConfig
Note over Renderer, Client: Rendering now receives mainConfig directly (no filtering)
Client->>Renderer: Render(config = mainConfig, layoutJson, document)
Renderer-->>Client: rendered output
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
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/docs/hybrid-development.md (1)
259-264:⚠️ Potential issue | 🟡 MinorDoc example still references removed
filteredConfig.After switching
config={mainConfig}(Line 259), the same snippet still callsmigrate(..., filteredConfig)on Line 263. That example will fail if copied as-is.Suggested doc fix
<Render config={mainConfig} data={migrate( JSON.parse(document.__.layout), migrationRegistry, - filteredConfig + mainConfig )} metadata={customMetadata} // added here />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/visual-editor/src/docs/hybrid-development.md` around lines 259 - 264, The docs show a mismatch: component prop config={mainConfig} but the migrate call still passes filteredConfig; update the migrate invocation to use the correct config (e.g., mainConfig or whichever variable replaces filteredConfig) so the example is consistent—locate the snippet using migrate(JSON.parse(document.__.layout), migrationRegistry, filteredConfig) and replace filteredConfig with mainConfig (or the intended config variable) and ensure documentation mentions the single source config variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/visual-editor/src/internal/hooks/useMessageReceivers.ts`:
- Around line 96-100: In the handler inside useMessageReceivers.ts, do not throw
when componentRegistry[payload.templateId] is missing (current puckConfig
branch); instead construct and send an error response using the module's
existing message protocol (the same reply/postMessage path used elsewhere in
this handler) that includes the templateId and an error message, then return
immediately; replace the throw of `Could not find config for template:
templateId=${payload.templateId}` with that error-response-send and a return so
the sender always receives an explicit failure payload.
---
Outside diff comments:
In `@packages/visual-editor/src/docs/hybrid-development.md`:
- Around line 259-264: The docs show a mismatch: component prop
config={mainConfig} but the migrate call still passes filteredConfig; update the
migrate invocation to use the correct config (e.g., mainConfig or whichever
variable replaces filteredConfig) so the example is consistent—locate the
snippet using migrate(JSON.parse(document.__.layout), migrationRegistry,
filteredConfig) and replace filteredConfig with mainConfig (or the intended
config variable) and ensure documentation mentions the single source config
variable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 680e818f-25db-4dc5-8e37-38972669e0d9
📒 Files selected for processing (6)
packages/visual-editor/src/docs/ai/components.d.tspackages/visual-editor/src/docs/hybrid-development.mdpackages/visual-editor/src/internal/hooks/useMessageReceivers.tspackages/visual-editor/src/utils/filterComponents.tspackages/visual-editor/src/utils/index.tspackages/visual-editor/src/vite-plugin/templates/main.tsx
💤 Files with no reviewable changes (2)
- packages/visual-editor/src/utils/index.ts
- packages/visual-editor/src/utils/filterComponents.ts
✅ Files skipped from review due to trivial changes (1)
- packages/visual-editor/src/docs/ai/components.d.ts
Removes the gating behind the business_setting vle-advanced-core-info-category
This makes every account behave as if this setting were set and enables the following components:
Grid
Address
BodyText
CTAGroup
CTAWrapper
Emails
GetDirections
HeadingText
HoursTable
HoursStatus
ImageWrapper
MapboxStaticMap
Phone
TextList
Text