Layout
This guide is also in the app, under Help › Guide. The dotted names are buttons, panels and options there: in the app, clicking one lights up its place in the window. That only works in the app.
Files are laid out left to right. The entry point of a program is on the left, and the files it imports are to its right.
A dependency edge connects an import to an export. A file's imports are on its right side: their edges leave from there. Its exports are on its left side: the edges that use them come in there.
The layout is worked out folder by folder, starting from the deepest. In a folder with no folders inside, the files are placed in columns, by their dependencies. Each column is a rank.
That folder then becomes one block in its parent folder. The block is placed among the parent's own files and folders the same way, by the edges between them. This repeats up to the top of the repository.
Some edges go to a whole folder. For example, a Go import goes to the folder of its package, and an Astro page that reads a content collection goes to the folder of that collection. Such an edge places the folder as an edge to one of its files would: to the right of the file the edge comes from.
The panel sets the and the . makes a tall layout less tall for its width. It splits the tallest ranks into two columns, but never between files that depend on each other.
With several folders or repositories open, the panel's group sets how they stand beside each other. They can be packed together, in one row, or in one column. They can be ordered by size, by name, or in the order you added them. Its slider sets the space between them.
Backwards edges
The layout always tries to place files so that each dependency edge runs from the importing file on the left to the exporting file on its right.
When there are circular dependencies, between files or between folders, this isn't always possible. In these cases, the layout tries to keep the number of backwards edges as low as it can. Most repositories still have some.
You can . A red edge means there is a circular dependency:
- Between files: the two files depend on each other, directly or through other files.
- Between folders: a file in folder A uses a file in folder B, and a file in B uses something back in A. Folders are placed as blocks, so one of these edges has to run backwards.
Not every circular dependency is a mistake. That depends on the kind of edge and the language.
Where a block narrower than its column sits across it, in folders laid out by their dependencies.
In the app:
Where a column shorter than the tallest sits, or whether it fills it.
In the app:
Splits the tallest ranks of a tall layout into two columns, for a squarer layout.
In the app:
How folders and repositories open on the canvas stand beside each other: packed, in a row or in a column, in what order, and the room between them.
In the app:
Room between files and folders laid out by their dependencies, and folders' padding.
In the app:
The pairs of files that depend on each other, as the canvas draws them: each importer and what it imports, their relationship kinds, and whether the edge runs backwards, with what that means.
In the app: