Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #1372

Merged
merged 111 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f05bce7
ui layout improvments
taronaleksanian Dec 6, 2024
ff2ee49
fix mobile layout
taronaleksanian Dec 6, 2024
f06034b
add error component
taronaleksanian Dec 6, 2024
3a82232
Merge branch 'main' of github.com:andrew-bierman/PackRat into fix/ui-…
taronaleksanian Dec 7, 2024
349a8c6
redesign add pack screen
taronaleksanian Dec 7, 2024
6cab98f
packdetails layout changes
Isthisanmol Dec 9, 2024
987ce03
Revert "packdetails layout changes"
Isthisanmol Dec 9, 2024
16e1a3c
layout changes
Isthisanmol Dec 9, 2024
50484aa
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 9, 2024
331a5b5
Merge branch 'fix/ui-enchancement' of github.com:andrew-bierman/PackR…
taronaleksanian Dec 9, 2024
44deed6
move destination screen component to module
taronaleksanian Dec 9, 2024
79f22ec
Merge branch 'fix/ui-enchancement' into enhance-pack-details
Isthisanmol Dec 10, 2024
f90d35b
color changes for light theme
Isthisanmol Dec 10, 2024
614330e
add layout width
taronaleksanian Dec 10, 2024
b1e5cd8
Merge branch 'enhance-pack-details' of github.com:andrew-bierman/Pack…
taronaleksanian Dec 10, 2024
fe8eb2c
Merge pull request #1349 from andrew-bierman/enhance-pack-details
taronaleksanian Dec 10, 2024
fba3489
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 10, 2024
78638b2
add generic components for new design
taronaleksanian Dec 10, 2024
7f8515e
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 10, 2024
2538d08
destination screen
taronaleksanian Dec 10, 2024
81f4d6c
Merge pull request #1353 from andrew-bierman/fix/destination-screen-r…
taronaleksanian Dec 10, 2024
03239a8
fix destination screen on mobile
taronaleksanian Dec 11, 2024
d4720e8
fix asyncview import
taronaleksanian Dec 11, 2024
6f3a827
enhance ui
Isthisanmol Dec 11, 2024
f91fbc1
resolve conflicts
Isthisanmol Dec 11, 2024
caa177b
create primary and secondary button
Isthisanmol Dec 11, 2024
82f1c04
Merge pull request #1354 from andrew-bierman/enhance-packDetails
taronaleksanian Dec 11, 2024
18ab350
add useQuantityInput
Isthisanmol Dec 11, 2024
bccb27c
add popover
Isthisanmol Dec 13, 2024
ebd29ab
Merge pull request #1358 from andrew-bierman/fix-placesAutoComplete
taronaleksanian Dec 13, 2024
dee5a82
style changes
Isthisanmol Dec 13, 2024
c3ee021
Merge pull request #1359 from andrew-bierman/fix-osm-style
taronaleksanian Dec 13, 2024
ccd08de
Merge branch 'development' into fix-quantity-on-native
Isthisanmol Dec 13, 2024
a011a87
Merge pull request #1355 from andrew-bierman/fix-quantity-on-native
taronaleksanian Dec 13, 2024
520f111
Enhance Create Trip Screen
taronaleksanian Dec 13, 2024
4d70b22
Merge pull request #1360 from andrew-bierman/enhance-createTripScreen
taronaleksanian Dec 13, 2024
d47281b
style changes
Isthisanmol Dec 13, 2024
d62f29c
move buttons from ui to app
Isthisanmol Dec 13, 2024
62f3c75
Merge pull request #1361 from andrew-bierman/enhance-secondary-button
taronaleksanian Dec 13, 2024
ce4641c
add gear list component to create trip screen
taronaleksanian Dec 13, 2024
e93537c
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 13, 2024
7525205
enchance trip screen
taronaleksanian Dec 13, 2024
8118fd3
Merge pull request #1362 from andrew-bierman/enhance-createTripScreen
taronaleksanian Dec 13, 2024
2527b90
fix api url
taronaleksanian Dec 13, 2024
eab1491
Merge pull request #1363 from andrew-bierman/enhance-createTripScreen
taronaleksanian Dec 13, 2024
24c89e9
add filter badge for sorting and feedtype
Isthisanmol Dec 14, 2024
601b4d3
improve gear list
taronaleksanian Dec 14, 2024
19ffb02
fix backend eslint
Tadjaur Dec 15, 2024
bd6976d
fix backend eslint
Tadjaur Dec 15, 2024
74cd16e
Update Trip endpoints
Tadjaur Dec 15, 2024
3c17912
--amend
Tadjaur Dec 15, 2024
46fc8b6
decrease size
Isthisanmol Dec 15, 2024
8a602a6
Merge pull request #1365 from andrew-bierman/fix-backend-eslint
taronaleksanian Dec 15, 2024
5e9251c
Add bounds as optional in the request
Tadjaur Dec 15, 2024
0fd75a0
add flexWrap
Isthisanmol Dec 15, 2024
8e8f0eb
Merge branch 'development' into fix-score-container
Isthisanmol Dec 15, 2024
82aaae6
Merge branch 'development' into feed-screen-enhancement
Isthisanmol Dec 15, 2024
eca561e
Fix broken items import from csv
Tadjaur Dec 12, 2024
0e18706
Fix invalid method call
Tadjaur Dec 12, 2024
00b0f82
Create public endPoint to import pack template
Tadjaur Dec 10, 2024
1885319
revert the minifar installation
Tadjaur Dec 10, 2024
7d87bdd
Update the input data
Tadjaur Dec 11, 2024
eef4745
Update and use existing item definition
Tadjaur Dec 12, 2024
c43085e
Merge pull request #1357 from andrew-bierman/fix-item-import
taronaleksanian Dec 15, 2024
c0ca61f
style changes
Isthisanmol Dec 15, 2024
45c8a9b
enhance settings screen
taronaleksanian Dec 15, 2024
9eca493
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 15, 2024
c349373
Edit schema
Tadjaur Dec 15, 2024
5a150f6
Merge pull request #1366 from andrew-bierman/backend-update-trip-feature
taronaleksanian Dec 15, 2024
113530e
Merge branch 'development' into feed-screen-enhancement
Isthisanmol Dec 16, 2024
0d07f71
Merge branch 'development' into fix-score-container
Isthisanmol Dec 16, 2024
111f5dd
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 16, 2024
98c4cd4
Merge branch 'development' into enhance-productPrimaryCard
Isthisanmol Dec 16, 2024
e7b3993
increase gap
Isthisanmol Dec 16, 2024
b3f50e6
Fix `is_public` type definition
Tadjaur Dec 15, 2024
147eec8
Merge pull request #1367 from andrew-bierman/fix-score-container
taronaleksanian Dec 16, 2024
51a9a8d
Merge pull request #1369 from andrew-bierman/enhance-productPrimaryCard
taronaleksanian Dec 16, 2024
60e2e4d
edit trip screen
taronaleksanian Dec 16, 2024
7b0ea43
Merge branch 'development' of github.com:andrew-bierman/PackRat into …
taronaleksanian Dec 16, 2024
dd20eb6
add destination field
taronaleksanian Dec 16, 2024
6ae87a7
handle permissions of trip editing
taronaleksanian Dec 16, 2024
2e8b207
Merge pull request #1371 from andrew-bierman/enhance-createTripScreen
taronaleksanian Dec 16, 2024
dcfeb1a
add destination
taronaleksanian Dec 16, 2024
a3db352
Merge branch 'development' into feed-screen-enhancement
andrew-bierman Dec 17, 2024
e9fe740
Merge pull request #1364 from andrew-bierman/feed-screen-enhancement
andrew-bierman Dec 17, 2024
7a03d17
product details ui changes
Isthisanmol Dec 17, 2024
c0e9348
style changes
Isthisanmol Dec 17, 2024
373e598
Merge pull request #1374 from andrew-bierman/fix-card-text
taronaleksanian Dec 17, 2024
d1cee0c
Merge pull request #1373 from andrew-bierman/product-details-ui-enhan…
taronaleksanian Dec 17, 2024
ee1a5f7
fix is public type
Tadjaur Dec 17, 2024
64c21c5
Merge pull request #1370 from andrew-bierman/fix-trip-is_public-value
taronaleksanian Dec 17, 2024
d173b04
profile scren fixes
taronaleksanian Dec 18, 2024
7643bab
add minwidth to editable text
Isthisanmol Dec 18, 2024
f92630a
Merge pull request #1376 from andrew-bierman/fix-editabletext
taronaleksanian Dec 18, 2024
dbbf6c8
Fix geojson return type
Tadjaur Dec 18, 2024
a7c5b6b
add More range in the trip name and description
Tadjaur Dec 18, 2024
7118472
add filterbadge and wrap screen in layout
Isthisanmol Dec 18, 2024
a4a2e56
Merge pull request #1377 from andrew-bierman/fix-geojson-route
taronaleksanian Dec 18, 2024
bb1e8ab
Merge pull request #1378 from andrew-bierman/enhance-productScreen-he…
taronaleksanian Dec 18, 2024
bca2aa3
fix trip form validation
taronaleksanian Dec 18, 2024
cb20b4b
fixing
taronaleksanian Dec 18, 2024
9293456
Fix trip schema definition and migration
Tadjaur Dec 19, 2024
937528a
generate a new migration in preview environment
Tadjaur Dec 19, 2024
6b673f2
generate a new migration in preview environment
Tadjaur Dec 19, 2024
1a9ffd6
use popover in fab
Isthisanmol Dec 19, 2024
61887a2
Merge pull request #1380 from andrew-bierman/quickActions-enhancement
taronaleksanian Dec 19, 2024
c2d2d6c
Merge pull request #1379 from andrew-bierman/fix-trip-schema-def
taronaleksanian Dec 19, 2024
8bb2fd7
layout changes
Isthisanmol Dec 19, 2024
afe916c
Merge pull request #1381 from andrew-bierman/enhance-product-details-…
taronaleksanian Dec 19, 2024
793301a
trip screen fixes
taronaleksanian Dec 19, 2024
92fc6dd
fix pack title ui
taronaleksanian Dec 19, 2024
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { DestinationScreen } from 'app/modules/map/screens/DestinationScreen';
import { Platform } from 'react-native';
import { DestinationPage } from 'app/components/destination';
// import DestinationPage from "../../components/destination";
import { Stack } from 'expo-router';
import Head from 'expo-router/head';

Expand All @@ -22,7 +21,7 @@ export default function Destination() {
// https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component
}}
/>
<DestinationPage />
<DestinationScreen />
</>
);
}
7 changes: 3 additions & 4 deletions apps/expo/app/(app)/(drawer)/(tabs)/(stack)/trip/[tripId].tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import PackContainer from 'app/components/pack/PackContainer';
import { TripDetails } from 'app/screens/trip/TripDetails';
import { DetailsComponent } from 'app/components/details';
import EditTripScreen from 'app/screens/trip/editTrip';

import { Platform } from 'react-native';
import { Stack } from 'expo-router';
import Head from 'expo-router/head';
Expand All @@ -24,7 +23,7 @@ export default function Trip() {
// https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component
}}
/>
<TripDetails />
<EditTripScreen />
</>
);
}
5 changes: 2 additions & 3 deletions apps/next/pages/destination/[destinationId].tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { DestinationPage } from 'app/components/destination';
import { DestinationScreen } from 'app/modules/Map/screens/DestinationScreen';
import { AuthWrapper } from 'app/modules/auth';
// import DestinationPage from "../../components/destination";

// export const runtime = 'experimental-edge';

export default function Destination() {
return (
<>
<DestinationPage />
<DestinationScreen />
</>
);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/next/pages/trip/[tripId].tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { TripDetails } from 'app/screens/trip/TripDetails';
import EditTripScreen from 'app/screens/trip/editTrip';
import { AuthWrapper } from 'app/modules/auth';

// export const runtime = 'experimental-edge'

export default function Trip() {
return (
<>
<TripDetails />
<EditTripScreen />
</>
);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/tauri/src/routes/destination/query.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { DestinationPage } from 'app/components/destination';
import { DestinationScreen } from 'app/modules/Map/screens/DestinationScreen';
import { AuthWrapper } from 'app/modules/auth';
// import DestinationPage from "../../components/destination";
import { createLazyFileRoute } from '@tanstack/react-router';
Expand All @@ -11,7 +11,7 @@ export const Route = createLazyFileRoute('/destination/query')({
export default function Destination() {
return (
<AuthWrapper>
<DestinationPage />
<DestinationScreen />
</AuthWrapper>
);
}
4 changes: 2 additions & 2 deletions apps/tauri/src/routes/trip/$tripId.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { TripDetails } from 'app/screens/trip/TripDetails';
import EditTripScreen from 'app/screens/trip/editTrip';
import { AuthWrapper } from 'app/modules/auth';
import { createLazyFileRoute } from '@tanstack/react-router';

Expand All @@ -10,7 +10,7 @@ export const Route = createLazyFileRoute('/trip/$tripId')({
export default function Trip() {
return (
<AuthWrapper>
<TripDetails />
<EditTripScreen />
</AuthWrapper>
);
}
4 changes: 1 addition & 3 deletions apps/vite/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import Footer from 'app/components/footer/Footer';
const ThemedMainContentWeb = () => {
const { isDark } = useContext(ThemeContext);

const backgroundColor = isDark ? '#000000' : '#F5F5F5';

return (
<MainContentWeb style={{ backgroundColor, paddingTop: 80 }}>
<MainContentWeb isDark={!!isDark}>
<Navbar />
<Outlet />
<Footer />
Expand Down
5 changes: 2 additions & 3 deletions apps/vite/src/routes/destination/query.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { DestinationPage } from 'app/components/destination';
import { DestinationScreen } from 'app/modules/map/screens/DestinationScreen/DestinationScreen';
import { AuthWrapper } from 'app/modules/auth';
// import DestinationPage from "../../components/destination";
import { createLazyFileRoute } from '@tanstack/react-router';

export const Route = createLazyFileRoute('/destination/query')({
Expand All @@ -11,7 +10,7 @@ export const Route = createLazyFileRoute('/destination/query')({
export default function Destination() {
return (
<AuthWrapper>
<DestinationPage />
<DestinationScreen />
</AuthWrapper>
);
}
5 changes: 3 additions & 2 deletions apps/vite/src/routes/trip/$tripId.lazy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { TripDetails } from 'app/screens/trip/TripDetails';
import EditTripScreen from 'app/screens/trip/editTrip';
import { AuthWrapper } from 'app/modules/auth';
import { createLazyFileRoute } from '@tanstack/react-router';

Expand All @@ -8,9 +8,10 @@ export const Route = createLazyFileRoute('/trip/$tripId')({
});

export default function Trip() {
const { tripId } = Route.useParams();
return (
<AuthWrapper>
<TripDetails />
<EditTripScreen tripId={tripId} />
</AuthWrapper>
);
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
},
"lint-staged": {
"server/**/*.{js,ts}": [
"cd server && yarn run lint",
"prettier --write"
"yarn workspace server run lint"
],
"**/*.{js,jsx,ts,tsx}": [
"prettier --write"
Expand Down
35 changes: 35 additions & 0 deletions packages/app/components/AsyncView/AsyncView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { RSkeleton } from '@packrat/ui';
import { ErrorCard } from 'app/components/ErrorCard';
import { type ErrorCardProps } from 'app/components/ErrorCard/ErrorCard';
import React, { type ReactNode, type FC } from 'react';

interface AsyncViewProps {
isLoading: boolean;
isError: boolean;
loadingComponentProps?: { style: any };
errorComponentProps?: ErrorCardProps;
loadingComponent?: ReactNode;
errorComponent?: ReactNode;
children: ReactNode;
}

export const AsyncView: FC<AsyncViewProps> = ({
isLoading,
isError,
children,
loadingComponentProps = { style: { width: '100%', height: 30 } },
errorComponentProps,
loadingComponent: LoadingComponent,
errorComponent: ErrorComponent,
}) => {
if (isLoading) {
return <>{LoadingComponent || <RSkeleton {...loadingComponentProps} />}</>;
}

if (isError) {
if (!errorComponentProps) return null;
return <>{ErrorComponent || <ErrorCard {...errorComponentProps} />}</>;
}

return <>{children}</>;
};
1 change: 1 addition & 0 deletions packages/app/components/AsyncView/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './AsyncView';
68 changes: 68 additions & 0 deletions packages/app/components/ErrorCard/ErrorCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import React, { type FC } from 'react';
import { RButton, RText, XStack, YStack } from '@packrat/ui';
import { XCircle } from '@tamagui/lucide-icons';
import useTheme from 'app/hooks/useTheme';
import { View } from 'react-native';

export interface ErrorCardProps {
title?: string;
message: string;

onRetry?: () => void;
}

export const ErrorCard: FC<ErrorCardProps> = ({
message,
title = 'Server error',
onRetry,
}) => {
const { currentTheme } = useTheme();

return (
<YStack
style={{
borderColor: currentTheme.colors.error,
backgroundColor: `${currentTheme.colors.error}70`,
borderWidth: 1,
borderRadius: 8,
gap: 16,
padding: 16,
}}
>
<XStack gap={8} style={{ alignItems: 'flex-start', width: 320 }}>
<XCircle
size={20}
style={{ color: currentTheme.colors.error, marginTop: 4 }}
/>
<View style={{ flex: 1 }}>
<RText style={{ color: currentTheme.colors.error, fontWeight: 600 }}>
{title}
</RText>
<RText
style={{
color: currentTheme.colors.error,
paddingTop: 8,
}}
>
{message}
</RText>
</View>
</XStack>
{typeof onRetry === 'function' && (
<RButton
style={{
padding: 0,
width: 72,
marginTop: 8,
backgroundColor: 'white',
color: currentTheme.colors.error,
fontWeight: 600,
}}
onPress={onRetry}
>
Retry
</RButton>
)}
</YStack>
);
};
1 change: 1 addition & 0 deletions packages/app/components/ErrorCard/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ErrorCard } from './ErrorCard';
1 change: 1 addition & 0 deletions packages/app/components/Fab/Fab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const FAB = () => {
<FABWeb
showQuickActions={showQuickActions}
toggleQuickActions={toggleQuickActions}
closeQuickActions={closeQuickActions}
/>
) : (
<FABNative
Expand Down
112 changes: 59 additions & 53 deletions packages/app/components/Fab/FabNative.tsx
Original file line number Diff line number Diff line change
@@ -1,62 +1,68 @@
import React from 'react';
import { TouchableOpacity, View } from 'react-native';
import { Popover, YStack } from 'tamagui';
import { MaterialIcons } from '@expo/vector-icons';
import useCustomStyles from 'app/hooks/useCustomStyles';
import { QuickActionsSection } from '../../modules/dashboard';
import { useQuickActions } from 'app/modules/dashboard';
import useTheme from 'app/hooks/useTheme';
import { QuickActionButton } from 'app/modules/dashboard/components/QuickActionButton/QuickActionButton';
import { RButton } from '@packrat/ui';

const FABNative = ({
showQuickActions,
toggleQuickActions,
closeQuickActions,
}) => {
const styles = useCustomStyles(loadStyles);
const FABNative = () => {
const { handleActionSelect, quickActionData } = useQuickActions();
const { currentTheme } = useTheme();

return (
<>
{showQuickActions && (
<View style={styles.quickActionsContainer}>
<QuickActionsSection closeQuickActions={closeQuickActions} />
</View>
)}
<TouchableOpacity style={styles.fab} onPress={toggleQuickActions}>
<MaterialIcons name="add" size={40} style={styles.fabIcon} />
</TouchableOpacity>
</>
<Popover>
<Popover.Trigger asChild>
<RButton
style={{
position: 'absolute',
width: 55,
height: 55,
backgroundColor: currentTheme.colors.card,
borderRadius: 28,
justifyContent: 'center',
alignItems: 'center',
zIndex: 2,
elevation: 2,
bottom: 20,
alignSelf: 'center',
}}
>
<MaterialIcons
name="add"
size={20}
color={currentTheme.colors.text}
/>
</RButton>
</Popover.Trigger>
<Popover.Content
elevate
bordered
size="$1"
style={{
bottom: 158,
height: 120,
width: 150,
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: currentTheme.colors.background,
}}
>
<YStack space="$1">
{quickActionData.map((action) => (
<QuickActionButton
key={action.action}
onPress={() => handleActionSelect(action.action)}
iconName={action.iconName}
text={action.text}
/>
))}
</YStack>
<Popover.Arrow />
</Popover.Content>
</Popover>
);
};

const loadStyles = (theme) => {
const { currentTheme } = theme;

return {
quickActionsContainer: {
position: 'absolute',
bottom: 70,
right: 40,
zIndex: 1,
height: 54,
width: 150,
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
},
fab: {
position: 'absolute',
width: 55,
height: 55,
backgroundColor: currentTheme.colors.card,
borderRadius: 28,
justifyContent: 'center',
alignItems: 'center',
zIndex: 2,
elevation: 2,
bottom: 20,
alignSelf: 'center',
},
fabIcon: {
color: currentTheme.colors.tertiaryBlue,
},
};
};

export default FABNative;
Loading
Loading