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

Swap button does not swap all the tokens #59

Closed pbutterworth closed 1 year ago

pbutterworth commented 2 years ago

Describe the bug When using the 'Swap' button to change themes, not all of the tokens are swapped.

To Reproduce

  1. Select some UI components that use a range of the colour tokens (the card example from Material 3 Design Kit for instance)
  2. Note that the initial theme is 'M3'. In the selection colors panel, all the colour styles are 'M3/...'
  3. Select a different theme in the plugin, and click 'Swap'
  4. Note in the selection colors panel, there is now a mixture of M3/... and [CustomTheme]/...

Expected behavior All the colour tokens should be swapped over to the selected theme

Screenshots

image image

Desktop (please complete the following information): Figma Desktop App version 112.2 macOS 12.1 plugin version 9

AnneKok commented 1 year ago

This is still an issue, from what I can tell if you select a layer and Swap, the swap fails on any layers that are component instances inside another component instance. I think that is a bug.

Quite problematic since the Material 3 design kit for Figma uses a lot of nested instances! So the plugin does not work on Material's own design kit elements...