Skip to content

Add Food Item Detail Modal with Swipe Support#169

Merged
zakkiyyat merged 5 commits intoMixMatch-Inc:mainfrom
aaseenib:details-modal-feature
Mar 7, 2026
Merged

Add Food Item Detail Modal with Swipe Support#169
zakkiyyat merged 5 commits intoMixMatch-Inc:mainfrom
aaseenib:details-modal-feature

Conversation

@aaseenib
Copy link
Contributor

@aaseenib aaseenib commented Mar 7, 2026

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

Copy link
Contributor

@zakkiyyat zakkiyyat left a comment

Choose a reason for hiding this comment

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

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(() => {})
Copy link
Contributor

Choose a reason for hiding this comment

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

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

aaseenib added 2 commits March 7, 2026 16:17
# Conflicts:
#	mobile/README.md
#	mobile/app/(tabs)/discover.tsx
#	mobile/package.json
#	mobile/src/lib/api.ts
Copy link
Contributor

@zakkiyyat zakkiyyat left a comment

Choose a reason for hiding this comment

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

Looks good to merge.

@zakkiyyat zakkiyyat merged commit 6a285cd into MixMatch-Inc:main Mar 7, 2026
1 check passed
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.

Food Details Modal & Animations

2 participants