Add Food Item Detail Modal with Swipe Support#169
Merged
zakkiyyat merged 5 commits intoMixMatch-Inc:mainfrom Mar 7, 2026
Merged
Add Food Item Detail Modal with Swipe Support#169zakkiyyat merged 5 commits intoMixMatch-Inc:mainfrom
zakkiyyat merged 5 commits intoMixMatch-Inc:mainfrom
Conversation
zakkiyyat
requested changes
Mar 7, 2026
Contributor
zakkiyyat
left a comment
There was a problem hiding this comment.
Kindly resolve the merge conflicts, fix bugs and this will be good to merge.
Comment on lines
+96
to
+106
| const handleSwipe = useCallback( | ||
| async (action: "like" | "pass") => { | ||
| const top = cards[0] | ||
| if (!top) return | ||
|
|
||
| if (selectedCard && top.id === selectedCard.id) { | ||
| hideModal() | ||
| } | ||
|
|
||
| setCards((prev) => prev.slice(1)) | ||
| void sendSwipe({ foodId: top.id, action }).catch(() => {}) |
Contributor
There was a problem hiding this comment.
ensure modal swipe actions only act on the currently selected card (to prevent stale-selection mismatch if top card changed before modal action), please review the food details modal implementation for interaction correctness and race-safety.
Focus on:
- whether modal swipe actions always target the intended card
- stale state risks between selected modal item and top stack item
- modal close/open animation consistency under rapid interactions
- API side-effects when modal and main swipe controls are used quickly
# Conflicts: # mobile/README.md # mobile/app/(tabs)/discover.tsx # mobile/package.json # mobile/src/lib/api.ts
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.
Introduces an info button and card tap interaction that opens a bottom sheet with expanded food details, including the full description, restaurant name, distance, and price displayed in both fiat and XLM. The detailed view keeps the decision flow uninterrupted by allowing users to swipe left or right directly from the modal.
The bottom sheet uses smooth animations and shares interaction state with the card stack so gestures behave consistently. Swiping from the modal dismisses it, animates the card out of the stack, and triggers the swipe API, ensuring the same behavior as swiping from the main card view.
closes #154