hi everyone it's chad as a designer advocate one of the questions that i often get from
teams is how to approach updating and then testing their design system assets in figma
one way that i've approached this in the past and something that i've seen other teams do as well
is to use two separate libraries for this one library is used as a sandbox for
updates and progress and another library is used to copy assets to
and publish as the production library for teams to use but what if we didn't have to consistently
maintain separate library files and manually copy updates between them with branching we have
a space to explore updates in our main library files while keeping the source of truth intact
and with swap library we can quickly change what libraries are being used in a file
so let's take a look at how we can use these features together to iterate and test our
components using just our main library files the first thing we'll do is open our component library
and let's say that we have a task to update the corner radius on some of our components
we're going to create a branch so we can make these updates without impacting what's
currently published now that i'm in my branch i'm going to go ahead and select all of our
button variants and we'll make them a bit more rectangular and we'll also update our drop down
and we'll update the inputs while we're at it
now that i've made these updates and i'd like to test them i would go up here but i can't publish a
library from a branch what i can do is duplicate this branch as a new file and then publish that
new file to test out the updates i'm going to open my duplicated branch now as a new file
and the first thing i'll do is rename this so we know that it is a test library
i'm going to go ahead and publish these components
and then i'll want to test these out in some files so i can see what these library updates
will do to the files so i'll go into some app screens that i've been working on
and we can see here i have that button the drop down the input and we're going to use swap library
to bring in our test library and see what those updates look like if i go to my assets tab and
then bring up the team libraries here i can select the app components and then swap library
to choose that test library we've just published i'm going to uncheck the option to swap default
styles in instances so that way we're only swapping out these top level components
once i hit swap library i can see the updates and everything looks good here so
maybe i'm going to go back and merge my branch in and publish that update for everyone but first
i'm going to undo that swap and then i'm going to go back into the test library and unpublish this
since we'll no longer need the test library going back into the libraries window i can go into the
test library and unpublish this and since we're done testing we can actually remove this file
now we're ready to go ahead back into our branch
we can merge this and then publish the updates from our main library for everyone to get
i hope that this will help you out in updating your components using
branching and give you a little tip for testing through swap library thanks i'll see you next time