Integrating Figma code connect + mapping first 10 components#2369
Integrating Figma code connect + mapping first 10 components#2369Lokmane Krizou (LokmaneKrizou) wants to merge 22 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Figma Code Connect integration for Backpack Android components to bridge the gap between design and development. The integration enables automatic generation of accurate code snippets from Figma designs, improving the design-to-development handoff process.
- Updates Kotlin version from 2.1.20 to 2.0.0 for Figma Code Connect compatibility
- Adds comprehensive documentation for Figma Code Connect integration
- Implements Code Connect annotations for BpkButton, BpkText, and BpkCard components
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
gradle/libs.versions.toml |
Updates Kotlin/KSP versions and adds Figma Code Connect dependencies |
figma.config.json |
Configures Figma Code Connect parser settings for Compose |
figma-code-connect/*.md |
Comprehensive documentation covering setup, integration, examples, and best practices |
backpack-compose/src/main/kotlin/*/BpkTextCodeConnect.kt |
Implements 18 typography variant classes for text component |
backpack-compose/src/main/kotlin/*/BpkCardCodeConnect.kt |
Basic card component integration example |
backpack-compose/src/main/kotlin/*/BpkButtonCodeConnect.kt |
Four button variants (None, Left, Right, Icon only) with comprehensive property mapping |
backpack-compose/build.gradle |
Adds Figma Code Connect plugin and dependency |
Comments suppressed due to low confidence (1)
gradle/libs.versions.toml:2
- Kotlin version 2.0.0 is an older version that has known issues and has been superseded by more stable releases. Consider using a more recent stable version like 2.1.20 or the latest stable release.
kotlin = "2.0.0"
backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/card/BpkCard.figma.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/net/skyscanner/backpack/demo/figma/button/BpkButton.figma.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/net/skyscanner/backpack/demo/figma/button/BpkButton.figma.kt
Show resolved
Hide resolved
27c1d40 to
d37edc1
Compare
Generated by 🚫 Danger Kotlin against d37edc1 |
Generated by 🚫 Danger Kotlin against 7036a5b |
Generated by 🚫 Danger Kotlin against e269d9f |
e269d9f to
1034659
Compare
Generated by 🚫 Danger Kotlin against 1034659 |
Generated by 🚫 Danger Kotlin against 4b50e3b |
Generated by 🚫 Danger Kotlin against fa89564 |
Generated by 🚫 Danger Kotlin against 2496c15 |
Generated by 🚫 Danger Kotlin against 20cd6ec |
Co-authored-by: Copilot <Copilot@github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <Copilot@github.com>
c685eab to
d7dc382
Compare
Generated by 🚫 Danger Kotlin against 1e19046 |
| active: true | ||
| ModifierMissing: | ||
| active: true | ||
| excludes: ['**/*.figma.kt'] |
| secrets: | ||
| GH_APP_PRIVATE_KEY: | ||
| required: true | ||
| FIGMA_ACCESS_TOKEN: |
There was a problem hiding this comment.
Has this been added to the secrets? Who owns it?
There was a problem hiding this comment.
its in the backpack android Github secretes yes
There was a problem hiding this comment.
Yes but whose figma account generated it?
|
|
||
| @FigmaProperty(FigmaType.Enum, "Style") | ||
| val type: BpkButtonType = Figma.mapping( | ||
| "Primary" to BpkButtonType.Primary, |
There was a problem hiding this comment.
I feel like we're missing a single source of truth for this, would that be something Supernova could do?
| "app/src/main/java/net/skyscanner/backpack/demo/figma/**/*.figma.kt" | ||
| ], | ||
| "documentUrlSubstitutions": { | ||
| "FIGMA_BUTTON": "https://www.figma.com/design/KXf2gHNLDe2cXWUoHl4cTX/Backpack%E2%80%A8Foundations---Components?node-id=10858-8677", |
There was a problem hiding this comment.
This doesn't look fragile at all! 🙀
|
Closing this as we need to have proper setup for Figma integration other than using personal Key |

This pull request introduces integration with Figma Code Connect for several Backpack Compose components, enabling automated documentation and validation workflows. It adds Figma Code Connect configuration, updates CI/CD workflows to support Figma-related checks and publishing, and implements
.figma.ktfiles for multiple UI components. The changes are grouped into build system/workflow updates and new component documentation files.Build System and Workflow Integration:
app/build.gradleto enable Figma integration. [1] [2].detekt-compose.ymlto exclude.figma.ktfiles from theModifierMissingrule, preventing unnecessary linting errors._build.yml,pr.yml, andrelease.ymlGitHub Actions workflows to support Figma Code Connect:figma_enabledinput andFIGMA_ACCESS_TOKENsecret.Component Documentation and Figma Integration:
.figma.ktfiles for several Backpack Compose components, each annotated for Figma Code Connect. These files provide Figma-compatible documentation and mapping for properties and variants:BpkButtonwith multiple icon and style variants.BpkCardandBpkCardWrapper. [1] [2]BpkCarousel.BpkDividedCard.BpkDivider.BpkGraphicPromowith overlay, kicker, sponsor, and alignment properties.BpkLinkwith text and style mapping.Remember to include the following changes:
README.mdIf you are curious about how we review, please read through the code review guidelines