## Description This change is a refactor of widget selection logic. It consolidates all the business logic to make it easy to maintain. It also improves the performance a bit. It touched a lot of features as we heavily rely on this ``` Select one Select multiple with drag Select multiple with shift Select multiple with cmd/ctrl Selections should be on the same level of hierarchy Unselect all by clicking on the canvas Unselect all by pressing esc Select all with cmd + a Paste in main container Paste in another container Undo Redo Modal Selection Modal child selection Context switching cmd click snipping mode new widget suggestion onboarding ``` > Refactor widget selection logic Fixes #19570 ## Type of change - Refactor ## How Has This Been Tested? All existing tests should pass ### Test Plan > Add Testsmith test cases links that relate to this PR ### Issues raised during DP testing https://github.com/appsmithorg/appsmith/pull/19643#issuecomment-1383570810 https://github.com/appsmithorg/appsmith/pull/19643#issuecomment-1383607820 https://github.com/appsmithorg/appsmith/pull/19643#issuecomment-1385095478 [Bug bash issues](https://www.notion.so/appsmith/610aa302f3e146a7b090b7dc6bc63ef9?v=0d277a9b07bf4aac9d717bcaf138c33a) ## Checklist: ### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test
143 lines
4.3 KiB
JSON
143 lines
4.3 KiB
JSON
{
|
|
"dsl": {
|
|
"widgetName": "MainContainer",
|
|
"backgroundColor": "none",
|
|
"rightColumn": 1224,
|
|
"snapColumns": 16,
|
|
"detachFromLayout": true,
|
|
"widgetId": "0",
|
|
"topRow": 0,
|
|
"bottomRow": 1280,
|
|
"containerStyle": "none",
|
|
"snapRows": 33,
|
|
"parentRowSpace": 1,
|
|
"type": "CANVAS_WIDGET",
|
|
"canExtend": true,
|
|
"dynamicBindingPathList": [],
|
|
"version": 6,
|
|
"minHeight": 1292,
|
|
"parentColumnSpace": 1,
|
|
"leftColumn": 0,
|
|
"children": [
|
|
{
|
|
"isVisible": true,
|
|
"widgetName": "Form1",
|
|
"backgroundColor": "white",
|
|
"children": [
|
|
{
|
|
"isVisible": true,
|
|
"widgetName": "Canvas1",
|
|
"containerStyle": "none",
|
|
"canExtend": false,
|
|
"detachFromLayout": true,
|
|
"children": [
|
|
{
|
|
"isVisible": true,
|
|
"text": "Form",
|
|
"textStyle": "HEADING",
|
|
"textAlign": "LEFT",
|
|
"widgetName": "Text1",
|
|
"type": "TEXT_WIDGET",
|
|
"isLoading": false,
|
|
"leftColumn": 0,
|
|
"rightColumn": 12,
|
|
"topRow": 0,
|
|
"bottomRow": 1,
|
|
"parentId": "sidaue1kdu",
|
|
"widgetId": "ac6cc8wmlu"
|
|
},
|
|
{
|
|
"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": "sidaue1kdu",
|
|
"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": "sidaue1kdu",
|
|
"widgetId": "szjhneuog9"
|
|
},
|
|
{
|
|
"isVisible": true,
|
|
"widgetName": "FormButton1",
|
|
"text": "Submit",
|
|
"isDefaultClickDisabled": true,
|
|
"buttonStyle": "PRIMARY_BUTTON",
|
|
"disabledWhenInvalid": true,
|
|
"resetFormOnClick": true,
|
|
"type": "FORM_BUTTON_WIDGET",
|
|
"isLoading": false,
|
|
"leftColumn": 12,
|
|
"rightColumn": 16,
|
|
"topRow": 11,
|
|
"bottomRow": 12,
|
|
"parentId": "sidaue1kdu",
|
|
"widgetId": "xyn7t20lhv"
|
|
},
|
|
{
|
|
"isVisible": true,
|
|
"widgetName": "FormButton2",
|
|
"text": "Reset",
|
|
"isDefaultClickDisabled": true,
|
|
"buttonStyle": "SECONDARY_BUTTON",
|
|
"disabledWhenInvalid": false,
|
|
"resetFormOnClick": true,
|
|
"type": "FORM_BUTTON_WIDGET",
|
|
"isLoading": false,
|
|
"leftColumn": 8,
|
|
"rightColumn": 12,
|
|
"topRow": 11,
|
|
"bottomRow": 12,
|
|
"parentId": "sidaue1kdu",
|
|
"widgetId": "xlrmeiioaa"
|
|
}
|
|
],
|
|
"minHeight": 520,
|
|
"type": "CANVAS_WIDGET",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 1,
|
|
"parentRowSpace": 1,
|
|
"leftColumn": 0,
|
|
"rightColumn": 518,
|
|
"topRow": 0,
|
|
"bottomRow": 520,
|
|
"parentId": "j77dthxf61",
|
|
"widgetId": "sidaue1kdu"
|
|
}
|
|
],
|
|
"type": "FORM_WIDGET",
|
|
"isLoading": false,
|
|
"parentColumnSpace": 74,
|
|
"parentRowSpace": 40,
|
|
"leftColumn": 3,
|
|
"rightColumn": 10,
|
|
"topRow": 2,
|
|
"bottomRow": 15,
|
|
"parentId": "0",
|
|
"widgetId": "j77dthxf61"
|
|
}
|
|
]
|
|
}
|
|
}
|