Is it safe to switch between imported components?

@chungwu Is it safe to switch between imported projects?

We have a separate project including all “design system” things, such as colors, fonts, components, etc. We are about to do a style update, and the preferred approach is to copy the design system into a “v2”, make changes in v2, then swap the import of the old design system project with the new one.

We first included the new design system project, having both v1 and v2 imported at the same time. When trying to delete v1, we got a message warning about a lot of dependencies that would be removed, however it does not look like they were actually removed.

Is this safe? Can I ignore that warning?

yeah; when you remove v1, all the dependencies that were still being used would be copied to the local project. So you end up with copies of components from v1.

Now you can “swap” instances of those components with components from v2. You can right-click on a component, and select “Replace all instances with…” and pick the corresponding v2 component.

• Components: Ok, this works.
• What about style tokens?
◦ The only option is to delete the now-local tokens, and the error message says the styles will now be hard-coded
• What about fonts?
• What about default styles?
• …

For style tokens, unfortunately we don’t have something equivalent. You can right-click and “Find references to this token” but you’ll only get component-level references :confused:

For default styles, you can go to the Theme tab on the left and switch to using a different imported project’s default styles.

@chungwu thank you. The switching strategy won’t work in that case. I’ll do it another way.