Skip to content

Integration figama #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Integration figama #311

wants to merge 2 commits into from

Conversation

fak111
Copy link
Collaborator

@fak111 fak111 commented May 3, 2025

🏷️ Ticket

issue

πŸ“ Description

1. FIGMA GET COMMENTS IN A FILE

Function Name: FIGMA__GET_COMMENTS

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_COMMENTS --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get all comments in Figma design file NomNyeXQFPZCx3ujlC4Mch"

2. FIGMA GET STYLE

Function Name: FIGMA__GET_FILE_NODES (with focus on style nodes)

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_FILE_NODES --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get detailed information about style nodes 1:4 and 1:58 in Figma design file NomNyeXQFPZCx3ujlC4Mch"

3. FIGMA GET VERSIONS OF A FILE

Function Name: FIGMA__GET_FILE_VERSIONS

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_FILE_VERSIONS --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get version history for Figma file NomNyeXQFPZCx3ujlC4Mch"

4. FIGMA GET ACTIVITY LOGS

Function Name: FIGMA__GET_ACTIVITY_LOGS

⚠️ Note: Requires upgraded Figma Organization plan to access activity logs.
So, this functionality is not currently supported.


5. FIGMA GET IMAGE FILLS

Function Name: FIGMA__GET_IMAGE_FILLS

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_IMAGE_FILLS --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get all image fills in Figma file WhkhgvahX5hwn3yyR2C7XP"

6. FIGMA GET COMPONENT

Function Name: FIGMA__GET_FILE_NODES (with focus on component nodes)

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_FILE_NODES --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get detailed information about component nodes 1:181 and 1:42 in Figma design file NomNyeXQFPZCx3ujlC4Mch"

7. FIGMA GET FILE COMPONENT SETS

Function Name: FIGMA__GET_FILE_COMPONENT_SETS

docker compose exec runner python -m aci.cli.aci fuzzy-test-function-execution --function-name FIGMA__GET_FILE_COMPONENT_SETS --linked-account-owner-id 123 --aci-api-key 252856b88f5b251bab0f11b06238628a80347c58677a42d410db8a2271d92ebb --prompt "Get component sets from Figma design file NomNyeXQFPZCx3ujlC4Mch"

πŸ“Έ Screenshots (if applicable)

notion link has Screenshots

βœ… Checklist

  • [βœ… ] I have signed the Contributor License Agreement (CLA) and read the contributing guide (required)
  • [βœ…] I have linked this PR to an issue or a ticket (required)
  • [βœ… ] I have updated the documentation related to my change if needed
  • [βœ… ] I have updated the tests accordingly (required for a bug fix or a new feature)
  • [βœ… ] All checks on CI passed

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added new API endpoints for Figma integration, including the ability to retrieve file comments, image fills, and component sets. These enhancements provide broader access to Figma file data and functionality.

Copy link

vercel bot commented May 3, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
aci-dev-portal βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback May 3, 2025 4:57pm

Copy link
Contributor

coderabbitai bot commented May 3, 2025

Walkthrough

The changes add three new public REST API function definitions to the Figma backend's functions JSON. These new endpoints provide access to retrieve comments, image fills, and component sets from Figma files. Each function is fully specified with HTTP method, endpoint path, required parameters, and descriptions. No existing functions were modified or removed.

Changes

File(s) Change Summary
backend/apps/figma/functions.json Added three new public REST API function definitions: FIGMA__GET_COMMENTS, FIGMA__GET_IMAGE_FILLS, and FIGMA__GET_FILE_COMPONENT_SETS, each with detailed parameters and descriptions.

Possibly related issues

Poem

πŸ‡βœ¨
New endpoints hop into view,
Comments, images, sets anew.
From Figma files, data flows,
The rabbit’s API garden grows.
Fetch and fill with joyful cheer,
CodeRabbit’s magic, crystal clear!
🌿🐰


πŸ“œ Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 1d3e461 and 1cc1b56.

πŸ“’ Files selected for processing (1)
  • backend/apps/figma/functions.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/apps/figma/functions.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Compose Tests
  • GitHub Check: Format & Lint
  • GitHub Check: Format, Lint, and Test

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
backend/apps/figma/functions.json (1)

591-636: Verify component-sets endpoint and naming
The new FIGMA__GET_FILE_COMPONENT_SETS uses /v1/files/{file_key}/component_sets, but the official Figma API exposes components via /v1/files/{file_key}/components. Please confirm that /component_sets is a valid endpoint.
Also consider renaming to FIGMA__GET_FILE_COMPONENTS for consistency with existing naming conventions.

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 0b43e81 and 1d3e461.

πŸ“’ Files selected for processing (1)
  • backend/apps/figma/functions.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Format & Lint
  • GitHub Check: Format, Lint, and Test
  • GitHub Check: Compose Tests
πŸ”‡ Additional comments (3)
backend/apps/figma/functions.json (3)

364-410: Well-formed GET_COMMENTS endpoint
The new FIGMA__GET_COMMENTS definition correctly follows the established pattern (HTTP method, path parameters, visibility, and additionalProperties: false). It’s properly tagged and documented.


545-590: GET_IMAGE_FILLS looks good
The FIGMA__GET_IMAGE_FILLS endpoint on /v1/files/{file_key}/images is correctly declared, with required path parameters and no unexpected properties.


364-636: PR summary discrepancy: missing ACTIVITY_LOGS
The PR description mentions a FIGMA__GET_ACTIVITY_LOGS function, but no such declaration appears in this JSON. Please clarify whether that integration was omitted or should be added here.

Likely an incorrect or invalid review comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant