Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c1b1b43
update dependnecies
bnussman Sep 11, 2025
f46ce52
update `@gorhom/bottom-sheet` to latest
bnussman Sep 11, 2025
5236c70
remove `metro.config.js`
bnussman Sep 13, 2025
1e260bb
ensure sentry is configured correctly
bnussman Sep 13, 2025
c97cb81
ensure sentry is configured correctly
bnussman Sep 13, 2025
8568ba8
remove hoisted pnpm config
bnussman Sep 13, 2025
8997e91
fix expo deps
bnussman Sep 13, 2025
3bf7376
Revert "fix expo deps"
bnussman Sep 13, 2025
7ed6992
Revert "remove hoisted pnpm config"
bnussman Sep 13, 2025
698baa1
fix expo deps actually
bnussman Sep 13, 2025
f94792e
remove babel config
bnussman Sep 13, 2025
1b43816
fix app deps
bnussman Sep 13, 2025
497d1a0
add `ITSAppUsesNonExemptEncryption` to `infoPlist`
bnussman Sep 16, 2025
39ab12d
try to replace zeego with Expo UI
bnussman Sep 17, 2025
1b18d4e
remove additonal zeego replated deps
bnussman Sep 17, 2025
04ba500
fix expo doctor
bnussman Sep 17, 2025
1898237
fix lockfile
bnussman Sep 17, 2025
6bf95f0
fix e2e tests
bnussman Sep 17, 2025
3e1ce1d
Revert "fix lockfile"
bnussman Sep 17, 2025
b4d7bbb
Revert "fix expo doctor"
bnussman Sep 17, 2025
9d4888f
fixes to new menu component
bnussman Sep 18, 2025
28f200d
improve new menu UX
bnussman Sep 19, 2025
f2c86d2
run expo install fix
bnussman Sep 19, 2025
16f2df6
add basic andriod menu
bnussman Sep 19, 2025
cda23c9
omg, andriod menu working
bnussman Sep 20, 2025
c8cbb3c
Merge branch 'main' into chore/expo-sdk-54
bnussman Sep 20, 2025
70bfd5c
ignore types for now
bnussman Sep 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const config: ExpoConfig = {
[
"@sentry/react-native/expo",
{
url: "https://sentry.io/",
project: "app",
organization: "ian-banks-llc",
},
Expand All @@ -58,6 +59,7 @@ const config: ExpoConfig = {
bundleIdentifier: "app.ridebeep.App",
buildNumber: "32",
infoPlist: {
ITSAppUsesNonExemptEncryption: false,
NSLocationWhenInUseUsageDescription:
"The Beep App uses your location to pick origins, destinations, and predict ride times",
NSLocationAlwaysUsageDescription:
Expand Down
11 changes: 0 additions & 11 deletions app/babel.config.js

This file was deleted.

142 changes: 64 additions & 78 deletions app/components/Beep.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import * as ContextMenu from "zeego/context-menu";
import { View } from "react-native";
import { useNavigation } from "@react-navigation/native";
import { Card } from "@/components/Card";
Expand All @@ -12,6 +11,7 @@ import { printStars } from "./Stars";

import { useMutation } from "@tanstack/react-query";
import { useQueryClient } from "@tanstack/react-query";
import { Menu, MenuProps } from "./Menu";

interface Props {
item: RouterOutput["beep"]["beeps"]["beeps"][number];
Expand Down Expand Up @@ -40,9 +40,68 @@ export function Beep({ item }: Props) {
}),
);

const options: MenuProps["options"] = [];

if (isRider && item.beeper.venmo) {
options.push({
title: "Pay Beeper With Venmo",
onClick: () =>
openVenmo(
item.beeper.venmo,
item.groupSize,
item.beeper.groupRate,
item.beeper.singlesRate,
"pay",
),
});
}

if (isBeeper && item.rider.venmo && item.status === "complete") {
options.push({
title: "Charge Rider with Venmo",
onClick: () =>
openVenmo(
item.rider.venmo,
item.groupSize,
item.beeper.groupRate,
item.beeper.singlesRate,
"charge",
),
});
}

if (myRating) {
options.push({
onClick: () => deleteRating({ ratingId: myRating.id }),
title: "Delete Rating",
});
}

if (!myRating && item.status === "complete") {
options.push({
title: "Rate",
onClick: () =>
navigation.navigate("Rate", {
userId: otherUser.id,
beepId: item.id,
}),
});
}

options.push({
title: "Report",
onClick: () =>
navigation.navigate("Report", {
userId: otherUser.id,
beepId: item.id,
}),
});

return (
<ContextMenu.Root>
<ContextMenu.Trigger>
<Menu
options={options}
activationMethod="longPress"
trigger={
<Card
style={{ padding: 16, gap: 8 }}
pressable
Expand Down Expand Up @@ -127,80 +186,7 @@ export function Beep({ item }: Props) {
)}
</View>
</Card>
</ContextMenu.Trigger>
<ContextMenu.Content>
{isRider && item.beeper.venmo && (
<ContextMenu.Item
key="pay-beeper"
onSelect={() =>
openVenmo(
item.beeper.venmo,
item.groupSize,
item.beeper.groupRate,
item.beeper.singlesRate,
"pay",
)
}
>
<ContextMenu.ItemTitle>Pay Beeper with Venmo</ContextMenu.ItemTitle>
</ContextMenu.Item>
)}
{isBeeper && item.rider.venmo && item.status === "complete" && (
<ContextMenu.Item
key="request-rider"
onSelect={() =>
openVenmo(
item.rider.venmo,
item.groupSize,
item.beeper.groupRate,
item.beeper.singlesRate,
"charge",
)
}
>
<ContextMenu.ItemTitle>
Charge Rider with Venmo
</ContextMenu.ItemTitle>
</ContextMenu.Item>
)}
{myRating && (
<ContextMenu.Item
key="delete-rating"
destructive
onSelect={() => {
if (myRating) {
deleteRating({ ratingId: myRating.id });
}
}}
>
<ContextMenu.ItemTitle>Delete Rating</ContextMenu.ItemTitle>
</ContextMenu.Item>
)}
{!myRating && item.status === "complete" && (
<ContextMenu.Item
key="rate"
onSelect={() =>
navigation.navigate("Rate", {
userId: otherUser.id,
beepId: item.id,
})
}
>
<ContextMenu.ItemTitle>Rate</ContextMenu.ItemTitle>
</ContextMenu.Item>
)}
<ContextMenu.Item
key="report"
onSelect={() =>
navigation.navigate("Report", {
userId: otherUser.id,
beepId: item.id,
})
}
>
<ContextMenu.ItemTitle>Report</ContextMenu.ItemTitle>
</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu.Root>
}
/>
);
}
31 changes: 31 additions & 0 deletions app/components/Menu.android.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { MenuProps } from "./Menu";

import { MenuView } from "@react-native-menu/menu";
import { View } from "react-native";

export function Menu(props: MenuProps) {
if (props.disabled) {
return props.trigger;
}

return (
<View>
<MenuView
onPressAction={({ nativeEvent }) => {
const option = props.options.find(
(option) => option.title === nativeEvent.event,
);
option?.onClick();
}}
actions={props.options.map((option) => ({
id: option.title,
title: option.title,
attributes: option.destructive ? { destructive: true } : {},
}))}
shouldOpenOnLongPress={props.activationMethod === "longPress"}
>
{props.trigger}
</MenuView>
</View>
);
}
31 changes: 31 additions & 0 deletions app/components/Menu.ios.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Button, ContextMenu, Host } from "@expo/ui/swift-ui";
import { MenuProps } from "./Menu";
import { View } from "react-native";

