Skip to content

Conversation

@floating-dynamo
Copy link
Contributor

@floating-dynamo floating-dynamo commented Jan 12, 2026

Description

  • Fixes custom components unable to access Builder content data (e.g., custom fields).
  • Adds context prop containing builderContent to all custom components.
  • Enables documented API: context.builderContent.data.* in custom component templates.
  • Fix async-loaded components (Awaiter) to use targetWrapperProps instead of wrapperProps so they also receive the Builder context.
  • Reference - https://builder-io.atlassian.net/browse/ENG-11229

Screenshot
Codebase used for testing (Vue) - https://github.com/SheemaBuilder/Vue-gen2-latest

Custom Component - "Hello World"

image

Before Fix

When the "Hello World" component is added and we try to load the content page, we get the following errors in the console as the context is not passed down to the custom components
image

After Fix

image

Note

Ensures custom components receive Builder content context and validates across frameworks.

  • Injects Builder context into InteractiveElement wrapper props (targetWrapperProps) and switches Awaiter to use state.targetWrapperProps so async components also receive context.builderContent.
  • Adds/updates Hello components in Angular, React, Vue/Nuxt, Svelte/SvelteKit, Qwik, and Solid to read context.builderContent.data.title and registers them in app setups.
  • E2E: expands supported SDKs, updates assertion to verify hello custom-components, and adjusts model fixture (title World) to reflect context-driven rendering.

Written by Cursor Bugbot for commit e0a49c9. This will update automatically on new commits. Configure here.

@floating-dynamo floating-dynamo self-assigned this Jan 12, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

⚠️ No Changeset found

Latest commit: e0a49c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Jan 12, 2026

View your CI Pipeline Execution ↗ for commit e0a49c9

Command Status Duration Result
nx test @builder.io/sdks ✅ Succeeded 12s View ↗
nx typecheck @builder.io/sdks ✅ Succeeded 5s View ↗
nx build @builder.io/sdk ✅ Succeeded <1s View ↗
nx test @builder.io/sdk ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-13 15:28:30 UTC

@floating-dynamo floating-dynamo changed the title fix[gen2][vue]: Pass Builder context to custom components fix[gen2]=: Pass Builder context to custom components Jan 12, 2026
@floating-dynamo floating-dynamo changed the title fix[gen2]=: Pass Builder context to custom components fix[gen2]: ENG-11229 pass Builder context to custom components Jan 12, 2026
@floating-dynamo floating-dynamo requested review from a team and sanyamkamat and removed request for a team January 12, 2026 06:44
@floating-dynamo floating-dynamo marked this pull request as ready for review January 12, 2026 06:44
…for consistency in Builder context explanation
get targetWrapperProps() {
return useTarget({
default: props.wrapperProps,
default: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add tests for this and you might have to skip RSC if the cursor bot is correct.

Copy link
Contributor Author

@floating-dynamo floating-dynamo Jan 13, 2026

Choose a reason for hiding this comment

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

Added tests for this and also ran those locally (all of them pass).

…d' to 'World' for consistency in component data.
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.

3 participants