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

Feature request: Sort class hierarchy & multiple selection #29

Open
Hurricane31337 opened this issue Feb 5, 2020 · 0 comments
Open

Comments

@Hurricane31337
Copy link

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

After reordering in horizontal hierarchy levels, sorted descending by dependency count (not very strictly, just as a quick example):
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant