mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
c585918459e536619e13630dcc1a685b03019201
Closes https://github.com/webstudio-is/webstudio/issues/2966 ## Description Fixes visitor-facing crashes when a text binding resolves to a non-text value, such as an object returned from a resource. Generated expression children now render through `renderText`, which preserves strings and numbers and renders other runtime values as empty text. This prevents React SSR from throwing `Objects are not valid as a React child` when resource data shape changes unexpectedly. ## Changes - Added `renderText(value)` runtime helper. - Wrapped generated expression children with `renderText(...)`. - Updated generated page imports to include `renderText`. - Added rendering tests for resource status/error fields and object-shaped bindings. ## Tests ```bash pnpm --filter @webstudio-is/react-sdk test -- context.test.tsx component-generator.test.tsx pnpm --filter @webstudio-is/react-sdk typecheck pnpm --filter ./packages/cli typecheck
Learning Resources
- Blog
- Documentation
- Brand and Product Design
- Contributing Guide for Devs
- Github Discussions
- Wishlist
- Builder Issues Tracker
- Roadmap
Social Media
Thanks
Thanks to Lost Pixel for providing the visual testing platform that helps us review UI changes and catch visual regressions.
License
- Webstudio core (all functionality in this repository) is free/open-source under AGPL-3.0-or-later.
- sdk-components-animation package (optional) is proprietary. You must accept the Webstudio, Inc. EULA located in sdk-components-animation/LICENSE before using it.
Languages
TypeScript
98.9%
PLpgSQL
0.5%
CSS
0.3%
Shell
0.2%
JavaScript
0.1%
