Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allowing configuring Group child in panel and wizard #200

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 101 additions & 91 deletions component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -2533,116 +2533,126 @@
"collapsible": false,
"fields": [
{
"component": "text",
"name": "name",
"label": "Name",
"valueType": "string",
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
"name": "jcr:title",
"label": "Title",
"valueType": "string"
},
{
"component": "boolean",
"name": "hideTitle",
"label": "Hide title",
"valueType": "boolean"
},
{
"component": "text",
"name": "dataRef",
"label": "Bind reference",
"valueType": "string"
},
{
"component": "boolean",
"name": "unboundFormElement",
"label": "Mark as Unbound Form Element",
"valueType": "boolean"
},
{
"component": "boolean",
"name": "visible",
"label": "Show Component",
"valueType": "boolean",
"value": true
},
{
"component": "boolean",
"name": "enabled",
"label": "Enable Component",
"valueType": "boolean",
"value": true
},
{
"component": "boolean",
"name": "readOnly",
"label": "Read-only",
"valueType": "boolean"
},
{
"component": "select",
"name": "colspan",
"label": "Columns",
"valueType": "string",
"options": [
{
"name": "1 column",
"value": "1"
},
{
"name": "2 column",
"value": "2"
},
{
"name": "3 column",
"value": "3"
},
"fields": [
{
"name": "4 column",
"value": "4"
"component": "text",
"name": "name",
"label": "Name",
"valueType": "string",
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"name": "5 column",
"value": "5"
"component": "text",
"name": "jcr:title",
"label": "Title",
"valueType": "string"
},
{
"name": "6 column",
"value": "6"
"component": "boolean",
"name": "hideTitle",
"label": "Hide title",
"valueType": "boolean"
},
{
"name": "7 column",
"value": "7"
"component": "text",
"name": "dataRef",
"label": "Bind reference",
"valueType": "string"
},
{
"name": "8 column",
"value": "8"
"component": "boolean",
"name": "unboundFormElement",
"label": "Mark as Unbound Form Element",
"valueType": "boolean"
},
{
"name": "9 column",
"value": "9"
"component": "boolean",
"name": "visible",
"label": "Show Component",
"valueType": "boolean",
"value": true
},
{
"name": "10 column",
"value": "10"
"component": "boolean",
"name": "enabled",
"label": "Enable Component",
"valueType": "boolean",
"value": true
},
{
"name": "11 column",
"value": "11"
"component": "boolean",
"name": "readOnly",
"label": "Read-only",
"valueType": "boolean"
},
{
"name": "12 column",
"value": "12"
"component": "select",
"name": "colspan",
"label": "Columns",
"valueType": "string",
"options": [
{
"name": "1 column",
"value": "1"
},
{
"name": "2 column",
"value": "2"
},
{
"name": "3 column",
"value": "3"
},
{
"name": "4 column",
"value": "4"
},
{
"name": "5 column",
"value": "5"
},
{
"name": "6 column",
"value": "6"
},
{
"name": "7 column",
"value": "7"
},
{
"name": "8 column",
"value": "8"
},
{
"name": "9 column",
"value": "9"
},
{
"name": "10 column",
"value": "10"
},
{
"name": "11 column",
"value": "11"
},
{
"name": "12 column",
"value": "12"
}
]
}
]
},
{
"component": "boolean",
"name": "wrapData",
"label": "Group child components' data on form submission",
"valueType": "boolean"
}
]
},
Expand Down
14 changes: 12 additions & 2 deletions models/form-components/_panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@
"name": "basic",
"label": "Basic",
"collapsible": false,
"...": "../form-common/_basic-input-fields.json"
"fields": [
{
"...": "../form-common/_basic-input-fields.json"
},
{
"component": "boolean",
"name": "wrapData",
"label": "Group child components' data on form submission",
"valueType": "boolean"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not repeat the mistake we did in earlier core components and add more fields only when there are enough use cases for it. Adding extra fields make the authoring more complex and property sheet more cluttered that it is already.

}
]
},
{
"component": "container",
Expand Down Expand Up @@ -63,4 +73,4 @@
]
}
]
}
}
Loading