You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to sort the classes on horizontal levels instead? I imagine the diagrams would be easier to read and would require less reordering afterwards. In this context, multiple selection of the ordered groups of classes could also be helpful to move around the whole (already tidy) groups by context.
Here an example of a quite untidy diagram with many dependencies to UIViewController:
After reordering in horizontal hierarchy levels, sorted descending by dependency count (not very strictly, just as a quick example):
The algorithm could be roughly: find the class with the most inheritances and place it, then place all protocols below them, then place all inherited classes below (maybe also sorted left to right by dependency count), continue until inheritance ends. Then place next unplaced class with the most inheritances randomly somewhere else on the screen (maybe below) with the same algorithm and so on.
Even if this algorithm wouldn't work on some edge cases, it would already help a lot on big projects.
The text was updated successfully, but these errors were encountered:
Would it be possible to sort the classes on horizontal levels instead? I imagine the diagrams would be easier to read and would require less reordering afterwards. In this context, multiple selection of the ordered groups of classes could also be helpful to move around the whole (already tidy) groups by context.
Here an example of a quite untidy diagram with many dependencies to UIViewController:
![image](https://user-images.githubusercontent.com/1693115/73802234-4fb6ea00-47bd-11ea-9652-de15f75980f0.png)
After reordering in horizontal hierarchy levels, sorted descending by dependency count (not very strictly, just as a quick example):
![image](https://user-images.githubusercontent.com/1693115/73802955-94dc1b80-47bf-11ea-8d6d-bce3a89fc2f1.png)
The algorithm could be roughly: find the class with the most inheritances and place it, then place all protocols below them, then place all inherited classes below (maybe also sorted left to right by dependency count), continue until inheritance ends. Then place next unplaced class with the most inheritances randomly somewhere else on the screen (maybe below) with the same algorithm and so on.
Even if this algorithm wouldn't work on some edge cases, it would already help a lot on big projects.
The text was updated successfully, but these errors were encountered: