-
Notifications
You must be signed in to change notification settings - Fork 77
[5765] Add support for interpreted expressions in node styles #5920
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: cooldown
Are you sure you want to change the base?
Conversation
Signed-off-by: Stéphane Bégaudeau <[email protected]>
Signed-off-by: Pierre-Charles David <[email protected]>
Signed-off-by: Florian ROUËNÉ <[email protected]>
Bug: #5684 Signed-off-by: Michaël Charfadi <[email protected]>
…l detection Bug: #5855 Signed-off-by: Florian ROUËNÉ <[email protected]>
Signed-off-by: Gwendal Daniel <[email protected]>
Signed-off-by: Gwendal Daniel <[email protected]>
Bug: #5887 Signed-off-by: Stéphane Bégaudeau <[email protected]>
Bug: #5832 Signed-off-by: Pierre-Charles David <[email protected]>
…nt in the Explorer Bug: #5720 Signed-off-by: Pierre-Charles David <[email protected]>
Signed-off-by: Pierre-Charles David <[email protected]>
Bug: #5851 Signed-off-by: Cédric BRUN <[email protected]> Signed-off-by: Florian ROUËNÉ <[email protected]>
Bug: #5765 Signed-off-by: Florian ROUËNÉ <[email protected]>
| nsPrefix="customnodes"> | ||
| <eClassifiers xsi:type="ecore:EClass" name="EllipseNodeStyleDescription" eSuperTypes="../../../../../sirius-components-view-diagram/src/main/resources/model/diagram.ecore#//NodeStyleDescription"> | ||
| <eStructuralFeatures xsi:type="ecore:EReference" name="background" eType="ecore:EClass ../../../../../sirius-components-view/src/main/resources/model/view.ecore#//UserColor"/> | ||
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="opacityExpression" eType="ecore:EDataType ../../../../../sirius-components-view/src/main/resources/model/view.ecore#//InterpretedExpression"/> |
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.
I didn't want to add the example to rectangularNode because all of its style fields are shared with other elements (e.g., borderNodeStyle, which is used for labels).
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.
I don't see why it's an issue? That was my point, introduce this capability and ensure that it would works for nodes, edges, etc. which is why I was in favor of something like font size which is not customized often but used pretty much everywhere.
It would be very odd to introduce a new feature (control manually the opacity of a node) just for one specific custom node type on top of that.
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.
But it is already possible today to interpret font size, at least programmatically, (in the view DSL it's not an expression).
Only style edges and node styles are not, and there is no notion of font.
The only style properties are colors, line style, border size and border radius.
I could change the border size and border radius to be an expression.
|
|
||
| private ILayoutStrategy childrenLayoutStrategy; | ||
|
|
||
| private String opacity; |
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.
I imagine we would want to be able to overload this value using the appearance palette?
Even though it is an interpreted value.
39f7a88 to
df23d88
Compare
Bug: #5765
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