figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Users should Not be able to Import Styles with `.` as Grouping

Open keeganedwin opened this issue 3 years ago • 5 comments

Describe the bug When creating Figma styles and importing them to the plugin, users are unaware that the naming convention in Figma has to follow a Style/name format in order for the styles and tokens to sync.

To Reproduce:

  1. Create styles in Figma following the plugin naming convention style.name.
  2. Import styles, then change the reference of any style
  3. Token in plugin updates but style in Figma does not

Key Information: user created the style following the plugin's naming convention style.name, and on importing and changing the token reference from the plugin, the style in Figma would not update

https://user-images.githubusercontent.com/93133012/229492095-f9c66339-ede3-458a-874c-5aa9520aad6a.mov

Proposal: On importing styles the first screen should have a model informing that the correct naming conventions for the styles should be used in order to sync with the plugin Screenshot 2023-04-03 at 4 34 32 PM

And then proceed to the screen with the modal to import the type of styles:

Screenshot 2023-04-03 at 4 20 06 PM

keeganedwin avatar Apr 03 '23 11:04 keeganedwin

What if, instead, we'd

  • Only show this modal when there's . in the style names
  • Show this modal after picking which styles to import
  • Give the user an option to Rename styles from . to / and Cancel
    • Rename styles would rename the styles for the user and then import them
    • Cancel cancels and lets the user manually rename

six7 avatar Apr 06 '23 06:04 six7

Added to Featurebase Roadmap as a known issue to test and track with V2 beta testers - ❖ 🪄 Sync variables and styles is now Export to Figma

SamIam4Hyma avatar Apr 13 '24 18:04 SamIam4Hyma

@keeganedwin I'm not able to replicate this issue anymore in the V2beta build. Can you test please and if you also can't replace we can close this issue.

SamIam4Hyma avatar Apr 13 '24 18:04 SamIam4Hyma

@SamIam4Hyma @six7 I'm still able to replicate this in both Published 38.9 and rc8. Since the plugin imports style.1 and style.2 as a group, it has a different structure than the styles setup in Figma, and so if you try to create styles (sync does not work) it creates a color group called Style with 1 & 2.

keeganedwin avatar Jun 25 '24 10:06 keeganedwin