Skip to content

feat: expose interaction phase for UI feedback#7

Merged
saseungmin merged 2 commits into
mainfrom
feat/use-deck-interaction-phase
Jun 16, 2026
Merged

feat: expose interaction phase for UI feedback#7
saseungmin merged 2 commits into
mainfrom
feat/use-deck-interaction-phase

Conversation

@saseungmin

Copy link
Copy Markdown
Member

No description provided.

The deck already exposes progress and direction as UI-thread interaction values.

App-level feedback needs a stable lifecycle signal that does not depend on JS event timing.

This adds an additive phase shared value for idle, dragging, dismissing, and undoing.

Committed model events remain separate from frame-synchronous visual feedback.

Constraint: Limit this PR to interaction.phase only.

Constraint: Do not add committedDirection, progress splitting, or worklet callbacks.

Constraint: Preserve existing gesture and animation behavior.

Rejected: useDeckEvent phase event | phase is UI-thread feedback, not a committed JS event

Rejected: Thin phase setter helper | direct shared-value writes are clearer for now

Confidence: high

Scope-risk: moderate

Directive: Do not bridge phase to React state without a separate JS observer API

Tested: yarn format:check; yarn lint; yarn typecheck --pretty false

Tested: yarn tsc -p example/tsconfig.json --noEmit --pretty false

Tested: yarn jest --runInBand; yarn build

Not-tested: Manual device visual verification after the final example chip tweak
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 167575d

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

Interaction phase is a public API addition.

The release bump should be minor rather than patch.

Constraint: Preserve the original feature commit.

Confidence: high

Scope-risk: narrow

Tested: yarn format:check

Not-tested: Full test suite; changeset metadata only
@saseungmin saseungmin merged commit c3d8949 into main Jun 16, 2026
3 checks passed
@saseungmin saseungmin deleted the feat/use-deck-interaction-phase branch June 16, 2026 01:25
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