-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix[gen2]: ENG-11229 pass Builder context to custom components #4228
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
base: main
Are you sure you want to change the base?
Conversation
|
|
View your CI Pipeline Execution ↗ for commit e0a49c9
☁️ Nx Cloud last updated this comment at |
… custom components
…arity on Builder context usage
packages/sdks/src/components/block/components/interactive-element.lite.tsx
Show resolved
Hide resolved
…rops for improved context handling
packages/sdks/src/components/block/components/interactive-element.lite.tsx
Show resolved
Hide resolved
…for consistency in Builder context explanation
| get targetWrapperProps() { | ||
| return useTarget({ | ||
| default: props.wrapperProps, | ||
| default: { |
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.
Add tests for this and you might have to skip RSC if the cursor bot is correct.
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.
Added tests for this and also ran those locally (all of them pass).
…t for better structure across multiple frameworks
…d' to 'World' for consistency in component data.
Description
Screenshot
Codebase used for testing (Vue) - https://github.com/SheemaBuilder/Vue-gen2-latest
Custom Component - "Hello World"
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

contextis not passed down to the custom componentsAfter Fix
Note
Ensures custom components receive Builder content context and validates across frameworks.
InteractiveElementwrapper props (targetWrapperProps) and switchesAwaiterto usestate.targetWrapperPropsso async components also receivecontext.builderContent.Hellocomponents in Angular, React, Vue/Nuxt, Svelte/SvelteKit, Qwik, and Solid to readcontext.builderContent.data.titleand registers them in app setups.hello custom-components, and adjusts model fixture (titleWorld) to reflect context-driven rendering.Written by Cursor Bugbot for commit e0a49c9. This will update automatically on new commits. Configure here.