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 nameotherfoo.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 nameotherfoo.bar
- Right click the group
foo
and click Rename. - Enter
otherfoo
.
This should show a warning and disable the Submit input.