mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-03 18:48:06 +09:00
## Description This PR refactors content mode property restrictions to use a declarative, component-based configuration approach. Instead of maintaining hardcoded lists of editable properties in a central location, each component now declares which of its properties should be editable in content mode via the `contentMode: boolean` flag in PropMeta. ### Content Mode Properties Added: | Component | Properties | |-----------|-----------| | Image | src, width, height, alt | | Video | src, width, height | | YouTube | url | | Vimeo | url | | Vimeo Preview Image | src | | Link | href | | Markdown Embed | code | ## Steps for reproduction 1. Create a project and share it with editor-only access 2. Switch to content edit mode 3. Select a YouTube or Vimeo component on the canvas 4. In the Properties panel, the `url` property should now be visible and editable 5. Modify the YouTube/Vimeo URL and verify it updates correctly ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [x] made a self-review - [x] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [x] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file --------- Co-authored-by: shreyanshkotak <sk7739@nyu.edu>
Webstudio SDK Components
Webstudio SDK is a TypeScript API that lets you use your Webstudio project or some components in your custom codebase or just render a complete Remix Document.