Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unusual Remapping (Renaming) Behaviour #2338

Open
keeganedwin opened this issue Oct 27, 2023 · 4 comments · Fixed by #2425
Open

Unusual Remapping (Renaming) Behaviour #2338

keeganedwin opened this issue Oct 27, 2023 · 4 comments · Fixed by #2425
Assignees
Labels

Comments

@keeganedwin
Copy link
Collaborator

keeganedwin commented Oct 27, 2023

Describe the bug
When remapping (changing path name) certain tokens, they usually get added to other token-types. I was editing my Font type tokens, deleting and remapping to typography. When I checked the inspect tab to double check the tokens applied, the font+typography naming where prefixed with the padding tokens.

Here is the used-case of a user facing the same issue:

For example, in the dimension tokens of a component I had the tokens:
idm-comp.table-header.item.inset.sm
idm-comp.table-header.item.inset.md
I subgrouped the group "item" again by adding .screen-lg. Now - idm-comp.table-header.screen-lg.item.inset.sm
After that this, the new subgroup was added to some mapping-links like color and borderwidth, borderradius, and not in the token names itself but in the mapping link which I can see in the inspect view.
So I had to remove the screen-lg in this mapping-links to correct it.

Expected behavior
Plugin shouldn't remap tokens into other token-types.

Screenshots or Screencasts
I have annotated the groups and the incorrect prefixed token names in Red

CleanShot 2023-10-27 at 13 08 33@2x

User screenshots:
Screenshot 2023-10-27 at 10 28 34 AM
Screenshot 2023-10-27 at 10 33 17 AM

User Recording:
User renames one group from Utrecht to Todo, but upon confirming the remap process all other tokens are renamed as well
https://github.com/tokens-studio/figma-plugin/assets/93133012/e70e95d2-275e-43ef-b073-b4f1db7efee5

@keeganedwin keeganedwin added the bug Something isn't working label Oct 27, 2023
@keeganedwin keeganedwin changed the title Unusual Remapping Behaviour Unusual Remapping (Renaming) Behaviour Nov 29, 2023
@keeganedwin keeganedwin moved this from 📥 Triage to 📤 Ready for dev in Tokens Studio for Figma Roadmap Dec 4, 2023
@robinhoodie0823 robinhoodie0823 moved this from 📤 Ready for dev to 🕜 In Progress in Tokens Studio for Figma Roadmap Dec 7, 2023
@robinhoodie0823 robinhoodie0823 linked a pull request Dec 13, 2023 that will close this issue
@robinhoodie0823 robinhoodie0823 moved this from 🕜 In Progress to 👀 Needs review in Tokens Studio for Figma Roadmap Dec 13, 2023
@github-project-automation github-project-automation bot moved this from 👀 Needs review to ✅ Done in Tokens Studio for Figma Roadmap Dec 13, 2023
@keeganedwin
Copy link
Collaborator Author

This bug seems to be back. If via the JSON editor I:

  1. Rename the group from utrecht. to todo..
  2. Save json
  3. Apply to page to update the references
  4. See error

In the inspect panel I can see they haven't remapped and that I have to manually remap them from utrecht. to todo.

CleanShot.2024-04-29.at.16.24.57.mp4

Test file

@keeganedwin keeganedwin reopened this Apr 29, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 👀 Needs review in Tokens Studio for Figma Roadmap Apr 29, 2024
@keeganedwin
Copy link
Collaborator Author

This is reproducible as of rc10

@keeganedwin
Copy link
Collaborator Author

@six7 still present in 2.2.1.

@six7
Copy link
Collaborator

six7 commented Dec 13, 2024

@keeganedwin I dont understand the issue description, can you try to rephrase or create a 1min video explaining it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 👀 Needs review
Development

Successfully merging a pull request may close this issue.

3 participants