appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

List V2 POC: Setup API for add/update/delete pseudo widget with pseudoWidgetReducer

Open ashit-rath opened this issue 3 years ago • 1 comments

Part 1

In order to maintain the state of the pseudo widget like normal widgets a new reducer is introduced i.e pseudoWidgetReducer. As the pseudo widgets are added/removed on the fly based on a widget's rendering architecture, new APIs are to be introduced.

  • AddPseudoWidget
  • RemovePseudoWidget
  • UpdatePseudoWidget

These three methods will update the individual widgets in the pseudo widget reducer.

Part 2

Make child widget properties dependant on templates

// Template
Select
    options - {{currentItem.colors}}
    defaultValue - {{currentItem.defaultColor}}

// Pseudo widget - List1_Select1_0
Select
    options - {(currentItem) => {
        currentItem.colors
      })(List1.listData[List1_Select1_0.__index])

    defaultValue - {{(currentItem) => {
        currentItem.colors
      })(List1.listData[List1_Select1_0.__index])}}

ashit-rath avatar Aug 05 '22 15:08 ashit-rath

We have found issues that are potential duplicates:

  • [#15779] List V2 POC: Setup pseudoWidgetReducer for evaluation and render pseudo widgets (82.68%) If any of the issues listed above are a duplicate, please consider closing this issue & upvoting the original one.
    Alternatively, if neither of the listed issues addresses your feature/bug, keep this issue open.

github-actions[bot] avatar Aug 05 '22 15:08 github-actions[bot]

In the POC we were able to achieve the initial goals and on top of that we verified the widget operations on the List widget also works eg. drag/drop/resize, item size change etc.

ashit-rath avatar Aug 19 '22 05:08 ashit-rath

Update: PoC also needs to be reviewed by a reviewer so re-opening this issue and will be closed once the PoC is merged with the base branch.

ashit-rath avatar Aug 19 '22 06:08 ashit-rath