Repository navigation
DON-3917 Add Loyalty style to Backpack Badge - #2853
Conversation
…enshots - Add trailing commas to the new Loyalty badge entries for ktlint consistency - Move bpk-foundations-android back to devDependencies with a caret range, matching the convention used by every prior foundations bump - Fix a truncated version field in package.json - Record missing Roborazzi baselines for the Loyalty badge type Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 (1)
What changed in this PR
This PR adds a new “Loyalty” badge style to the Compose BpkBadge, backed by a newly introduced statusLoyaltySpot semantic color token (and bumps foundations to pick up the token).
Changes:
- Bump
@skyscanner/bpk-foundations-androidto^24.9.0to consumestatusLoyaltySpot. - Introduce
statusLoyaltySpotinto Backpack color token surfaces (Compose + resource XML + lint token map). - Add
BpkBadgeType.Loyaltyand wire its content/background colors in the Compose badge implementation.
| File | Description |
|---|---|
| package.json | Updates foundations version to include the new loyalty token. |
| backpack-lint/.../GeneratedColorTokenMap.kt | Adds lint mapping for the new semantic color token. |
| backpack-compose/.../tokens/BpkColors.kt | Adds statusLoyaltySpot to the Compose theme color set. |
| backpack-compose/.../badge/internal/BpkBadgeImpl.kt | Applies loyalty colors in Compose badge rendering. |
| backpack-compose/.../badge/BpkBadge.kt | Adds Loyalty to the public badge type enum. |
| backpack-common/.../values/backpack.semantic.color.xml | Adds bpkStatusLoyaltySpot light resource. |
| backpack-common/.../values-night/backpack.semantic.color.xml | Adds bpkStatusLoyaltySpot night resource. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Outline, | ||
| Brand, | ||
| Subtle, | ||
| Loyalty, | ||
| } |
There was a problem hiding this comment.
Think this is fine as in implementation, but will be aware when upgrading in the main app.
npm install locally rewrote resolved tarball URLs for color, color-convert, color-name, color-string and the bpk-foundations packages to the Skyscanner artifactory mirror. CI can't fetch color-string from there (403), so point everything back at registry.npmjs.org for now. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Generated by 🚫 Danger Kotlin against fa7b5d1 |

Summary
@skyscanner/bpk-foundations-androidto 24.9.0 to pick up the newstatusLoyaltySpottokenLoyaltystyle to the ComposeBpkBadge(background:statusLoyaltySpot, content:textOnLight)devDependencieswith a caret range, matching the convention used by every prior foundations bumpLoyaltybadge variant (default + dark mode)Notes
BpkBadgeis intentionally not updated — it's being sunsetted, so no new styles are added to it.borderColor/iconColorforLoyaltyfall through existingelsebranches (transparent border, content color for icon tint), consistent with the other non-outline badge types.Test plan
./gradlew app:recordRoborazziOssDebug -Dvariant={default,dm}run forBpkBadgeTest(Compose) — newLoyaltybaselines committed, no other snapshots touched./gradlew :app:detekt(pre-commit hook) passes🤖 Generated with Claude Code