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

Add Living Documentation Generation as a Core Plugin Feature

Open Copilot opened this issue 9 months ago • 2 comments

Overview

This PR adds a new core feature to generate Living Documentation directly within the Tokens Studio for Figma plugin. Users can now generate visual documentation for their design tokens without relying on external scripts like Automator, which were breaking due to Figma's recent changes to plugin API data limits.

Features

  • New option in the Tools dropdown menu
  • Modal interface to configure documentation generation
  • Ability to include all token sets or select specific ones
  • Choice between grid or list layout for documentation
  • Visual representation of different token types (colors, spacing, borders, etc.)
  • Error handling and progress feedback

Implementation Details

  • Creates a documentation frame in Figma with components for each token
  • Shows token names, values, descriptions, and visual representations
  • Properly handles the compressed/chunked data format
  • Works with token aliases and resolves them to their actual values
  • Supports different token types with appropriate visualizations

Screenshot

No screenshot included as this is a code-only PR

How to Test

  1. Open Tokens Studio plugin in Figma
  2. Click the Tools dropdown (folder icon)
  3. Select "Generate Living Documentation"
  4. Configure options and click "Generate Documentation"
  5. A new frame with token documentation will be created in your Figma file

Fixes #3355.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar May 22 '25 17:05 Copilot

⚠️ No Changeset found

Latest commit: 2a2b2af4522417de5914454bfe87d3b9584ab167

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 22 '25 17:05 changeset-bot[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar May 22 '25 17:05 sonarqubecloud[bot]