Skip to content

Commit

Permalink
feat: Add initial text to the Content Block (#4498)
Browse files Browse the repository at this point in the history
## Description

ref #3994 

## Steps for reproduction

1. click button
2. 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

---------

Co-authored-by: Oleg Isonen <[email protected]>
  • Loading branch information
istarkov and kof authored Dec 5, 2024
1 parent 564efe0 commit 6885b38
Showing 1 changed file with 123 additions and 1 deletion.
124 changes: 123 additions & 1 deletion packages/react-sdk/src/core-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,129 @@ const blockMeta: WsComponentMeta = {
type: "instance",
label: "Templates",
component: blockTemplateComponent,
children: [],
children: [
{
type: "instance",
component: "Paragraph",
children: [
{
type: "text",
value: "Paragraph text you can edit",
placeholder: true,
},
],
},
{
type: "instance",
component: "List",
children: [
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value: "List Item text you can edit",
placeholder: true,
},
],
},
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value: "List Item text you can edit",
placeholder: true,
},
],
},
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value: "List Item text you can edit",
placeholder: true,
},
],
},
],
},
],
},
{
type: "instance",
component: "Paragraph",
children: [
{
type: "text",
value:
"The Content Block component designates regions on the page where pre-styled instances can be inserted in ",
},
{
type: "instance",
component: "RichTextLink",
children: [
{
type: "text",
value: "Content mode",
},
],
props: [
{
type: "string",
name: "href",
value: "https://wstd.us/content-block",
},
],
},
{
type: "text",
value: ".",
},
],
},
{
type: "instance",
component: "List",
children: [
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value:
"In Content mode, you can edit any direct child instances that were pre-added to the Content Block, as well as add new instances predefined in Templates.",
},
],
},
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value:
"To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container.",
},
],
},
{
type: "instance",
component: "ListItem",
children: [
{
type: "text",
value:
"To insert predefined instances in Content mode, click the + button while hovering over the Content Block on the canvas and choose an instance from the list.",
},
],
},
],
},
],
},
Expand Down

0 comments on commit 6885b38

Please sign in to comment.