Work with dependencies

When you use a symbol, text style, or color style from a linked library in one of the files in your project, the item appears in the files panel under dependencies. This list of dependencies helps you understand at a glance where the various parts of your designs came from. The dependencies list displays only the library items used, not the entire contents of the library file.

For example, your icons library file may contain hundreds of icon symbols. When you view the dependencies of your homepage file, it only shows the icons you've actually inserted from that library into the currently selected file.

Branches_Understand-Dependencies.png

Do I need to remove dependencies?

Dependencies in a file in Abstract are NOT a bad thing. This is simply a way to visualize the connections between different files in your projects so that you can maintain your work over time. The ability to see which libraries have been used in any given file can help you understand where your design systems are being maintained and which libraries may need to be updated. Abstract allows you to see which project a linked library file is stored in, and you can click the name of the file or project to navigate directly to the source.

When you import existing files into Abstract that already include symbol or style items from a local library file, you see those local libraries in the dependencies list. You can tell local libraries apart from libraries that are managed in Abstract because they do not have a source project.

Branches_Local-Dependencies.png

However, you may wish to remove dependencies if you are no longer using a particular library file or if you discover that a local library file on your computer was being used instead of a library managed and version controlled with Abstract.

Learn more about managing libraries when replacing local library files with libraries in Abstract.

View dependencies in a file

To view dependencies in a file:

  1. Open the Abstract desktop app.
  2. Select the project with files containing dependencies you’d like to view.
  3. Select Main from the left side pane, or choose a branch.
  4. Click the Files tab at the top.
  5. Click the down arrow to the left of the file with dependencies.
  6. Click the down arrow to the left of the subtitle Dependencies. If no dependencies are available, this option doesn't appear.
  7. Click the name of the library file beneath Dependencies.
  8. In the right preview panel, click Linked Symbols to view a list of symbols that have been linked from this library file.

Fix incorrectly named dependencies

Sometimes, you may notice a dependency in your file that seems to have an incorrect file name. This can happen if you rename a linked library in the source project. For example, if you have a file in your design system project named “Icons” that is linked to several other projects, and you rename it to “Iconography” you may notice that some dependencies use the old file name. Unlinking and relinking the library should update the library file with the new file name.

To fix an incorrectly named dependency:

  1. Open the Abstract desktop app.
  2. Select the project with files containing the dependency with the name you’d like to update.
  3. Select Main from the left side pane, or choose a branch.
  4. Click the Files tab at the top.
  5. Scroll to the bottom section of the files panel and locate the incorrectly named library file underneath the subtitle Linked Libraries.
  6. Right click the name of the file and select Unlink Library…
  7. When prompted, confirm by clicking Stop using as Library.
  8. In the files panel, click Add File and select Link Library…
  9. In the modal, select the library file(s) that you unlinked and click Link # Libraries to relink them to the current project.

The files should now have the correct name in the dependencies list.

Remove an item from dependencies

If you no longer use a library item in a file, but it’s still showing in the dependencies list, you can manually remove the item from the dependencies list for your file. 

To remove a dependency, you must completely remove all of the instances of that item from every artboard and page in the file, including the symbols page.

To remove an item from the dependencies list:

  1. Open the Abstract desktop app.
  2. Select the project with files containing a dependency you’d like to remove.
  3. Create a new branch. Tip: Give your branch a title that makes it clear it removes a dependency.
  4. From your new branch, open the file in Sketch that contains the dependency you’d like to remove. 
  5. In Sketch, go to Layer > Imported Symbols...
  6. Select the symbol(s) that you want to remove from the list that appears.
  7. Click the down arrow in the bottom left of the modal to open a menu.
  8. From the menu, choose Unlink from Library.
    Modal_Dependencies-Sketch-Unlink.png
  9. Choose Ok when prompted.
  10. Click Done to exit the modal.
  11. Save and commit changes.

The item should no longer appear under the dependencies list.