Skip to content

Add id to PaywallButtonComponent#6679

Merged
facumenzella merged 2 commits into
mainfrom
facu/button-component-id
Apr 23, 2026
Merged

Add id to PaywallButtonComponent#6679
facumenzella merged 2 commits into
mainfrom
facu/button-component-id

Conversation

@facumenzella

@facumenzella facumenzella commented Apr 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds id: String? to PaywallComponent.ButtonComponent — decoded from JSON, optional, defaults to nil
  • Plumbs id through ButtonComponentViewModel as a stored property

This is a prerequisite for PR 3 (button workflow trigger actions), where a button with a matching componentId in a workflow trigger will emit a triggerWorkflow action instead of its normal action.

Test plan

  • swift build passes (verified locally)
  • Existing button component tests still pass
  • id decodes correctly from JSON when present, is nil when absent

🤖 Generated with Claude Code


Note

Low Risk
Low risk additive model change: introduces an optional id field on PaywallComponent.ButtonComponent and threads it into the UI view model; main impact is on Codable/equality/hash behavior for button components.

Overview
Adds an optional id: String? to PaywallComponent.ButtonComponent, including JSON decoding/encoding and updating Hashable/Equatable to incorporate the new field.

Plumbs this identifier through to ButtonComponentViewModel as a stored id, populated from the underlying component.

Reviewed by Cursor Bugbot for commit 507b385. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella facumenzella requested a review from vegaro April 23, 2026 12:36
@facumenzella facumenzella merged commit bb8fde7 into main Apr 23, 2026
15 of 17 checks passed
@facumenzella facumenzella deleted the facu/button-component-id branch April 23, 2026 13:38
This was referenced Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants