Replacing Tokens seems to be broken

What are you trying to do? Replace tokens from an imported project from the tokens in the main project.

What are the reproduction steps?

  • Create new tokens in the main project that align with the tokens that you want replaced from the imported project.
  • Go to the imported project’s tokens
  • Right click the token that you want replaced
  • Select “Replace all usages of this token”
  • Click on the token that you’d like to use instead of the current token
  • Notice that nothing happens

I feel like the fix for this might have caused the main functionality to break

Relevant links:

I’m continue to troubleshoot this and found a bug.

Steps to reproduce:
Part 1

  • Duplicate a project (Core) and rename it (Set2: Core). This project has the core set of tokens in it; giving a key to the hex value (token name: red 100, token value: #FEF2F2) .
  • In Set2: Core, change a value of a token; for (Red 100 from FEF2F2 to #FDF9F9)

Part 2

  • Duplicate a project (Semantic) that has the Core project imported and rename it (Set2: Semantic). This project gives a semantic name to the core token (token name: Destructive Softer, token value: `red 1001)

Part 3 (in Set2: Semantic)

  • Collapse all the values
  • Expand the values of Core in the token tree to expose the tokens for the red value

Observe: This also expanded the tokens for the Set2: Core tokens to expose the red values of that project as well even though the user didn’t do anything to expand them.

Hey @alyssa_feola, operations (such as “replace all tokens”) in a project can’t affect other projects like this.