Skip to content

Commit

Permalink
Merge pull request #176 from coldsurfers/release/billets-app-v1.6.2
Browse files Browse the repository at this point in the history
release(billets-app): 🎨 v1.6.2
  • Loading branch information
yungblud authored Dec 23, 2024
2 parents 434545d + a2c8b8a commit 008be7e
Show file tree
Hide file tree
Showing 38 changed files with 475 additions and 382 deletions.
16 changes: 8 additions & 8 deletions apps/billets-app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { AuthContextProvider, TabBarVisibleContextProvider, useFirebaseAnalytics, useFirebaseCrashlytics } from '@/lib'
import { AuthContextProvider, useFirebaseAnalytics, useFirebaseCrashlytics } from '@/lib'
import { CommonScreenLayout } from '@/ui'
import { colors } from '@coldsurfers/ocean-road'
import { Text } from '@coldsurfers/ocean-road/native'
import { Spinner, Text } from '@coldsurfers/ocean-road/native'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import React, { PropsWithChildren, useEffect, useState } from 'react'
import React, { PropsWithChildren, Suspense, useEffect, useState } from 'react'
import { Platform, StatusBar, View } from 'react-native'
import BootSplash from 'react-native-bootsplash'
import codePush, { DownloadProgress, RemotePackage } from 'react-native-code-push'
Expand Down Expand Up @@ -112,16 +112,16 @@ const BootSplashAwaiter = ({ children }: PropsWithChildren) => {
const App = () => {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<TabBarVisibleContextProvider>
<StatusBar translucent barStyle="dark-content" />
<QueryClientProvider client={queryClient}>
<StatusBar translucent barStyle="dark-content" />
<QueryClientProvider client={queryClient}>
<Suspense fallback={<Spinner positionCenter />}>
<AuthContextProvider>
<BootSplashAwaiter>
<AppContainer />
</BootSplashAwaiter>
</AuthContextProvider>
</QueryClientProvider>
</TabBarVisibleContextProvider>
</Suspense>
</QueryClientProvider>
</GestureHandlerRootView>
)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/billets-app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName "1.6.1"
versionName "1.6.2"
resValue "string", "CodePushDeploymentKey", project.env.get("ANDROID_CODE_PUSH_DEPLOYMENT_KEY") ?: ""
}

Expand Down
6 changes: 3 additions & 3 deletions apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -632,7 +632,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -923,7 +923,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.1;
MARKETING_VERSION = 1.6.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion apps/billets-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coldsurfers/billets-app",
"version": "1.6.1",
"version": "1.6.2",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { Text } from '@coldsurfers/ocean-road/native'
import { useCallback } from 'react'
import { Pressable, StyleSheet, View } from 'react-native'
import FastImage from 'react-native-fast-image'
import palettes from '../../../../lib/palettes'
import useSubscribedConcertQuery from '../../../../lib/react-query/queries/useSubscribedConcertQuery'
import {
getConcertListBottomWrapperDynamicStyles,
getConcertListItemWrapperDynamicStyles,
getConcertListThumbnailWrapperDynamicStyles,
} from './concert-list-item.utils'

