PromucFlow_constructor/app/client/cypress/fixtures
Hetu Nandu aa9b19c995
refactor: Widget Selection (#19643)
## 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
2023-01-28 07:47:06 +05:30
..
Bugs
Datatypes
ImportApps
Table
Templates
AAAFlowerVase.jpeg
AAAGlobeChristmas.jpeg
addWidgetTable-mock.json
alignmentWithDynamicHeightDsl.json
apiParallelDsl.json
apiTableDsl.json
appsmithlogo.png
audioWidgetDsl.json
autocomp.json
base64imagedsl.json
basicDsl.json
basicNumberDataTableDsl.json
basicTabledsl.json
buttonApiDsl.json
buttondsl.json
ButtonGroup_MenuButton_Width_dsl.json
buttonGroupDsl.json
buttonLintErrorDsl.json
buttonRecaptchaDsl.json
CameraDsl.json
CanvasResizeDsl.json
categorySliderWidgetDsl.json
chartCustomDataDsl.json
ChartDsl.json
ChartLoadingDsl.json
ChartTextDsl.json
chartUpdatedDsl.json
checkboxgroupDsl.json
CMSdsl.json
commondsl.json
CommunityIssuesExport.json
ConcreteHouse.jpg
containerdsl.json
ContextSwitching.json
CurrencyInputDynamic.json
CurrencyInputIssueExport.json
datasources.json
datepicker_switchDsl.json
datePicker2dsl.json
datePickerdsl.json
datePickerV2Updated_dsl.json
debuggerDependencyDsl.json
debuggerTableDsl.json
defaultMetadataDsl.json
defaultMetaDsl.json
defaultTableDsl.json
defaultTableV2Dsl.json
deprecatedWidgets.json
disabledWidgetsDsl.json
displayWidgetDsl.json
DividerDsl.json
DocumentViewerDsl.json
dropDownWidget_reset_check_dsl.json
dynamicHeightCanvasResizeDsl.json
dynamicHeightContainerCheckboxdsl.json
dynamicHeightContainerdsl.json
dynamicHeightContainerScrolldsl.json
DynamicHeightDefaultHeightdsl.json
dynamicHeightFormSwitchdsl.json
dynamicHeightListDsl.json
DynamicHeightListTextDsl.json
DynamicHeightModalDsl.json
dynamicHeightStatboxdsl.json
dynamicHeigthContainerFixedDsl.json
dynamicTabWidgetdsl.json
editorContextdsl.json
emptyDSL.json
EmptyListWidget.json
example.json
executeAction.json
executionParamsDsl.json
exported-app.json
exportedApp.json
featureFlags.json
filepickerDsl.json
filePickerTableDSL.json
filePickerV2_reset_check_dsl.json
filePickerV2WidgetReskinDsl.json
fontData.json
forkedApp.json
forkNonSignedInUser.json
formDataDsl.json
formdsl.json
formdsl1.json
formHasChangesDsl.json
formInputTableDsl.json
formInputTableV2Dsl.json
formResetDsl.json
formSelectDsl.json
formSelectTreeselectDsl.json
formSwitchDsl.json
formWidgetdsl.json
formWidgetWithInputValCheckDsl.json
formWithInputdsl.json
formWithRTEDsl.json
gitImport.json
googleSource.json
iconButtonWidgetsDsl.json
IframeDsl.json
IframeOnSrcDocChange.json
inputBindingdsl.json
inputdsl.json
inputMaxCharDsl.json
InputWidgetV2InsideListDSL.json
Invalid_binding_dsl.json
invisibleWidgetdsl.json
Js_toggle_dsl.json
JSApiOnLoadDsl.json
jsFunctionTriggerDsl.json
JsObjecWithGitdsl.json
JSObjOnLoadApp.json
jsonFormDslWithoutSchema.json
jsonFormDslWithSchema.json
jsonFormDslWithSchemaAndWithoutSourceData.json
jsonFormDynamicHeightDsl.json
jsonFormInModalDsl.json
jsonFormUnicodeDSLWithoutSourceData.json
jsonTextDsl.json
largeJSONData.json
layoutdsl.json
library_export.json
listdsl.json
listRegression2Dsl.json
listRegression3Dsl.json
listRegressionDsl.json
ListVulnerabilityDSL.json
listwidgetdsl.json
listWidgetLintDsl.json
ListWidgetWithDataAndButtonDSL.json
longCanvasDsl.json
MapChartDsl.json
Mapdsl.json
menuButtonDsl.json
ModalDsl.json
modalOnTableFilterPaneDsl.json
modalScroll.json
mongo_GET_Actions.json
mongo_GET_selectTableDropdown.json
mongo_POST_Actions.json
mongo_PUT_replaceLayoutWithCRUD.json
mongoAppdsl.json
multiPartFormDataDsl.json
multipleContainerdsl.json
MultipleInput.json
MultipleWidgetDsl.json
multiSelectDsl.json
multiSelectedRowUpdationDsl.json
multiSelectedRowUpdationTableV2Dsl.json
mySQL_GET_Actions.json
mySQL_GET_selectTableDropdown.json
mySQL_POST_Execute.json
mySQL_PUT_replaceLayoutWithCRUD.json
navigateToInputDsl.json
navigateTotabledsl.json
newFormDsl.json
noiseDsl.json
numberSliderWidgetDsl.json
omnibarDsl.json
one_postgres.json
onPageLoadActionsDsl.json
PageLoadDsl.json
paramsDsl.json
patchjson.txt
PgAdmindsl.json
PhoneInputDynamic.json
plugins.json
postInviteStub.json
postjson.txt
previewMode.json
promisesBtnDsl.json
promisesBtnImgDsl.json
promisesBtnListDsl.json
promisesStoreValueDsl.json
putjson.txt
qr.mjpeg
radioGroup_int_value_dsl.json
rangeSliderWidgetDsl.json
replay.json
resetPassword.json
rundsl.json
saveAction.json
Select_table_dsl.json
SelectDslWithEmptyOptions.json
selectMultiSelectTreeSelectWidgetDsl.json
selectWidgetDsl.json
SimpleBinding.json
slashcommandDsl.json
SMTPTestdsl.json
snippetDsl.json
snippetErrordsl.json
snippingTableDsl.json
StatboxDsl.json
SwitchGroupWidgetDsl.json
swtchTableDsl.json
swtchTableV2Dsl.json
tabdsl.json
tabInputDsl.json
tableAndChart.json
tableAndTextDsl.json
TableClientSearch.json
TableFilterImportApp.json
tableInputDsl.json
TableMigrationAppExported.json
TableMigrationDsl.json
tableNewDsl.json
tableNewDslWithPagination.json
tableResizedColumnsDsl.json
tableTextPaginationDsl.json
tablev1NewDsl.json
tableV2AndTextDsl.json
TableV2ClientSearch.json
tableV2ColumnOrderDsl.json
tableV2NewDsl.json
tableV2NewDslWithPagination.json
tableV2ResizedColumnsDsl.json
tableV2TextPaginationDsl.json
tableV2WidgetCondnFormatDsl.json
tableV2WidgetDsl.json
tableV2WithTextWidgetDsl.json
tableV2WithUrlColumnDsl.json
tableWidgetCondnFormatDsl.json
TableWidgetDatawithEmptyKeys.json
tableWidgetDsl.json
tableWithNumberColumnDsl.json
tableWithTextWidgetDsl.json
tabsWidgetDsl.json
tabsWidgetReset.json
tabsWithWidgetDsl.json
Test_csv.csv
testAction.json
testdata.json
testFile.mov
testFile2.mov
textDsl.json
textLintErrorDsl.json
textNewDsl.json
TextTabledsl.json
TextTableV2dsl.json
textWidgetDsl.json
textWidgetDynamicdsl.json
ThemeAppdsl.json
TreeSelectDsl.json
uiBindDsl.json
user.json
videoWidgetDsl.json
viewdsl.json
WidgetCopyPaste.json
widgetPopupDsl.json
widgetSelection.json
xmlParser.json