Figma Support Forum

Reference a branch in another library

First and foremost, branching is a great addition to Figma, thank you!

Here is some background on how our Style and Component libraries are setup:

Project: Design System
File 1: Styles (text/color/other token styles)
File 2: Components (primitive components, larger organisms, and some templates)

What I’d like to do is create a branch in File 1 and change our brand color and add some text styles.

I’d then like to “stage” this branch so that I can reference it in File 2 (another file) and test some of the changes downstream in components to see how they might look before merging and publishing File 1 (in case there are things I need to change/add).

I would love some suggestions on how I might accomplish a workflow like this, or if it’s something that might be supported in the future.

Thanks!

3 Likes

+1 for the ability to publish branches. I mentioned it in the slack channel as well.

In addition to the use case mentioned by you @Bryan_Berger, in our case it would be to be able to create v2/vX of components with breaking changes for older files that depend on the old version of the components. The published branch would be used to get files up to speed to the breaking changes.

1 Like

This is a great request. For now, we are trying to keep it as simple as possible, which means that only single files can be branched, and there isn’t a way to test out dependencies of the sort that you are describing.

We’ll think about this use case some more, but it’s likely that it will need to wait until after the launch of the initial version of branching. Thanks!

Wow, this is a great idea. +1. Totally get why it might have to wait and, IMO, worth waiting for. We (my team) were just discussing the possibility and benefits of publishing a branch of our library. We currently have a completely separate Beta library for this reason but it’d be great to just have a Beta branch and be able to cherry-pick changes from the Beta branch to merge into Main. Very similar to the way a Staging environment might work in a traditional dev environment.

Just to add to the use case, we were looking for something in the past that helped us pick a release date for a new design iteration for the clients/devs to see and use. And not be bothered with all the tinckering in the meantime. Branching was told to be the solution, which it could very well be. But if we can’t update the components definitions (in file A) while doing adjustments in designs (in file B), then we’re still stuck I think. Any in between solutions more than welcome.

1 Like

Any new news on the plans of allowing for a branch using multiple files? Has been a while, not sure when Branching is going to be released as mentioned before you get a chance to look at it (not sure, but it might already be released :)).

Asking only because branching as a concept is currently not useable for us, since the libraries are not attached in the branche.

2 Likes

^very much this

I agree with Ben. Branching with multiple files would allow us to finally get away from Sketch + Abstract

1 Like