Add id field to ButtonComponent#3377
Merged
Merged
Conversation
Adds an optional `id` field to `ButtonComponent` that matches the `id` key the backend sends for button components inside `components_config`. This id is the target for workflow step triggers (`component_id`) and will be used in a follow-up to dispatch multipage workflow navigation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tonidero
approved these changes
Apr 23, 2026
| @get:JvmSynthetic public val stack: StackComponent, | ||
| @get:JvmSynthetic public val transition: PaywallTransition? = null, | ||
| @get:JvmSynthetic public val name: String? = null, | ||
| @get:JvmSynthetic @SerialName("id") public val id: String? = null, |
Contributor
There was a problem hiding this comment.
Is the @SerialName needed here?
Member
Author
There was a problem hiding this comment.
I think it can be removed. I originally had identifier as the property name and it's a leftover
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3377 +/- ##
=======================================
Coverage 79.20% 79.20%
=======================================
Files 360 360
Lines 14437 14437
Branches 1982 1982
=======================================
Hits 11435 11435
Misses 2194 2194
Partials 808 808 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
matteinn
pushed a commit
to matteinn/purchases-android
that referenced
this pull request
Apr 28, 2026
…Cat#3380) > [!NOTE] > Stacked on top of RevenueCat#3377 (`ButtonComponent.id`). Base will update to `main` once that PR merges. ## Summary - Plumbs `componentId` through `ButtonComponentStyle`, populated from `ButtonComponent.id` in `StyleFactory`. - Tracks a `"workflow_trigger"` value as the component interaction event. - `InternalPaywall`'s action handler currently just logs. The actual dispatch to `PaywallViewModel.handleWorkflowAction` lands in the multipage-workflow wiring PR that depends on this one <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches paywall button action mapping and analytics tracking paths; misconfigured buttons (missing `componentId`) now fall back to `NavigateBack`, so behavior changes should be validated on real paywalls. > > **Overview** > Adds explicit **workflow trigger** support for V2 paywall buttons by renaming the serialized `ButtonComponent.Action.Workflow` to `WorkflowTrigger` while keeping the backend JSON `"type": "workflow"` mapping. > > Plumbs the button `id` into `ButtonComponentStyle.componentId` via `StyleFactory`, emits a new `PaywallAction.External.WorkflowTrigger(componentId)`, and tracks a `component_value` of `"workflow_trigger"` for component-interaction analytics. `InternalPaywall` now recognizes this action (currently logs only), and tests are updated accordingly. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 186f654. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
matteinn
pushed a commit
to matteinn/purchases-android
that referenced
this pull request
May 5, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * Unified StoreReplacementMode API (RevenueCat#3234) via Will Taylor (@fire-at-will) * Add placement and targeting context to paywall events (RevenueCat#3253) via Dan Pannasch (@dpannasch) ### 🐞 Bugfixes * Fix null Placements when offering_ids_by_placement is absent (RevenueCat#3254) via Dan Pannasch (@dpannasch) ## RevenueCatUI SDK ### Paywallv2 #### ✨ New Features * Wire multipage workflow navigation into PaywallViewModel (RevenueCat#3381) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * Add `triggerType` to `WorkflowTrigger` (RevenueCat#3393) via Cesar de la Vega (@vegaro) * Extract private function `NavigateTo.toPaywallAction` (RevenueCat#3392) via Cesar de la Vega (@vegaro) * Bump revenucatui-tests gradle cache key (RevenueCat#3391) via Toni Rico (@tonidero) * Create `WorkflowTriggerType` and `WorkflowTriggerActionType` (RevenueCat#3386) via Cesar de la Vega (@vegaro) * Update baseline profiles (RevenueCat#3390) via RevenueCat Git Bot (@RCGitBot) * Plumb `componentId` through buttons on workflow interactions (RevenueCat#3380) via Cesar de la Vega (@vegaro) * Add `ButtonComponent.Action.Workflow` (RevenueCat#3385) via Cesar de la Vega (@vegaro) * Add `componentId` to `ButtonCoomponentStyle` (RevenueCat#3384) via Cesar de la Vega (@vegaro) * Migrate all suspendCoroutine usages to suspendCancellableCoroutine (RevenueCat#3365) via Jaewoong Eum (@skydoves) * Add `WorkflowNavigator` for multipage workflow step navigation (RevenueCat#3379) via Cesar de la Vega (@vegaro) * build(deps): bump fastlane-plugin-revenuecat_internal from `b822f01` to `d24ab26` (RevenueCat#3383) via dependabot[bot] (@dependabot[bot]) * Add `id` field to `ButtonComponent` (RevenueCat#3377) via Cesar de la Vega (@vegaro) * Add CI workflows for generating Baseline Profiles (RevenueCat#3372) via Jaewoong Eum (@skydoves) * add min sdk level for paywalls and customer center (RevenueCat#2465) via Muhammad-Sharif Moustafa (@mshmoustafa) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk release bookkeeping: updates version strings, changelogs, and documentation deployment targets without changing runtime logic beyond the reported version identifier. > > **Overview** > Cuts the `10.3.0` release by updating all version references from `10.3.0-SNAPSHOT` to `10.3.0` across build config (`gradle.properties`, `.version`, `Config.frameworkVersion`) and sample/test app dependency pins. > > Updates release documentation publishing to sync Dokka output to the `10.3.0` S3 path and changes `docs/index.html` to redirect to `10.3.0`. Also promotes release notes by moving `CHANGELOG.latest.md` entries into a new `CHANGELOG.md` section for `10.3.0`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 056ce62. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
idfield toButtonComponentthat mirrors theidkey the backend serializes for button components incomponents_config(khepriButton.id).triggers[*].component_id, and will be used in follow-up PRs to dispatch multipage workflow navigation when a button is pressed.Test plan
ButtonComponentJSON with anidfield./gradlew :purchases:testDefaultsBc8DebugUnitTest --tests "com.revenuecat.purchases.paywalls.components.ButtonComponentTests"./scripts/api-check.shpasses🤖 Generated with Claude Code
Note
Low Risk
Low risk: adds a new nullable field to
ButtonComponentand a deserialization test, with no behavior changes beyond capturing additional backend JSON.Overview
Paywall
ButtonComponentnow includes an optionalidfield so backend-provided button identifiers are preserved during serialization/deserialization.Tests add coverage to ensure
ButtonComponentJSON containingidis decoded correctly.Reviewed by Cursor Bugbot for commit d277380. Bugbot is set up for automated code reviews on this repo. Configure here.