Skip to content

DON-3926 Add Icon Bullet component - #2854

Open
RichSutherSky wants to merge 2 commits into
mainfrom
donburi/don-3926-add-icon-bullet-component
Open

RichSutherSky wants to merge 2 commits into
mainfrom
donburi/don-3926-add-icon-bullet-component

Conversation

@RichSutherSky

@RichSutherSky RichSutherSky commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new BpkIconBullet Compose 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 (statusLoyaltySpot fill, textOnLight icon), Strong (corePrimary fill, textOnDark icon), Brand (coreAccent fill, textPrimaryInverse icon).
  • Scaffolded with ./scripts/generate-component.py IconBullet iconbullet per CONTRIBUTING.md, then implemented against the "🚧 Bpk Icon Bullet v2" component in the Bpk – Sandbox Beta Figma file.
  • Demo story shows all 3×3 size/type combinations; README includes basic usage examples.

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)
  • Recorded local screenshots and visually diffed every size/type combo against the Figma reference (day + dark mode) — not committed, per CONTRIBUTING.md
  • CI will record the real Roborazzi baselines on this PR

🤖 Generated with Claude Code

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>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 12:32
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️

One or more component files were updated, but the docs screenshots weren't updated. If the changes are visual or it is a new component please regenerate the screenshots via ./gradlew recordScreenshots.

⚠️

One or more package files were created, but BpkComposeComponentUsageDetector.kt wasn't updated. If your component is an equivalent of a core component please add it to the detector.

Generated by 🚫 Danger Kotlin against 714bbce

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️

One or more component files were updated, but the docs screenshots weren't updated. If the changes are visual or it is a new component please regenerate the screenshots via ./gradlew recordScreenshots.

⚠️

One or more package files were created, but BpkComposeComponentUsageDetector.kt wasn't updated. If your component is an equivalent of a core component please add it to the detector.

Generated by 🚫 Danger Kotlin against 3d38e9a

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Medium severity · 1 Low severity

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 BpkIconBullet public API with BpkIconBulletSize and BpkIconBulletType enums.
  • 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.

Comment on lines +51 to +57
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),
@RichSutherSky RichSutherSky added the minor A new & backwards compatible feature/component label Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor A new & backwards compatible feature/component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants