Skip to content

chore: enable AdvancedCoreInfo components for all accounts#1135

Merged
jwartofsky-yext merged 8 commits intomainfrom
enableAdvancedCoreInfoByDefault
Apr 1, 2026
Merged

chore: enable AdvancedCoreInfo components for all accounts#1135
jwartofsky-yext merged 8 commits intomainfrom
enableAdvancedCoreInfoByDefault

Conversation

@jwartofsky-yext
Copy link
Copy Markdown
Contributor

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

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
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

Walkthrough

This PR removes the filterComponentsFromConfig implementation and its test suite, deletes its public re-export, and eliminates all internal usages. Codepaths that previously filtered a Config by gated categories/components now pass the unfiltered mainConfig (e.g., in the vite template and docs example) and directly retrieve puckConfig from the component registry in the getTemplateMetadata message handler. No new public APIs were added.

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
Loading

Possibly related PRs

Suggested reviewers

  • mkilpatrick
  • briantstephan
  • benlife5
  • asanehisa
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: removing the filterComponentsFromConfig function and its gating mechanism to enable advanced core info components for all accounts.
Description check ✅ Passed The description accurately explains the purpose of the changes—removing the gating behind the business_setting and enabling specific components for all accounts—and is directly related to the code deletions in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enableAdvancedCoreInfoByDefault

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 and usage tips.

Comment thread packages/visual-editor/src/utils/filterComponents.ts Outdated
@jwartofsky-yext jwartofsky-yext marked this pull request as ready for review April 1, 2026 18:26
@jwartofsky-yext jwartofsky-yext added the create-dev-release Triggers dev release workflow label Apr 1, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 1, 2026

commit: 2f53c62

Copy link
Copy Markdown
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: 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 | 🟡 Minor

Doc example still references removed filteredConfig.

After switching config={mainConfig} (Line 259), the same snippet still calls migrate(..., 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4306513 and 546a177.

📒 Files selected for processing (6)
  • packages/visual-editor/src/docs/ai/components.d.ts
  • packages/visual-editor/src/docs/hybrid-development.md
  • packages/visual-editor/src/internal/hooks/useMessageReceivers.ts
  • packages/visual-editor/src/utils/filterComponents.ts
  • packages/visual-editor/src/utils/index.ts
  • packages/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

Comment thread packages/visual-editor/src/internal/hooks/useMessageReceivers.ts
Copy link
Copy Markdown
Contributor

@asanehisa asanehisa left a comment

Choose a reason for hiding this comment

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

we'll wanna have a followup item to remove the business setting now that it does nothing (after ppl upgrade to this change i guess)

@jwartofsky-yext jwartofsky-yext merged commit d89baad into main Apr 1, 2026
13 checks passed
@jwartofsky-yext jwartofsky-yext deleted the enableAdvancedCoreInfoByDefault branch April 1, 2026 19:30
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.

3 participants