mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-04 22:31:33 +09:00
## Description ref #4595 ### TODO: - [x] - Found bug that deleting last LI does not delete UL - [x] - Consider removing default texts for paragraph link blockquote and headings i.e. `Heading text you can edit` https://p-cfc5b051-3b7a-4a59-a994-44d8d2f8b836-dot-styles.development.webstudio.is/ The following components are considered non-collapsible in **Edit** and **Content** modes: *Paragraph*, *Heading*, *ListItem*, *Blockquote*, *Link*. We are adding placeholders for these components when they are empty, using the following logic (partially inspired by Notion): 1. **If a component is empty and not being edited**, we display the same label as shown in the components tree.  2. **If a component is empty and being edited**, the behavior depends on its location: - **Inside a content block:** - For *Paragraph*, we display: `Write something or press '/' for commands...`. - For all other components, we display the label. - **Outside a content block:** - Always display the label. <img width="435" alt="image" src="https://github.com/user-attachments/assets/96e0c79c-92dc-40c3-a768-db8322a38c3b" /> ### Update: Default Content Block Component Changed The default content block component has been updated. Add the new component ### PS On Publish and Preview previous behaviour. ## Steps for reproduction 1. click button 4. expect xyz ## 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 - [ ] 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: 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
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.