[6118] Support auto_until_change layout option#6130
Conversation
e5ee20e to
b7a4c57
Compare
af1c2b1 to
81922c1
Compare
5d666e9 to
d9bd6d5
Compare
| id: ID! | ||
| label: String! | ||
| autoLayout: Boolean! | ||
| layoutOption: DiagramLayoutOption! |
There was a problem hiding this comment.
Now that we will have a way to retrieve ELK "Layout options" from the backend in the upcoming days / weeks, this would have to be renamed very quickly to something clearly related to the auto-layout behavior. We may merge this as is, but it will have to be renamed during the cool down. It can't stay this way now.
| var bendingPoints = List.of(new Position(10, 10), new Position(20, 20), new Position(30, 30)); | ||
| var edgeLayoutDataInput = new EdgeLayoutDataInput(siriusWebApplicationEdgeId.get(), bendingPoints, List.of()); | ||
| var diagramLayoutDataInput = new DiagramLayoutDataInput(List.of(nodeLayoutDataInput), List.of(edgeLayoutDataInput), List.of()); | ||
| var diagramLayoutDataInput = new DiagramLayoutDataInput(List.of(nodeLayoutDataInput), List.of(edgeLayoutDataInput), List.of(), false, false); |
There was a problem hiding this comment.
How can this compile? This commit does not introduce any change to this DTO.
There was a problem hiding this comment.
I squashed the two commits
...eb/src/test/java/org/eclipse/sirius/web/services/selection/SelectionDescriptionProvider.java
Show resolved
Hide resolved
...in/java/org/eclipse/sirius/components/collaborative/diagrams/dto/DiagramLayoutDataInput.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/sirius/components/collaborative/diagrams/DiagramCreationService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramGrowableListViewProvider.java
Show resolved
Hide resolved
...c/main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramSubNodeListViewProvider.java
Show resolved
Hide resolved
...pse/sirius/web/e2e/tests/diagramResize/DiagramResizeWithSameSemanticElementViewProvider.java
Show resolved
Hide resolved
...rc/main/java/org/eclipse/sirius/web/e2e/tests/diagramtoolbar/DiagramToolbarViewProvider.java
Show resolved
Hide resolved
...s/web/papaya/representations/dashboarddiagram/PapayaDashboardDiagramDescriptionProvider.java
Show resolved
Hide resolved
318bdfc to
654e88f
Compare
Bug: #6118 Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
654e88f to
9e661ce
Compare
| @Service | ||
| public class DiagramDescriptionLayoutOptionMigrationParticipant implements IMigrationParticipant { | ||
|
|
||
| private static final String PARTICIPANT_VERSION = "2026.3.0-202601161500"; |
There was a problem hiding this comment.
This will, of course, have to be updated to 2026.5...
| boolean autoLaidOut = switch (layoutDiagramInput.diagramLayoutData().autoLayoutState()) { | ||
| case ACTIVATE -> true; | ||
| case DEACTIVATE -> false; | ||
| case UNCHANGED -> diagram.getLayoutData().autoLaidOut(); | ||
| }; |
There was a problem hiding this comment.
There's something odd at the heart of this in terms of lifecycle. If I create a diagram with NONE as a LayoutOption and then if I perform one arrangeAll, my diagram see to be marked as autoLaidOut even after other changes (creating a new element for example).
There are still again issues related to state management and lifecycle.
Pull request template
General purpose
What is the main goal of this pull request?
Project management
priority:andpr:labels been added to the pull request? (In case of doubt, start with the labelspriority: lowandpr: to review later)area:,difficulty:,type:)CHANGELOG.adocbeen updated to reference the relevant issues?CHANGELOG.adoc? (Including changes in the GraphQL API)CHANGELOG.adoc? For example indoc/screenshots/2022.5.0-my-new-feature.pngArchitectural decision records (ADR)
[doc]?CHANGELOG.adoc?Dependencies
CHANGELOG.adoc?CHANGELOG.adoc?Frontend
This section is not relevant if your contribution does not come with changes to the frontend.
General purpose
Typing
We need to improve the typing of our code, as such, we require every contribution to come with proper TypeScript typing for both changes contributing new files and those modifying existing files.
Please ensure that the following statements are true for each file created or modified (this may require you to improve code outside of your contribution).
useMutation<DATA_TYPE, VARIABLE_TYPE>(…)useQuery<DATA_TYPE, VARIABLE_TYPE>(…)useSubscription<DATA_TYPE, VARIABLE_TYPE>(…)useMachine<CONTEXT_TYPE, EVENTS_TYPE>(…)useState<STATE_TYPE>(…)?.(if the GraphQL API specifies that a field cannot benull, do not treat it has potentiallynullfor example)let diagram: Diagram | null = null;)Backend
This section is not relevant if your contribution does not come with changes to the backend.
General purpose
Architecture
Review
How to test this PR?
Please describe here the various use cases to test this pull request