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

Add Living Documentation Generation as a Core Plugin Feature

Open six7 opened this issue 9 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, users are experiencing issues with the Automator script method for generating Living Documentation for design tokens. Since Figma's recent changes to plugin API data limits, the Automator script cannot read the newly compressed and chunked shared plugin data, resulting in ghost cards (cards with only placeholder values) or missing documentation for some tokens. Manual fixes are possible but tedious and error-prone, and the Automator method is becoming unreliable and hard to maintain. See [this Slack thread] for context:


Ghost cards in my Living Documentation! HEEELP! 😱 I've generated token documentation multiple times using this method without issues. But now, for the first time, I'm seeing some ghost cards mixed in with the properly filled ones. These cards contain only the initial placeholder values and haven't been overridden by the script: __tokenName __tokenValue __value __description

As of this week, Figma started enforcing a data limit on plugin API calls. The Tokens Studio team worked around this by compressing and chunking the data. However, Automator hasn't been updated in a couple of years now, and can't read the new compressed data. This causes missing or broken documentation cards, which has to be fixed manually.

A workaround is to select the doc component instances and press 'Apply to selection' multiple times, but this is not ideal or scalable for larger projects.

Describe the solution you'd like

Move the Living Documentation generation feature (similar to what Automator provided) into Tokens Studio's Figma plugin as a core feature. This would allow users to automatically generate up-to-date documentation for their tokens directly within the plugin, without relying on external scripts that may break when Figma or the plugin changes. Ideally, this should also handle the new shared plugin data format and avoid ghost/empty cards.

Describe alternatives you've considered

  • Continue manually fixing missing or ghost cards in documentation (not scalable)
  • Attempting to update Automator script (difficult, as it does not support compressed/chunked data)
  • Reverting to old plugin versions (not reliable)

Additional context

  • Slack discussion reference: [summarized above]
  • Docs: https://docs.tokens.studio/open-source/shared-data
  • This feature would add significant value, especially for Pro plan users and teams using Living Documentation for tokens.

six7 avatar May 19 '25 07:05 six7