-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] Add ADR for the multiple selection on Selection Dialog
Signed-off-by: Florian Barbin <[email protected]>
- Loading branch information
1 parent
0609860
commit 46a0f47
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
= ADR-157 - Have the multiple selection on the Selection Dialog | ||
|
||
== Context | ||
|
||
Currently, the Selection Dialog defined on a NodeTool just allows one element to select. | ||
In some cases where it makes sense, we would like to let the end-user select several elements. | ||
|
||
== Decision | ||
|
||
=== View model | ||
|
||
The org.eclipse.sirius.components.view.diagram.SelectionDialogDescription will have a new boolean attribute called "multiple" as defined in the Sirius Desktop Selection Wizard. | ||
|
||
=== GraphQL API | ||
|
||
The SelectionDescription type will have a new boolean field "multiple": | ||
|
||
``` | ||
type SelectionDescription implements RepresentationDescription { | ||
id: ID! | ||
label: String! | ||
message(variables: [SelectionDialogVariable!]!): String! | ||
multiple: Boolean! | ||
treeDescription: TreeDescription! | ||
} | ||
``` | ||
|
||
=== Frontend | ||
|
||
The frontend SelectionDialog component will request the `multiple` value information to know if it should authorize the multi-selection on the `TreeView` and change the variable returned to backend: | ||
|
||
* In case of simple selection, the frontend will continue to send a variable "selectedObject" with the type "OBJECT_ID" | ||
* In case of multiple selection, the frontend will send a variable "selectedObjects" with the type "OBJECT_ID_ARRAY" | ||
|
||
=== Backend | ||
|
||
There is nothing else to change in the backend since it already handles the three variables types : STRING, OBJECT_ID and OBJECT_ID_ARRAY. | ||
|
||
== Status | ||
|
||
Work in progress | ||
|
||
== Consequences | ||
|
||
There are no particular consequences as this ADR is very specific to the Selection dialog. | ||
|
||
== References | ||
|