Skip to content

feat: add swipe event source metadata#13

Merged
saseungmin merged 1 commit into
mainfrom
feat/swipe-event-source
Jun 20, 2026
Merged

feat: add swipe event source metadata#13
saseungmin merged 1 commit into
mainfrom
feat/swipe-event-source

Conversation

@saseungmin

Copy link
Copy Markdown
Member

Add commit-source metadata to swipe events so consumers can distinguish gesture releases from programmatic action commits without app-owned refs.

The source value is authored at the dismiss boundary and emitted from the shared commit path, preserving the existing gesture/action motion behavior.

Add commit-source metadata to swipe events so consumers can distinguish
gesture releases from programmatic action commits without app-owned refs.

The source value is authored at the dismiss boundary and emitted from the
shared commit path, preserving the existing gesture/action motion behavior.

Constraint: Keep app-domain analytics labels out of the library payload
Constraint: Preserve existing dismiss, reset, and event ordering semantics
Rejected: App-owned pending source refs | brittle and can drift from commit lifecycle
Rejected: Optional source field | weakens the event payload contract and analytics reliability
Confidence: high
Scope-risk: moderate
Tested: yarn format; yarn typecheck --pretty false; yarn lint
Tested: yarn format:check; yarn jest --runInBand --watchman=false; yarn build
Tested: git diff --check
Not-tested: Manual device gesture analytics integration
@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c108831

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@react-native-motion-kit/swipe-deck Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@saseungmin saseungmin merged commit 335c5cf into main Jun 20, 2026
3 checks passed
@saseungmin saseungmin deleted the feat/swipe-event-source branch June 20, 2026 07:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1088310b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,24 @@
---
'@react-native-motion-kit/swipe-deck': minor

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mark required SwipeEvent source as major

This changeset publishes a minor release, but the same change makes source a required member of the exported SwipeEvent<T> type at src/types.ts:36 and notes that object literals, fixtures, or useDeckEvent('swipe', initialValue) values must now be updated. Consumers can take this as a minor upgrade and have TypeScript builds fail, so either make source optional/backward-compatible or change this changeset to major.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant