-
Notifications
You must be signed in to change notification settings - Fork 34
Integrating Figma code connect + mapping first 10 components #2369
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]>
c685eab to
d7dc382
Compare
Generated by 🚫 Danger Kotlin against 1e19046 |
| active: true | ||
| ModifierMissing: | ||
| active: true | ||
| excludes: ['**/*.figma.kt'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compost 😆
| secrets: | ||
| GH_APP_PRIVATE_KEY: | ||
| required: true | ||
| FIGMA_ACCESS_TOKEN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been added to the secrets? Who owns it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its in the backpack android Github secretes yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look fragile at all! 🙀

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