export const ConcertListItem = ({
concertId,
Expand Down Expand Up @@ -40,43 +44,18 @@ export const ConcertListItem = ({
}, [onPressSubscribe, subscribedConcertData, concertId])

return (
<Pressable
onPress={handlePress}
style={[
styles.concertListItem,
{
width: size === 'small' ? 140 : '100%',
padding: size === 'small' ? 0 : 12,
},
]}
>
<Pressable onPress={handlePress} style={[styles.concertListItem, getConcertListItemWrapperDynamicStyles(size)]}>
<FastImage
source={{ uri: thumbnailUrl }}
style={[
styles.concertThumbnail,
{
borderBottomLeftRadius: size === 'small' ? 0 : 8,
borderBottomRightRadius: size === 'small' ? 0 : 8,
},
]}
style={[styles.concertThumbnail, getConcertListThumbnailWrapperDynamicStyles(size)]}
>
{onPressSubscribe && (
<View style={styles.subscribeBtnWrapper}>
<ConcertSubscribeButton onPress={handlePressSubscribe} isSubscribed={!!subscribedConcertData} />
</View>
)}
</FastImage>
<View
style={[
styles.bottom,
{
paddingLeft: size === 'small' ? 8 : 0,
paddingRight: size === 'small' ? 8 : 0,
marginTop: size === 'small' ? 8 : 16,
marginBottom: size === 'small' ? 8 : 4,
},
]}
>
<View style={[styles.bottom, getConcertListBottomWrapperDynamicStyles(size)]}>
<View style={styles.concertInfoWrapper}>
<Text
numberOfLines={size === 'small' ? 2 : 0}
Expand Down Expand Up @@ -120,6 +99,30 @@ export const ConcertListItem = ({
)
}

ConcertListItem.Skeleton = ({ size = 'large' }: { size?: 'small' | 'large' }) => {
return (
<Pressable style={[styles.concertListItem, getConcertListItemWrapperDynamicStyles(size)]}>
<View
style={[styles.concertThumbnail, getConcertListThumbnailWrapperDynamicStyles(size), styles.skeletonBackground]}
/>
<View style={[styles.bottom, getConcertListBottomWrapperDynamicStyles(size)]}>
<View style={{ width: '100%' }}>
<View style={styles.skeletonTitle} />
{size === 'small' && <View style={styles.skeletonTitle} />}
<View
style={[
styles.skeletonSubtitle,
{
marginTop: size === 'small' ? 4 : 8,
},
]}
/>
</View>
</View>
</Pressable>
)
}

const styles = StyleSheet.create({
concertListItem: {
width: '100%',
Expand Down Expand Up @@ -151,20 +154,24 @@ const styles = StyleSheet.create({
flexGrow: 1,
},
concertInfoWrapper: {},
concertSaveButton: {
marginLeft: 'auto',
borderWidth: 1,
borderRadius: 18,
borderColor: palettes.gray['300'],
width: 36,
height: 36,
alignItems: 'center',
justifyContent: 'center',
},
concertSaveButtonIcon: { fontSize: 24 },
bottom: {
flexDirection: 'row',
alignItems: 'center',
},
subscribeBtnWrapper: { position: 'absolute', right: 12, bottom: 12 },
skeletonBackground: {
backgroundColor: colors.oc.gray[3].value,
},
skeletonTitle: {
width: '80%',
backgroundColor: colors.oc.gray[3].value,
height: 24,
borderRadius: 8,
},
skeletonSubtitle: {
width: '20%',
backgroundColor: colors.oc.gray[3].value,
height: 24,
borderRadius: 8,
},
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { StyleProp, ViewStyle } from 'react-native'

export const getConcertListItemWrapperDynamicStyles = (size: 'small' | 'large'): StyleProp<ViewStyle> => {
return {
width: size === 'small' ? 140 : '100%',
padding: size === 'small' ? 0 : 12,
}
}

export const getConcertListThumbnailWrapperDynamicStyles = (size: 'small' | 'large') => {
return {
borderBottomLeftRadius: size === 'small' ? 0 : 8,
borderBottomRightRadius: size === 'small' ? 0 : 8,
}
}

export const getConcertListBottomWrapperDynamicStyles = (size: 'small' | 'large') => {
return {
paddingLeft: size === 'small' ? 8 : 0,
paddingRight: size === 'small' ? 8 : 0,
marginTop: size === 'small' ? 8 : 16,
marginBottom: size === 'small' ? 8 : 4,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { memo } from 'react'
import { FlatList } from 'react-native'
import { ConcertListItem } from '../concert-list-item'
import { concertListStyles } from './concert-list.styles'

const renderItem = () => {
return <ConcertListItem.Skeleton />
}

const data = Array.from({ length: 5 }).map((_, index) => index)

export const ConcertListSkeleton = memo(() => {
return (
<FlatList
data={data}
renderItem={renderItem}
contentContainerStyle={concertListStyles.concertListContentContainer}
/>
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { StyleSheet } from 'react-native'

export const concertListStyles = StyleSheet.create({
concertListContentContainer: {
paddingHorizontal: 16,
marginTop: 12,
paddingBottom: 24,
flexGrow: 1,
},
loadingIndicatorWrapper: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
})
Loading

0 comments on commit 008be7e

Please sign in to comment.