Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c5a047b
figma code connect
krizoulokmane Aug 4, 2025
c8f647c
upgrade to kotlin 2.2
krizoulokmane Aug 5, 2025
3efed85
Update file naming conventions for Figma Code Connect integration
krizoulokmane Sep 24, 2025
de1316f
Add Figma Code Connect integration for BpkButton, BpkCard, and BpkTex…
krizoulokmane Sep 24, 2025
947015e
Add CI/CD integration for Figma Code Connect validation and publishing
krizoulokmane Sep 24, 2025
83b4e5d
Refactor Figma Code Connect commands to use updated syntax
krizoulokmane Sep 24, 2025
7bd7a63
test publish
krizoulokmane Sep 24, 2025
cdfd4b8
add dependency
krizoulokmane Sep 24, 2025
db367e4
add dependency
krizoulokmane Sep 24, 2025
e2a976c
add dependency
krizoulokmane Sep 24, 2025
3e0f565
update position of figma files
krizoulokmane Sep 26, 2025
d7dc382
Update Backpack Card node link
LokmaneKrizou Oct 13, 2025
30bf96e
Refactor Figma Code Connect integration and update configuration
krizoulokmane Dec 8, 2025
1e19046
add reminder of components
krizoulokmane Dec 9, 2025
8f69aff
add reminder of components
krizoulokmane Dec 9, 2025
aee01c4
Copyright 2018 - 2025 Skyscanner Ltd
krizoulokmane Dec 9, 2025
3cdd55d
Merge branch 'main' into donburi/figma_connect
LokmaneKrizou Dec 9, 2025
e6d8ae2
fix screenshott testing failure
krizoulokmane Dec 9, 2025
f863118
fix ci and add chip group and cardlist
krizoulokmane Dec 11, 2025
78e1494
Merge branch 'main' into donburi/figma_connect
LokmaneKrizou Dec 11, 2025
4a60a41
use most up to date version
krizoulokmane Dec 11, 2025
b5280a3
rename
krizoulokmane Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .detekt-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Compose:
active: true
ModifierMissing:
active: true
excludes: ['**/*.figma.kt']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

those compostables are place holders to display snippet code in figma

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

compost 😆

ModifierNaming:
active: true
ModifierNotUsedAtRoot:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ name: Build

on:
workflow_call:
inputs:
figma_enabled:
required: false
type: boolean
default: false
secrets:
GH_APP_PRIVATE_KEY:
required: true
FIGMA_ACCESS_TOKEN:
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

required: false


defaults:
Expand Down Expand Up @@ -105,6 +112,32 @@ jobs:
- name: Unit Tests
run: ./gradlew test${{ env.flavour }}${{ env.config }}UnitTest -PdisablePreDex

- name: Check for Code Connect changes
id: code-connect-filter
if: ${{ inputs.figma_enabled }}
uses: dorny/paths-filter@v3
with:
token: ${{ steps.app-token.outputs.token }}
filters: |
code_connect:
- 'app/src/main/java/net/skyscanner/backpack/demo/figma/**'
- 'figma.config.json'

- name: Install Figma Code Connect
if: ${{ inputs.figma_enabled && steps.code-connect-filter.outputs.code_connect == 'true' }}
continue-on-error: true
run: npm install -g @figma/[email protected]

- name: Validate Code Connect files
if: ${{ inputs.figma_enabled && steps.code-connect-filter.outputs.code_connect == 'true' }}
continue-on-error: true
run: |
echo "🔍 Found Code Connect files, validating..."
npx figma connect parse
npx figma connect publish --dry-run
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}

Android:
name: Android tests
runs-on: ubuntu-24.04-16cores-public
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
pull-requests: write
contents: write
uses: ./.github/workflows/_build.yml
with:
figma_enabled: true
secrets:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}

Dependabot:
runs-on: ubuntu-24.04-16cores-public
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ jobs:
pull-requests: write
contents: write
uses: ./.github/workflows/_build.yml
with:
figma_enabled: true
secrets:
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}

Deploy:
name: Deploy
Expand Down Expand Up @@ -81,6 +84,38 @@ jobs:
- name: Update Supernova docs
run: npx @supernovaio/cli publish-documentation --apiKey=${{ secrets.SUPERNOVA_API_KEY }} --designSystemId=${{ secrets.SUPERNOVA_DESIGN_SYSTEM_ID }}

- name: Check for Code Connect changes
id: code-connect-filter
run: |
# Get the previous tag
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$PREVIOUS_TAG" ]; then
echo "No previous tag found, will publish Code Connect"
echo "code_connect_changed=true" >> $GITHUB_OUTPUT
else
# Check if any Code Connect files changed since the previous tag
CHANGED=$(git diff --name-only $PREVIOUS_TAG HEAD -- 'app/src/main/java/net/skyscanner/backpack/demo/figma/' 'figma.config.json' | wc -l)
if [ "$CHANGED" -gt 0 ]; then
echo "Code Connect files changed since $PREVIOUS_TAG"
echo "code_connect_changed=true" >> $GITHUB_OUTPUT
else
echo "No Code Connect files changed since $PREVIOUS_TAG"
echo "code_connect_changed=false" >> $GITHUB_OUTPUT
fi
fi

- name: Install Figma Code Connect
if: steps.code-connect-filter.outputs.code_connect_changed == 'true'
continue-on-error: true
run: npm install -g @figma/[email protected]

- name: Publish Code Connect to Figma
if: steps.code-connect-filter.outputs.code_connect_changed == 'true'
continue-on-error: true
run: npx figma connect publish --exit-on-unreadable-files
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}

- name: Publish release to Runway
run: |
set -e
Expand All @@ -89,3 +124,4 @@ jobs:
RUNWAY_API_KEY: ${{ secrets.RUNWAY_API_KEY }}
RUNWAY_APP_ID: ${{ secrets.RUNWAY_APP_ID }}
RUNWAY_BUCKET_ID: ${{ secrets.RUNWAY_BUCKET_ID }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,4 @@ backpack-compose/src/main/res/raw/compose_components.txt
/.idea/copilot.data.migration.ask2agent.xml
/.idea/copilot.data.migration.edit.xml
/.idea/markdown.xml
/tmp/
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

plugins {
alias(libs.plugins.compose.compiler)
alias(libs.plugins.figma.code.connect)
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -109,6 +110,7 @@ dependencies {
implementation libs.compose.activity
implementation libs.kotlin.reflection
implementation libs.destinations.core
implementation libs.figma.code.connect
testImplementation libs.test.junit
testImplementation libs.roborazzi.compose
testImplementation libs.roborazzi.core
Expand Down
Loading
Loading