Skip to content

DON-3917 Add Loyalty style to Backpack Badge - #2853

Merged
RichSutherSky merged 2 commits into
mainfrom
donburi/don-3917-add-loyalty-style-to-badge
Oct 7, 2026
Merged

RichSutherSky merged 2 commits into
mainfrom
donburi/don-3917-add-loyalty-style-to-badge

Conversation

@RichSutherSky

Copy link
Copy Markdown
Contributor

Summary

  • Bumps @skyscanner/bpk-foundations-android to 24.9.0 to pick up the new statusLoyaltySpot token
  • Adds a new Loyalty style to the Compose BpkBadge (background: statusLoyaltySpot, content: textOnLight)
  • Keeps the dependency in devDependencies with a caret range, matching the convention used by every prior foundations bump
  • Records the missing Roborazzi baselines for the new Loyalty badge variant (default + dark mode)

Notes

  • The classic View-based BpkBadge is intentionally not updated — it's being sunsetted, so no new styles are added to it.
  • borderColor/iconColor for Loyalty fall through existing else branches (transparent border, content color for icon tint), consistent with the other non-outline badge types.

Test plan

  • ./gradlew app:recordRoborazziOssDebug -Dvariant={default,dm} run for BpkBadgeTest (Compose) — new Loyalty baselines committed, no other snapshots touched
  • ./gradlew :app:detekt (pre-commit hook) passes
  • CI screenshot verification run

🤖 Generated with Claude Code

…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>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:40

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

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-android to ^24.9.0 to consume statusLoyaltySpot.
  • Introduce statusLoyaltySpot into Backpack color token surfaces (Compose + resource XML + lint token map).
  • Add BpkBadgeType.Loyalty and 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.

Comment on lines 39 to 43
Outline,
Brand,
Subtle,
Loyalty,
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Think this is fine as in implementation, but will be aware when upgrading in the main app.

@RichSutherSky RichSutherSky added the minor A new & backwards compatible feature/component label Oct 7, 2026
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>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️ One or more component files were updated, but the tests weren't updated. If your change is not covered by existing tests please add snapshot tests.
⚠️

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 component files were updated, but README.md wasn't updated. If your change contains API changes/additions or a new component please update the relevant component README.

Generated by 🚫 Danger Kotlin against fa7b5d1

@RichSutherSky
RichSutherSky merged commit 7acfcd3 into main Oct 7, 2026
19 checks passed
@RichSutherSky
RichSutherSky deleted the donburi/don-3917-add-loyalty-style-to-badge branch October 7, 2026 12:22
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.

4 participants