PromucFlow_constructor/app/client/test/factories/Widgets
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
..
ButtonFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
CanvasFactory.ts feat: Widget grouping Extended Features (#6538) 2021-08-24 17:08:20 +05:30
ChartFactory.ts fix: Change "Allow Horizontal Scroll" text to "Allow scroll" (#8085) 2021-10-25 17:09:39 +05:30
CheckboxFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
ContainerFactory.ts feat: Tree Select widget (#6271) 2021-09-17 02:08:35 -07:00
DatepickerFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
DividerFactory.ts Feature: Line separator widget (#4954) 2021-07-07 15:00:06 +05:30
DropdownFactory.ts feat: Select and Multiselect V2 (#10359) 2022-02-02 06:15:07 -08:00
FilepickerFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
FormButtonFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
FormFactory.ts refactor: Widget Selection (#19643) 2023-01-28 07:47:06 +05:30
IconFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
ImageFactory.ts fix: popups same width as parent (#7499) 2021-11-30 02:38:46 -08:00
InputFactory.ts feat: Input, Phone no., Currency input widget (#10259) 2022-01-18 13:22:24 +05:30
ListFactory.ts feat: Widget grouping Extended Features (#6538) 2021-08-24 17:08:20 +05:30
MapFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
ModalFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
RadiogroupFactory.ts feat: Tree Select widget (#6271) 2021-09-17 02:08:35 -07:00
RichTextFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
SkeletonFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
SwitchFactory.ts refactor: Widget Development API (#6405) 2021-09-09 20:40:22 +05:30
TableFactory.ts Fix: Tabs widget refactor with new nested property validation (#4014) 2021-04-27 12:46:54 +05:30
TabsFactory.ts perf: Widget re-rendering refactor (#14485) 2022-08-19 15:40:36 +05:30
TextFactory.ts feat: Tree Select widget (#6271) 2021-09-17 02:08:35 -07:00
VideoFactory.ts feat: Updates widget default state (#8562) 2021-11-02 09:47:49 +05:30
WidgetTypeFactories.ts fix: select widget accept string and object in the defaultOption property (#11082) 2022-02-22 00:43:35 -08:00