Skip to content

[SR-473] Rename promo sticker component and add docs#334

Open
adi-gnm wants to merge 14 commits intomainfrom
ab/promo-sticker-component
Open

[SR-473] Rename promo sticker component and add docs#334
adi-gnm wants to merge 14 commits intomainfrom
ab/promo-sticker-component

Conversation

@adi-gnm
Copy link
Member

@adi-gnm adi-gnm commented Feb 13, 2026

Description

  1. Renamed SourceBadge to PromoSticker to match the nomenclature used by the design system (see linked Figma).
  2. Added documentation page for PromoSticker
  3. Updated documentation page for Button to add dark mode previews
  4. Few more tweaks to documentation

Figma: Figma

Ticket: Trello

Checklist

  • Changes have been checked by the developer
  • Changes have been checked by the reviewers
  • Unit tested

@adi-gnm adi-gnm requested a review from a team as a code owner February 13, 2026 15:41
Copilot AI review requested due to automatic review settings February 13, 2026 15:41
@adi-gnm adi-gnm added documentation Improvements or additions to documentation maintenance Departmental tracking: maintenance work, not a fix or a feature labels Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the Android UI component previously called SourceBadge to PromoSticker to align with the design system naming, and updates associated documentation, previews, and snapshot tests.

Changes:

  • Introduces PromoSticker (new package/name) and updates previews/tests to use it.
  • Adds PromoSticker documentation and refreshes existing docs (Buttons dark mode previews, Pager docs restructuring).
  • Updates sample app navigation/preview wiring and snapshot outputs.

Reviewed changes

Copilot reviewed 9 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
android/source/src/main/kotlin/com/gu/source/components/promosticker/PromoSticker.kt Renames/relocates the component and its enums under promosticker.
android/source/src/main/kotlin/com/gu/source/components/promosticker/README.md Adds component docs and usage examples for PromoSticker.
android/source/src/test/kotlin/com/gu/source/components/badge/PromoStickerTest.kt Updates Paparazzi snapshot test to render PromoSticker previews.
android/source/src/test/snapshots/images/com.gu.source.components.badge_PromoStickerTest_badge[NOTNIGHT].png Adds/updates snapshot output for PromoSticker (light).
android/source/src/test/snapshots/images/com.gu.source.components.badge_PromoStickerTest_badge[NIGHT].png Adds/updates snapshot output for PromoSticker (dark).
android/source/src/test/snapshots/images/com.gu.source.components.badge_PromoStickerTest_longBadge[NOTNIGHT].png Adds/updates long-text snapshot output for PromoSticker (light).
android/source/src/test/snapshots/images/com.gu.source.components.badge_PromoStickerTest_longBadge[NIGHT].png Adds/updates long-text snapshot output for PromoSticker (dark).
android/source/src/main/kotlin/com/gu/source/components/buttons/README.md Updates Buttons docs table to show light/dark previews.
android/source/src/main/kotlin/com/gu/source/components/pager/README.md Reorders/expands pager docs and adds a PagerProgressBar section.
android/sample/src/main/kotlin/com/gu/source/previews/PromoStickerPreview.kt Updates the sample preview to use PromoSticker APIs.
android/sample/src/main/kotlin/com/gu/source/MainActivity.kt Updates sample sheet navigation and labels to point at PromoSticker.
android/source/detekt-baseline.xml Adjusts baseline entries to reflect new PromoSticker enums.
android/README.md Adds Promo stickers section and updates pager list formatting.
Comments suppressed due to low confidence (5)

android/source/src/main/kotlin/com/gu/source/components/promosticker/PromoSticker.kt:127

  • The KDoc param descriptions still talk about "badge" and there’s a dangling [TextOverflow.Ellipsis]. line after removing the overflow params. Please either document the fixed behavior (maxLines=1, ellipsis) in prose or reintroduce the params so the KDoc is accurate.
    android/source/src/main/kotlin/com/gu/source/components/promosticker/PromoSticker.kt:132
  • Renaming/removing the public SourceBadge API in favor of PromoSticker is a breaking change for any downstream consumers. Consider keeping deprecated wrappers/aliases (delegating to PromoSticker) for at least one release to provide a migration path.
    android/source/src/main/kotlin/com/gu/source/components/promosticker/PromoSticker.kt:121
  • KDoc still describes this as a "badge" and links to the Supporter Revenue Toolkit design spec, which doesn’t match the new PromoSticker naming/docs. Please update the summary text and link to the correct PromoSticker spec (e.g., the Apps library Figma used elsewhere in this PR).
    android/source/src/main/kotlin/com/gu/source/components/pager/README.md:56
  • Minor grammar issue: "It provides a options" should be "It provides options" (or "It provides an option").
`PagerProgressIndicator` is a lower level component used to signify progress in a pager. It provides
a options for customising appearance of the indicators. See the [full API Docs here][1].

android/source/src/test/kotlin/com/gu/source/components/badge/PromoStickerTest.kt:5

  • This test is still in the components/badge folder and uses the com.gu.source.components.badge package, but it now snapshots PromoSticker. Consider moving/renaming the test to components/promosticker and updating the package so snapshot paths stay aligned with the component name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adi-gnm adi-gnm added the Android Android specific PRs label Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 17 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

android/source/src/main/kotlin/com/gu/source/components/promosticker/PromoSticker.kt:126

  • The documentation comment is incomplete. Line 126 contains orphaned text "[TextOverflow.Ellipsis]." that appears to be leftover from a previous version of the documentation when maxLines and textOverflow parameters existed. This line should be removed since these parameters no longer exist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

Android Android specific PRs documentation Improvements or additions to documentation maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant