mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 21:15:18 +09:00
a82825bfe86256f97021d35a8bb1b6f7f3bf64e4
## Description ref #877 As a part of above I'm changing ``` export const ImageValue = z.object({ type: z.literal("image"), value: z.array(z.object({ type: z.literal("asset"), value: ImageAsset })), }); ``` to ``` export const ImageValue = z.object({ type: z.literal("image"), value: z.object({ type: z.literal("asset"), value: ImageAsset }), }); ``` In favour of using in next PRs ``` const ArrayValue = z.object({ type: z.literal("array"), value: z.array(z.union([UnitValue, KeywordValue, UnparsedValue, ImageValue])), }); ``` For now, to not break compatibility with existing code I'm not converting to an array immediately. Just style types simplification. 'array' type is not now supported on db level, parse/serialize will not work. Will be done in following PRs ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @TrySound , I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
Webstudio Builder
Webstudio Builder is a NoCode Visual Tool inspired by Webflow. It is the place where you can build your site or app visually.
Contributing
Don't hesitate to reach out of you have questions around contributing to the project.
Community
Languages
TypeScript
98.9%
PLpgSQL
0.5%
CSS
0.3%
Shell
0.2%
JavaScript
0.1%