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

Support annotation of classes with e.g. @Flow(x-y-coordinates, rgb-colour, description, ...etc) #46

Open
anthonyleonard opened this issue Dec 10, 2018 · 1 comment
Labels

Comments

@anthonyleonard
Copy link

Firstly, flow is awesome :)

Nevertheless, I wanted to share a thought that I had about custom layouts in Flow ...

The auto generated layouts that Flow provides is perfect when you lack any context about "where a class lives" in your codebase. However many codebases are consciously split into layers or subsystems. ( In our case we use an "clean" architecture in which every class lives in a layer a la http://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html ) It would be great if we would use Flow to show diagrammatically which classes are called in the context of these layers. For this reason I would like to tell Flow where in a diagram a given class should be placed, and what colour it should have. This way it would be easier to see that some unit tests only call certain subset of classes, integration tests call classes at the edge, service tests cover the whole thing, etc. Also show the "flow" (literally) through the layers when calls are made while the app is running. This would be particularly helpful for new starters on the team or QAs being tasked with understanding the code coverage of our tests.

Keeping a class in the same place on a diagram every time, and with the same colour every time also helps the team gather a stable mental picture of the architecture. This stability is impossible if the class keeps jumping around for each different test when the colour and position are determined programmatically (albeit very cleverly to make very pretty diagrams) in the absence of any any other context.

It occurred to me that custom annotations on classes providing the x y coordinates (relatively sized?) and rgb colour codes might allow Flow to register these and layout its diagrams accordingly.

If I get time I will be exploring ways of achieving this myself, but I thought I'd share for now. Let me know what you think :)

@YoannBuch
Copy link
Contributor

YoannBuch commented Dec 25, 2018 via email

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

No branches or pull requests

3 participants