PromucFlow_constructor/app/client/cypress/fixtures/newFormDsl.json
ashit-rath 893fd34cdd
perf: Widget re-rendering refactor (#14485)
* initial commit

* props hoc

* changes

* removed ignores and withWidgetProps

* added extra props to canvasStructure

* widget props changes

* list widget changes

* reintroduced widget props hook and other refactors

* remove warnings

* added deepequal for childWidgets selector

* fix global hotkeys and tabs widget jest test

* fix main container test fix

* fixed view mode width

* fix form widget values

* minor fix

* fix skeleton

* form widget validity fix

* jest test fix

* fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering

* minor fix

* minor comments

* reverted commented code

* simplified structure, selective redux state updates and other inconsistencies

* fix junit test cases

* stop form widget from force rendering children

* fix test case

* random commit to re run tests

* update isFormValid prop only if it exists

* detangling circular dependency

* fixing cypress tests

* cleaned up code

* clean up man cnavas props and fix jest cases

* fix rendering order of child widgets for canvas

* fix dropdown reset spec

* adding comments

* cleaning up unwanted code

* fix multiselect widget on deploy

* adressing review comments

* addressing minor review comment changes

* destructuring modal widget child and fix test case

* fix communityIssues cypress spec

* rewrite isVisible logic to match previous behaviour

* merging widget props with component props before checking isVisible

* adressing review comments for modal widget's isVisible

Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 15:40:36 +05:30

385 lines
12 KiB
JSON

{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1254,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindingPathList": [],
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"type": "CONTAINER_WIDGET",
"containerStyle": "card",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 75.25,
"parentRowSpace": 38,
"dynamicBindingPathList": [],
"leftColumn": 0,
"rightColumn": 15,
"topRow": 0,
"bottomRow": 20,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"backgroundColor": "transparent",
"widgetName": "7hf8kkvvgv",
"type": "CANVAS_WIDGET",
"containerStyle": "none",
"isVisible": true,
"isLoading": false,
"parentColumnSpace": 1,
"parentRowSpace": 1,
"leftColumn": 0,
"rightColumn": 1204,
"topRow": 0,
"bottomRow": 532,
"snapColumns": 16,
"orientation": "VERTICAL",
"children": [
{
"widgetName": "Text1",
"rightColumn": 3,
"widgetId": "4d8d2eh4xg",
"dynamicPropertyPathList": [],
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 38,
"isVisible": true,
"type": "TEXT_WIDGET",
"dynamicBindingPathList": [],
"shouldScroll": true,
"parentId": "hjiybwqair",
"isLoading": false,
"parentColumnSpace": 71.75,
"leftColumn": 1,
"text": "Test text",
"textStyle": "HEADING"
},
{
"isVisible": true,
"inputType": "TEXT",
"label": "",
"iconAlign": "left",
"widgetName": "Input1",
"type": "INPUT_WIDGET_V2",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 0,
"rightColumn": 5,
"topRow": 1,
"bottomRow": 2,
"parentId": "e3tq9qwta6",
"widgetId": "i9cuq42zmc"
},
{
"isVisible": true,
"label": "",
"selectionType": "SINGLE_SELECT",
"options": "",
"widgetName": "Dropdown1",
"type": "SELECT_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 10,
"rightColumn": 15,
"topRow": 1,
"bottomRow": 2,
"parentId": "e3tq9qwta6",
"widgetId": "nl5sy9cuaa",
"dynamicBindingPathList": []
},
{
"isRequired": false,
"widgetName": "MultiSelect1",
"widgetId": "zd37fz90fe",
"topRow": 12,
"bottomRow": 16,
"parentRowSpace": 10,
"rightColumn": 15,
"isVisible": true,
"label": "",
"type": "MULTI_SELECT_WIDGET_V2",
"parentId": "zizrooqfps",
"isLoading": false,
"defaultOptionValue": [
{
"label": "Hashirama Senju",
"value": "First"
},
{
"label": "Naruto Uzumaki",
"value": "Seventh"
}
],
"parentColumnSpace": 71.75,
"leftColumn": 10,
"options": [
{
"label": "Hashirama Senju",
"value": "First"
},
{
"label": "Tobirama Senju",
"value": "Second"
},
{
"label": "Hiruzen Sarutobi",
"value": "Third"
},
{
"label": "Minato Namikaze",
"value": "Fourth"
},
{
"label": "Tsunade Senju",
"value": "Fifth"
},
{
"label": "Kakashi Hatake",
"value": "Sixth"
},
{
"label": "Naruto Uzumaki",
"value": "Seventh"
}
],
"placeholderText": "select option(s)",
"isDisabled": false
},
{
"isVisible": true,
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"widgetName": "Button1",
"isDisabled": false,
"isDefaultClickDisabled": true,
"type": "BUTTON_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 1,
"rightColumn": 3,
"topRow": 4,
"bottomRow": 5,
"parentId": "e3tq9qwta6",
"widgetId": "gn6ug210ef",
"dynamicBindingPathList": []
},
{
"isVisible": true,
"label": "Label",
"defaultCheckedState": true,
"widgetName": "Checkbox1",
"type": "CHECKBOX_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 10,
"rightColumn": 13,
"topRow": 4,
"bottomRow": 5,
"parentId": "e3tq9qwta6",
"widgetId": "szjhneuog5"
},
{
"isVisible": true,
"label": "Switch",
"defaultSwitchState": true,
"widgetName": "Switch1",
"type": "SWITCH_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 10,
"rightColumn": 13,
"topRow": 18,
"bottomRow": 19,
"parentId": "e3tq9qwta6",
"widgetId": "szjhneuog9"
},
{
"isVisible": true,
"label": "",
"options": [
{
"label": "Male",
"value": "M"
},
{
"label": "Female",
"value": "F"
}
],
"defaultOptionValue": "1",
"widgetName": "RadioGroup1",
"type": "RADIO_GROUP_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 0,
"rightColumn": 3,
"topRow": 7,
"bottomRow": 9,
"parentId": "e3tq9qwta6",
"widgetId": "nb2usgp3hv"
},
{
"isVisible": true,
"isDisabled": false,
"datePickerType": "DATE_PICKER",
"label": "",
"dateFormat": "DD/MM/YYYY",
"widgetName": "DatePicker1",
"defaultDate": "2020-06-03T12:05:44.699+05:30",
"type": "DATE_PICKER_WIDGET",
"isLoading": false,
"parentColumnSpace": 71.75,
"parentRowSpace": 38,
"leftColumn": 10,
"rightColumn": 15,
"topRow": 7,
"bottomRow": 8,
"parentId": "e3tq9qwta6",
"widgetId": "kyrvcdcm4e",
"dynamicTriggerPathList": [
{
"key": "onDateSelected"
}
],
"onDateSelected": "{{showModal()}}"
},
{
"isVisible": true,
"files": [],
"label": "Select Files",
"widgetName": "FilePicker1",
"isDefaultClickDisabled": true,
"type": "FILE_PICKER_WIDGET",
"isLoading": false,
"parentColumnSpace": 67.1171875,
"parentRowSpace": 38,
"leftColumn": 10,
"rightColumn": 14,
"topRow": 17,
"bottomRow": 18,
"parentId": "e3tq9qwta6",
"widgetId": "ca22py6vlv"
},
{
"isVisible": true,
"defaultText": "",
"isDisabled": false,
"widgetName": "RichTextEditor1",
"isDefaultClickDisabled": true,
"type": "RICH_TEXT_EDITOR_WIDGET",
"isLoading": false,
"parentColumnSpace": 67.1171875,
"parentRowSpace": 38,
"leftColumn": 0,
"rightColumn": 8,
"topRow": 11,
"bottomRow": 16,
"parentId": "e3tq9qwta6",
"widgetId": "2uvezzlkn5",
"dynamicBindingPathList": []
},
{
"isVisible": true,
"options": [
{
"label": "Apple",
"value": "apple"
},
{
"label": "Orange",
"value": "orange"
},
{
"label": "Lemon",
"value": "lemon"
}
],
"defaultSelectedValues": "apple",
"isDisabled": false,
"isRequired": false,
"widgetName": "CheckboxGroup1",
"version": 1,
"type": "CHECKBOX_GROUP_WIDGET",
"isLoading": false,
"parentColumnSpace": 7.852001953124999,
"parentRowSpace": 10,
"leftColumn": 6,
"rightColumn": 18,
"topRow": 9,
"bottomRow": 17,
"parentId": "kipfh779n5",
"widgetId": "zbzrlbiose"
},
{
"widgetName": "SwitchGroup1",
"isCanvas": false,
"displayName": "Switch Group",
"iconSVG": "/static/media/icon.086a7201.svg",
"topRow": 8,
"bottomRow": 14,
"parentRowSpace": 10,
"type": "SWITCH_GROUP_WIDGET",
"hideCard": false,
"parentColumnSpace": 6.6856445312499995,
"leftColumn": 2,
"options": [
{
"label": "Blue",
"value": "BLUE"
},
{
"label": "Green",
"value": "GREEN"
},
{
"label": "Red",
"value": "RED"
}
],
"isDisabled": false,
"key": "vrhzyvir7s",
"isRequired": false,
"rightColumn": 20,
"defaultSelectedValues": "BLUE",
"widgetId": "egtjazr1wh",
"isVisible": true,
"version": 1,
"parentId": "xbbqrz2ncf",
"renderMode": "CANVAS",
"isLoading": false,
"isInline": true
}
],
"widgetId": "e3tq9qwta6",
"detachFromLayout": true,
"canExtend": false
}
],
"widgetId": "jaftzrmtin"
}
]
}
}