-
Notifications
You must be signed in to change notification settings - Fork 83
[6118] Support auto_until_change layout option #6130
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2026 Obeo. | ||
| * This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * Obeo - initial API and implementation | ||
| *******************************************************************************/ | ||
| package org.eclipse.sirius.components.collaborative.diagrams.dto; | ||
|
|
||
| /** | ||
| * Defines the possible actions for managing the autoLayout state. | ||
| * | ||
| * @author frouene | ||
| */ | ||
| public enum AutoLayoutState { | ||
| UNCHANGED, | ||
| ACTIVATE, | ||
| DEACTIVATE | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ type DiagramLayoutData { | |
| nodeLayoutData: [NodeLayoutData!]! | ||
| edgeLayoutData: [EdgeLayoutData!]! | ||
| labelLayoutData: [LabelLayoutData!]! | ||
| autoLaidOut: Boolean! | ||
| } | ||
|
|
||
| type NodeLayoutData { | ||
|
|
@@ -417,7 +418,7 @@ type SingleClickOnTwoDiagramElementsCandidate { | |
| type DiagramDescription implements RepresentationDescription { | ||
| id: ID! | ||
| label: String! | ||
| autoLayout: Boolean! | ||
| layoutOption: DiagramLayoutOption! | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| arrangeLayoutDirection: ArrangeLayoutDirection! | ||
| nodeDescriptions: [NodeDescription!]! | ||
| childNodeDescriptionIds: [ID!]! | ||
|
|
@@ -445,6 +446,12 @@ enum ArrangeLayoutDirection { | |
| UP | ||
| } | ||
|
|
||
| enum DiagramLayoutOption { | ||
| NONE, | ||
| AUTO_LAYOUT, | ||
| AUTO_UNTIL_MANUAL | ||
| } | ||
|
|
||
| type DropNodeCompatibilityEntry { | ||
| droppedNodeDescriptionId: ID! | ||
| droppableOnDiagram: Boolean! | ||
|
|
@@ -723,6 +730,13 @@ input DiagramLayoutDataInput { | |
| nodeLayoutData: [NodeLayoutDataInput!]! | ||
| edgeLayoutData: [EdgeLayoutDataInput!]! | ||
| labelLayoutData: [LabelLayoutDataInput!]! | ||
| autoLayoutState: AutoLayoutState! | ||
| } | ||
|
|
||
| enum AutoLayoutState { | ||
| UNCHANGED | ||
| ACTIVATE | ||
| DEACTIVATE | ||
| } | ||
|
|
||
| input NodeLayoutDataInput { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
autoLaidOuteven after other changes (creating a new element for example).There are still again issues related to state management and lifecycle.