Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task] Blueprint Saga workflows #10659

Open
1 of 6 tasks
riodeuno opened this issue Jan 26, 2022 · 5 comments
Open
1 of 6 tasks

[Task] Blueprint Saga workflows #10659

riodeuno opened this issue Jan 26, 2022 · 5 comments
Assignees
Labels
List Widget Issues related to the list widget Task A simple Todo Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@riodeuno
Copy link
Contributor

riodeuno commented Jan 26, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Description

Today, certain updates are run on a widget when they are first placed on the canvas. This works well as these don't need to run again during the lifecycle of a widget on the canvas.

However, there are certain updates that need to run on the List Widget when it has new widgets added within it. This way, the List Widget can safely replicate the properties of these widgets in all items of the List widget based on the data.

This means that these need to run

  1. when we move the widget from outside the List widget into the list widget template,
  2. when undoing a delete operation for a widget
  3. when pasting a widget into the List widget.

There are two ways forward here for a solution

  1. We change the process in which these updates happen for the List widget's children. That is, not do these in the blueprint operations.
  2. We make sure to run the blueprint operations (the aforementioned updates), in all the scenarios.

If we go with approach 1. Here are the tasks to be performed. -- Please note that the details need to be worked out.

SubTasks

  • Possibly, add new widget APIs which configures the onAddChild and onRemoveChild to the enhancements
  • Remove the code which runs code to update List Widget template from the CHILD_OPERATIONS blueprint type. We can potentially remove the CHILD_OPERATIONS type, provided that we use some other API to disallow certain widgets to be placed within other widgets.

If we go with approach 2. Here are the tasks to be performed.

SubTasks

  • Run blueprint sagas on widget move to another widget
  • Run blueprint sagas when undo-delete a widget
  • Run blueprint sagas when pasting a widget
@riodeuno
Copy link
Contributor Author

@sbalaji1192 I believe we should go with approach 1. instead of the original approach 2. I think that these onAddChild and onRemoveChild operations don't belong in the Blueprint, as the Blueprint is meant to deal with the construction of the widget and are not supposed to be run during the lifecycle of the widget on the canvas.

@sbalaji1192
Copy link
Contributor

@riodeuno Agree with you. Adding new lifeCycle methods for the widget seems to be the appropriate way to solve this.

@dilippitchika dilippitchika added the List Widget Issues related to the list widget label Apr 21, 2022
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets UI Building Pod labels Apr 21, 2022
@riodeuno
Copy link
Contributor Author

riodeuno commented May 5, 2022

@sbalaji1192 @somangshu @rohitagarwal88 @SatishGandham Is this update needed for the List Widget V2 efforts?

@sbalaji1192
Copy link
Contributor

@Tooluloope Could you please confirm if this is needed for List widget v2 implementation?

@techbhavin
Copy link
Contributor

Need to Improve

  • In the form widget current approach is the Button widget with two properties Hidden base on the approach requireParentProps so it ideal way as per discussion here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
List Widget Issues related to the list widget Task A simple Todo Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

7 participants