Skip to content
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

Add concept of layout strategy #1365

Closed
wants to merge 7 commits into from

Conversation

lfasani
Copy link
Contributor

@lfasani lfasani commented Sep 19, 2022

ticket

Pull request template

General purpose

What is the main goal of this pull request?

  • Bug fixes
  • New features
  • Documentation
  • Cleanup
  • Tests
  • Build / releng

Project management

  • Has the pull request been added to the relevant project and milestone? (Only if you know that your work is part of a specific iteration such as the current one)
  • Have the priority: and pr: labels been added to the pull request? (In case of doubt, start with the labels priority: low and pr: to review later)
  • Have the relevant issues been added to the pull request?
  • Have the relevant labels been added to the issues? (area:, difficulty:, type:)
  • Have the relevant issues been added to the same project and milestone as the pull request?
  • Has the CHANGELOG.adoc been updated to reference the relevant issues?
  • Have the relevant API breaks been described in the CHANGELOG.adoc? (Including changes in the GraphQL API)
  • In case of a change with a visual impact, are there any screenshots in the CHANGELOG.adoc? For example in doc/screenshots/2022.5.0-my-new-feature.png

Architectural decision records (ADR)

  • Does the title of the commit contributing the ADR start with [doc]?
  • Are the ADRs mentioned in the relevant section of the CHANGELOG.adoc?

Dependencies

  • Are the new / upgraded dependencies mentioned in the relevant section of the CHANGELOG.adoc?
  • Are the new dependencies justified in the CHANGELOG.adoc?

Backend

This section is not relevant if your contribution does not come with changes to the backend.

General purpose

  • Are all the event handlers tested?
  • Are the event processor tested?
  • Is the business code (services) tested?
  • Are diagram layout changes tested?

Architecture

  • Are data structure classes properly separated from behavioral classes?
  • Are all the relevant fields final?
  • Is any data structure mutable? If so, please write a comment indicating why
  • Are behavioral classes either stateless or side effect free?

Review

How to test this PR?

Please describe here the various use cases to test this pull request

  • Has the Kiwi TCMS test suite been updated with tests for this contribution?

lfasani and others added 7 commits September 15, 2022 09:39
This is necessary so that the frontend build do not generate prettier
errors.

Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
JSONResourceFactory

Bug: #1300
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
The referenced object concrete type is now serialized in JSON resource
JSON resources should now be created with the right scheme

Bug: #1301
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
This adapter specializes ECrossReferenceAdapter in case of deletion of
an EObject or a Resource in order to:
* clean the proxies of the inverse references
* clean the ECrossReferenceAdapter itself

Bug: #1301
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
- Remove node type list
- Replace node type list item by node icon label
- Add three layout strategies:
  - free form layout strategy
  - list layout strategy
  - no child layout strategy

Bug: #1339
Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
Now there are two separated concepts:
 * The node style description concept that tells how the node is
represented
 * The new concept of LayoutStrategyDescription that tells how the
children are layouted.

* Add new Styles
 - RectangularNodeStyleDescription
 - ImageNodeStyleDescription
 - IconLabelNodeStyleDescription
* Add a "childrenLayoutStrategy" feature to NodeDescription. There are
two implementations
 - FreeFormLayoutStrategyDescription
 - ListLayoutStrategyDescription

Bug: #1316
Bug: #1339
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
@lfasani lfasani changed the title Lfa/enh/nodestyle layoutstrategy Add concept of layout strategy Sep 19, 2022
*
* @author gcoutable
*/
public class AbstractNodeMappingChilrenLayoutStrategyProvider implements Function<VariableManager, ILayoutStrategy> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it usefull? It is not used.

@@ -92,33 +94,34 @@ public ISiriusWebLayoutConfigurator getDefaultLayoutConfigurator() {
.setProperty(LayeredOptions.SPACING_EDGE_NODE_BETWEEN_LAYERS, SPACING_NODE_EDGE);

configurator.configureByType(NodeType.NODE_RECTANGLE)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not we have the same config for NodeType.NODE_RECTANGLE and NodeType.NODE_IMAGE?
diff= NODE_SIZE_CONSTRAINTS and NODE_SIZE_OPTIONS

case NODE_RECT_PREFIX:
childrenLayoutStrategy = new FreeFormLayoutStrategy();
break;
case NODE_IMG_PREFIX:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be childrenLayoutStrategy = new FreeFormLayoutStrategy();

Comment on lines +96 to +98
{renderedNodeLabel}
{headerSeparator}
{renderedChildren}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was not it needed before?

@lfasani lfasani mentioned this pull request Sep 19, 2022
39 tasks
@lfasani lfasani changed the base branch from master to lfa/enh/intermodel September 20, 2022 13:47
@pcdavid
Copy link
Member

pcdavid commented Sep 21, 2022

Also:

  • there are (at least) two new icons which are added as GIFs and should be SVGs: FreeFrom and ListLayout strategies
  • ImageNodeStyle should have a specific SVG icon (probably this.

@lfasani
Copy link
Contributor Author

lfasani commented Sep 23, 2022

I will abandon this PR as the good one is #1367
I nevertheless will not forget the comment on this PR ;)

@lfasani lfasani force-pushed the lfa/enh/intermodel branch 7 times, most recently from 34eeb0d to adbf143 Compare October 5, 2022 15:36
Base automatically changed from lfa/enh/intermodel to master October 5, 2022 19:43
@lfasani
Copy link
Contributor Author

lfasani commented Oct 14, 2022

The associated commits have been merged via another PR
To be closed.

@lfasani lfasani closed this Oct 14, 2022
@lfasani lfasani deleted the lfa/enh/nodestyle_layoutstrategy branch November 27, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants