Skip to content

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Nov 27, 2024

This PR builds on #3582

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

The undo order is not always right for presentation elements.

Issue Number: #3577

What is the new behavior?

Diagrams will always be removed after all presentations are removed. This way the undo order is maintained.

Other information

This opens the opportunity to have different types of diagrams. It could be that we create separate ClassDiagram, SequenceDiagram, etc. types, instead of using the diagramType objects we currently use.

@amolenaar amolenaar requested a review from danyeaw November 27, 2024 17:02
@amolenaar amolenaar changed the base branch from main to reduce-uml-dependency November 27, 2024 17:02
@github-actions github-actions bot added the python Pull requests that update Python code label Nov 27, 2024
@tompkins-ct
Copy link

I like this

This opens the opportunity to have different types of diagrams. It could be that we create separate ClassDiagram, SequenceDiagram, etc. types, instead of using the diagramType objects we currently use.

I think most digrams are fine, but sequence-like diagrams are difficult in Gaphor because they have a pretty defined layout and Gaphor provides too much flexibility in placing items for that particular diagram. A more structured foundation for them might be beneficial, maybe something structured like Eclipse/Capella in the future? This typing also enables tuning autolayout tools to the diagram type which can produce much better results.

@amolenaar
Copy link
Member Author

I think most digrams are fine, but sequence-like diagrams are difficult in Gaphor because they have a pretty defined layout and Gaphor provides too much flexibility in placing items for that particular diagram. A more structured foundation for them might be beneficial, maybe something structured like Eclipse/Capella in the future? This typing also enables tuning autolayout tools to the diagram type which can produce much better results.

I did not even think of this. But yes, it opens up a lot of possibilities.

@amolenaar amolenaar force-pushed the reduce-uml-dependency branch from 1cc3aef to c94c729 Compare November 29, 2024 09:31
Base automatically changed from reduce-uml-dependency to main November 29, 2024 13:50
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Nice update @amolenaar!

@danyeaw danyeaw added fix A fix for a bug and removed python Pull requests that update Python code labels Nov 29, 2024
@danyeaw danyeaw merged commit c79e608 into main Nov 29, 2024
5 checks passed
@danyeaw danyeaw deleted the fix-undo-order branch November 29, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants