Skip to content

Attach a Figma design to a GitLab issue from the widget #24

Description

@jnwrnr

User story

As a Product Manager / designer working in Figma, I have a GitJam card that shows a GitLab issue on my design file. I want to attach one of my frames (or a selected node) to that issue so the design is linked to the work item without leaving Figma.

Scope

  • Runs in Figma Design (not FigJam) – manifest editorType has to include "figma".
  • Trigger: a new action on the card ("Attach selection" button, or a dedicated button inside the card body).
  • User flow:
    1. User selects one or more frames in the Figma file.
    2. User clicks 'Attach selection' on the card.
    3. Widget exports each selected frame as PNG via figma.exportAsync().
    4. Widget POSTs the image(s) to GitLab as an attachment, then appends a description edit (or a comment) linking the uploaded image.
  • Target endpoint: POST /projects/:id/uploads to upload, then PUT /projects/:id/issues/:iid or POST /projects/:id/issues/:iid/notes to reference the upload.

Prior art

'Add design' style widgets exist for Jira – they exhibit the same pattern.

Open questions

  • Should the widget attach to the issue description (PUT) or post as a new comment (POST /notes)? → recommend a new comment to avoid mangling curated descriptions.
  • How do we handle multiple selections? → one upload per frame, one comment that lists all links.
  • Does the same flow work for an epic card? Yes, epics accept notes via POST /groups/:id/epics/:iid/notes.

Acceptance criteria

  • Widget installable in both Figma Design and FigJam (editorType update).
  • 'Attach selection' action on issue cards in Figma Design.
  • Selection is exported as PNG and uploaded to the issue.
  • Attached image(s) appear in GitLab within a newly created comment.
  • Graceful error when no selection, when selection is empty, and on 401/403.
  • PAT scope requirement surfaced clearly (api scope, not only read_api).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions