material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
363 stars 28 forks source link

All 'Generate' options are broken #63

Closed PrattiDev closed 2 years ago

PrattiDev commented 2 years ago

Describe the bug All Generate options in the Figma plugin are now unusable.

To Reproduce Steps to reproduce the behavior:

  1. Go to Figma.
  2. Open any file, really. It can be an existing UI kit with the styles prefilled or an empty file. If it's an empty file, run the plugin once to populate styles.
  3. Go to Plugins > Material Theme Builder > Generate > (Any option)
  4. The plugin will crash and generate an empty text layer with the font set to Inter.

Expected behavior All options would generate the appropriate layers displaying the type of information the user selected, or generate the styles selected, in the case of Android Schemes, arguably the most important option, since those styles are not generated by default and are currently unreachable with the plugin.

Desktop (please complete the following information):

Additional context Here is the error message that appears for all Generate options.


message: "in set_characters: Cannot write to node with unloaded font \"Inter Regular\". Please call figma.loadFontAsync({ family: \"Inter\", style: \"Regular\" }) and await the returned promise first."
stack: "    at module$contents$google3$ux$material$theme_generator$figmaplugin$src$utils$utils_createLabel (PLUGIN_11_SOURCE:4343)\n    at module$contents$google3$ux$material$theme_generator$figmaplugin$src$utils$utils_createDefaultLabel (PLUGIN_11_SOURCE:4386)\n  ```
katriellucas commented 2 years ago

Can attest, I cannot generate any palettes after this update.

Neesher commented 2 years ago

Same, this plugin is unworkable in Figma. Issue seems to be that M3 theme is locked and not updated. Effect is that themes remain purple and only some parts of the components colors are updated.

PrattiDev commented 2 years ago

After the latest update, I can attest this has been fixed. It will not work on old versions of the UI kit unless adapted, as the token structure has been updated.