export function Menu(props: MenuProps) {
if (props.disabled) {
return props.trigger;
}

return (
<Host matchContents={{ horizontal: true, vertical: false }}>
<ContextMenu activationMethod={props.activationMethod ?? "singlePress"}>
<ContextMenu.Items>
{props.options.map((option) => (
<Button
role={option.destructive ? "destructive" : undefined}
onPress={option.onClick}
>
{option.title}
</Button>
))}
</ContextMenu.Items>
<ContextMenu.Trigger>
<View>
<Host>{props.trigger}</Host>
</View>
</ContextMenu.Trigger>
</ContextMenu>
</Host>
);
}
26 changes: 26 additions & 0 deletions app/components/Menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { ContextMenuProps } from "@expo/ui/swift-ui";

interface Option {
title: string;
onClick: () => void;
destructive?: boolean;
}

export interface MenuProps extends Omit<ContextMenuProps, "children"> {
/**
* The trigger for the men
*/
trigger: React.ReactNode;
/**
* Options that render in the Menu
*/
options: Option[];
/**
* If the Menu is disabled, the tigger will just be returned
*/
disabled?: boolean;
}

export const Menu = (props: MenuProps) => {
return props.trigger;
};
21 changes: 21 additions & 0 deletions app/components/Menu.web.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { useId } from "react";
import { MenuProps } from "./Menu";

export function Menu(props: MenuProps) {
const id = useId();

return (
<>
<button style={{ all: "unset" }} popoverTarget={id}>
{props.trigger}
</button>
<div popover="" popoverTargetAction="toggle" id={id}>
{props.options.map((option, index) => (
<button role="menuitem" key={index} onClick={option.onClick}>
{option.title}
</button>
))}
</div>
</>
);
}
Loading
Loading