Repository navigation
feat: add allowed swipe directions - #10
Merged
Merged
Conversation
Add a Root-level allowedDirections policy so decks can accept only left, only right, both, or no dismiss directions while preserving drag and snap-back behavior. The policy is normalized into left/right booleans and synchronized into separate JS and UI-runtime carriers. This lets programmatic actions and release gestures both gate dismisses without routing policy changes through deckStore.attach. Constraint: Gesture release must stay UI-thread safe Constraint: Programmatic actions need synchronous JS boolean returns Constraint: Policy rerenders must not detach Root or clear event snapshots Rejected: Direction predicate callback | worklet/JS boundary ambiguity Rejected: Single carrier | JS coupling or attach churn risk Confidence: high Scope-risk: moderate Directive: Future dismiss paths must use the same direction policy helper Directive: Keep JS/UI policy carriers synchronized Tested: yarn typecheck; yarn lint; yarn format:check Tested: targeted jest for windowing, deckState, SwipeDeck integration Tested: earlier full jest and build before readability-only helper refactor Not-tested: Manual device verification for allowedDirections onboarding flows
🦋 Changeset detectedLatest commit: 4fc5516 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Document the new Root-level allowedDirections API in the changeset with a small JSX example and short behavior notes. Constraint: Keep the release note focused on the public API surface Confidence: high Scope-risk: narrow Tested: yarn format .changeset/allowed-directions.md Not-tested: Full test suite; documentation-only changeset update
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.
Add a Root-level allowedDirections policy so decks can accept only left, only right, both, or no dismiss directions while preserving drag and snap-back behavior.
The policy is normalized into left/right booleans and synchronized into separate JS and UI-runtime carriers. This lets programmatic actions and release gestures both gate dismisses without routing policy changes through deckStore.attach.