Repository navigation
DON-3926 Add Icon Bullet component - #2854
RichSutherSky wants to merge 2 commits into
Conversation
Renders a single icon inside a filled circular container, in three sizes (Small/Medium/Large, 16/32/48dp with the icon always at half that size) and three color types (Loyalty, Strong, Brand), matching the "Bpk Icon Bullet v2" spec in the Bpk - Sandbox Beta Figma file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Generated by 🚫 Danger Kotlin against 714bbce |
Generated by 🚫 Danger Kotlin against 3d38e9a |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds a new Backpack Compose BpkIconBullet component with size/type variants, plus demo and snapshot coverage.
Changes:
- Introduced
BpkIconBulletpublic API withBpkIconBulletSizeandBpkIconBulletTypeenums. - Implemented internal rendering (circular filled container + tinted icon) and type-to-theme color mapping.
- Added demo story, documentation, and parameterized snapshot tests covering all size/type combinations in light/dark mode.
| File | Description |
|---|---|
| docs/compose/IconBullet/README.md | New component docs with usage examples and screenshots. |
| backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/iconbullet/BpkIconBullet.kt | Public composable API plus Size/Type enums. |
| backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/iconbullet/internal/BpkIconBulletImpl.kt | Internal implementation: layout, sizing logic, and theme color mapping. |
| app/src/main/java/net/skyscanner/backpack/demo/compose/IconBulletStory.kt | Demo story rendering the 3×3 grid of size/type variants. |
| app/src/main/java/net/skyscanner/backpack/demo/components/IconBulletComponent.kt | Storybook component marker for IconBullet. |
| app/src/test/java/net/skyscanner/backpack/compose/iconbullet/BpkIconBulletTest.kt | Parameterized snapshot tests for all variants in default and dark mode. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| BpkIcon( | ||
| icon = icon, | ||
| contentDescription = null, | ||
| size = size.iconSize, | ||
| tint = type.contentColor, | ||
| modifier = Modifier.scale(size.iconScale), | ||
| ) |
| contentDescription = null, | ||
| size = size.iconSize, | ||
| tint = type.contentColor, | ||
| modifier = Modifier.scale(size.iconScale), |


Summary
BpkIconBulletCompose component: a single Backpack icon rendered inside a filled circular container.BpkIconBulletSize:Small(16dp),Medium(32dp),Large(48dp) — icon is always rendered at half the container size.BpkIconBulletType:Loyalty(statusLoyaltySpotfill,textOnLighticon),Strong(corePrimaryfill,textOnDarkicon),Brand(coreAccentfill,textPrimaryInverseicon)../scripts/generate-component.py IconBullet iconbulletperCONTRIBUTING.md, then implemented against the "🚧 Bpk Icon Bullet v2" component in the Bpk – Sandbox Beta Figma file.Scope
This covers the Android half of DON-3926. iOS and the eventual Backpack release/version bump are tracked separately.
Test plan
./gradlew :backpack-compose:compileDebugKotlin :app:compileOssDebugKotlin :app:compileOssDebugUnitTestKotlin— builds clean./gradlew :backpack-compose:detekt :app:detekt— passes./gradlew app:testOssDebugUnitTest --tests "net.skyscanner.backpack.compose.iconbullet.*"— passes (default + dark mode, all 9 size/type combos)CONTRIBUTING.md🤖 Generated with Claude Code