Symbol View

See how a given symbol impacts the rest of the application

In the symbol-level view, the selected symbol is represented in relationship to other symbols throughout the application.

In this view, we have the following representations:

  • Purple Element: The currently focused symbol. You can see this in the breadcrumbs at the top of the page.

  • Pink Element: This is any element outside of the selected symbol, it could be in the same file or another file, but it will be internally defined within the project.

  • Gray Element: As with the file-level view, this represents external dependencies: functions and classes and so on defined in third-party libraries.

  • Purple Arrow: Represents a dependency. i.e. the source element depends on the target element; or, the app depends on the venue.

  • Pink Arrow: Represents a dependent. i.e. the source element is depended upon by the target element; or, the index is depended upon by the app.

Changing Graph Depth

The command bar on this view has a special element that allows you to change the depth at which you can view dependency and dependent elements on the graph. The most powerful part of this view is that it allows you to shift the depth separately.

  • Dependency depth: The depth of dependencies to show, centered on the selected symbol.

  • Dependent depth: The depth of dependent elements to show, again centered on the selected symbol.

Examples

Separate Depths

Let’s take a look at the following settings:

  • Dependency depth: 4

  • Dependent depth: 2

Here is the output from those settings.

To quickly describe these settings, it’s useful to think about what the system is doing. For the first two depths of nodes, it shows both dependencies and dependents of every node the algorithm encounters. After a depth of 2, it stops considering dependents of nodes, only their dependencies until a depth of 4.

We can best see how this works from the node chain:

app > venue < initdb > create_seats > Seat

It works as follows:

  1. Starting from app, we show the first layer of nodes. Both dependencies and dependents.

  2. At venue, there are no dependencies to show, to instead only dependents are shown. We’ve now reached a depth of 2, so no more dependents will be shown.

  3. At initdb, we show only the dependencies.

  4. At create_seats, we’ve reached the max depth, so here we compute the dependencies related to this node and stop computing.

View the Impact of Extraction

When doing symbol extraction via the UI, it can be helpful to see exactly what functionality will be kept if you include that symbol in the extraction. The best way to do this is with the following settings:

  • Dependency depth: any sufficiently high number, based on the size of the current project.

  • Dependent depth: 0

In the above image, the dependency depth is set to 5, and the dependent depth is 0.

Already the first thing that is visible, is that even though the dependency depth is set to 5, there are only nodes shown on the screen up until a depth of 2. This is because there are no more dependencies in the tree beyond what is shown.

If we then right-click and extract the node app, we could be certain that the only symbols that would be included in the output codebase would be the ones listed above.

Updated on