Skip to content

Commit

Permalink
[doc] Add ADR for the multiple selection on Selection Dialog
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Barbin <[email protected]>
  • Loading branch information
florianbarbin authored and sbegaudeau committed Sep 9, 2024
1 parent 0609860 commit 46a0f47
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [ADR-154] Add support for finding parent in tree representation
- [ADR-155] Add max-width expression for diagram labels
- [ADR-156] Make it possible to display the semantic elements as a tree in the Selection Dialog
- [ADR-157] Have the multiple selection on the Selection Dialog

=== Deprecation warning

Expand Down
48 changes: 48 additions & 0 deletions doc/adrs/157_have_multiselection_on_selection_dialog.adoc
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

0 comments on commit 46a0f47

Please sign in to comment.