tokens-studio / figma-plugin

Official repository of the plugin 'Tokens Studio for Figma' (Figma Tokens)

Home Page:https://www.figma.com/community/plugin/843461159747178978

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.0: Make sure `Rename token group` and `Duplicate token group` cannot share name with an existing token group

six7 opened this issue · comments

Right now when you right click a token group and you click Duplicate or Rename, we allow users to enter an existing token group's name. This should be strictly forbidden as it will lead to unintended side-effects. Just like when you edit a token name you cannot enter an existing token group name, we should make it so that for renaming or duplicating groups this is not possible.

To reproduce:

  • Create a token with a name foo.bar and another token with a name otherfoo.bar
  • Right click the group foo and click Duplicate.
  • Enter otherfoo.

This should show a warning and disable the Submit input.

Same as for rename:
To reproduce:

  • Create a token with a name foo.bar and another token with a name otherfoo.bar
  • Right click the group foo and click Rename.
  • Enter otherfoo.

This should show a warning and disable the Submit input.

CleanShot.2024-05-20.at.14.34.15.mp4