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

[EAK-473] DependsOn: ability to pass multiple actions per query (POC) #473

Open
ala-n opened this issue Jul 25, 2023 · 0 comments
Open

[EAK-473] DependsOn: ability to pass multiple actions per query (POC) #473

ala-n opened this issue Jul 25, 2023 · 0 comments
Assignees

Comments

@ala-n
Copy link
Contributor

ala-n commented Jul 25, 2023

As a DepndsOn Plugin consumer, I want to be able to combine multiple actions per one query condition.

According to the previous enhancements:

  • DependsOn now supports actor-based conflict resolution for ottb actions (e.g. disable multiple DependsOn or outside actors can request action)
  • DependsOn is going to support the whole list of default actions with their inversed versions

It is proposed to make the following changes in DependsOn API:

  1. Java API: ability to declare multiple actions per one query
@DependsOn(query = "@condition", action = {DependsOnActions.SHOW, DependsOnActions.ENABLE})
public String field;

Considering as an alias for

@DependsOn(query = "@condition", action = DependsOnActions.SHOW)
@DependsOn(query = "@condition", action = DependsOnActions.ENABLE)
public String field;

Note: ⚠️no breaking changes for current API (default action = DependsOnActions.VISIBILITY)

  1. XML | HTML API:
 <someField >
     <granite:data
                     dependsOn="@condition"
                     dependsOnAction="SHOW"
                     dependsOn1="@condition"
                     dependsOnAction1="DISABLE"
                     dependsOn2="@condition"
                     dependsOnAction2="DISABLE"
                 />
   </someFIreld>              

Note: according to soft support reasons, there are also no breaking changes expected here
The current combined syntax is still supported for the unnumbered dependsOn declaration:

<someField >
    <granite:data
                    dependsOn="@condition;@condition"
                    dependsOnAction="SHOW;ENABLE"
                />
  </someFIreld>
  1. JS API Behaviour
    The optimization to manage the same condition (DOn) query for multiple actions is expected to be handled by the DOn parsing algorithms.
    TDB: discuss if that is reasonable...
@ala-n ala-n self-assigned this Jul 25, 2023
@ala-n ala-n added this to To do in Development tasks via automation Jul 25, 2023
@smiakchilo smiakchilo changed the title [EAK-473]: DependsOn: ability to pass multiple actions per query (POC) [EAK-473] DependsOn: ability to pass multiple actions per query (POC) Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant