Skip to content

Commit

Permalink
improves onboarding flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Aug 9, 2024
1 parent 5d1dead commit 3a9a58c
Show file tree
Hide file tree
Showing 24 changed files with 121 additions and 143 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[![CodeQL](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/codeql-analysis.yml)
[![CodeQL](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/codeql.yml/badge.svg)](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/codeql.yml)
[![CI](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/lint.yml/badge.svg)](https://github.com/neuland-ingolstadt/neuland.app-native/actions/workflows/lint.yml)

# Neuland Next - native version of neuland.app

An open source, mobile app developed using React Native and Expo, serving as a replacement for the official Technische Hochschule Ingolstadt (THI) app.
An open source, mobile app developed using React Native, serving as a replacement for the official Technische Hochschule Ingolstadt (THI) app.
It features a modern user interface and utilizes the Expo framework for easy development and deployment.

## Beta Testing

Click on the link below to join the beta testing of the app:

- iOS: [TestFlight](https://testflight.apple.com/join/PABWZys2)
- Android: [Google Play](https://play.google.com/store/apps/details?id=app.neuland)

> [!IMPORTANT]
> Please let us know about any bugs and send us ideas for improvement so that we can improve the app.
## About

### App

The app aims at implementing all important features of the official app as free and open source software with a modern UI and native features.
To achieve this, the existing React backend is adapted and the API of the neuland.app is used.
To achieve this, the existing React backend was adapted and the Neuland GraphQL API was created.

### Contributing

Expand All @@ -20,7 +30,4 @@ Check out the [contributing guidelines](.github/CONTRIBUTING.md) to get started.

### Current State

> **Warning**
> The app is in early development and not yet publicly available.
We are currently doing an internal alpha test with the goal of releasing the app for iOS and Android later this year.
The app is in development and not yet publicly available.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ android {
applicationId 'app.neuland'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 138
versionName "0.8.3"
versionCode 145
versionName "0.9.0"
}
signingConfigs {
debug {
Expand Down
4 changes: 2 additions & 2 deletions app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"userInterfaceStyle": "automatic",
"ios": {
"bundleIdentifier": "de.neuland-ingolstadt.neuland-app",
"buildNumber": "71",
"buildNumber": "82",
"supportsTablet": true,
"userInterfaceStyle": "automatic",
"associatedDomains": [
Expand Down Expand Up @@ -49,7 +49,7 @@
"android": {
"package": "app.neuland",
"userInterfaceStyle": "automatic",
"versionCode": 138,
"versionCode": 145,
"splash": {
"image": "./src/assets/splash/splashLight.png",
"resizeMode": "contain",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
107 changes: 43 additions & 64 deletions ios/NeulandNext.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ios/NeulandNext/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
</array>
<key>RCTAsyncStorageExcludeFromBackup</key>
<false/>
Expand Down
34 changes: 17 additions & 17 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ PODS:
- EXJSONUtils (0.13.1)
- EXManifests (0.14.3):
- ExpoModulesCore
- Expo (51.0.25):
- Expo (51.0.26):
- ExpoModulesCore
- expo-dev-client (4.0.21):
- expo-dev-client (4.0.22):
- EXManifests
- expo-dev-launcher
- expo-dev-menu
- expo-dev-menu-interface
- EXUpdatesInterface
- expo-dev-launcher (4.0.23):
- expo-dev-launcher (4.0.24):
- DoubleConversion
- EXManifests
- expo-dev-launcher/Main (= 4.0.23)
- expo-dev-launcher/Main (= 4.0.24)
- expo-dev-menu
- expo-dev-menu-interface
- ExpoModulesCore
Expand All @@ -47,7 +47,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-launcher/Main (4.0.23):
- expo-dev-launcher/Main (4.0.24):
- DoubleConversion
- EXManifests
- expo-dev-launcher/Unsafe
Expand Down Expand Up @@ -76,7 +76,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-launcher/Unsafe (4.0.23):
- expo-dev-launcher/Unsafe (4.0.24):
- DoubleConversion
- EXManifests
- expo-dev-menu
Expand Down Expand Up @@ -104,10 +104,10 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-menu (5.0.17):
- expo-dev-menu (5.0.18):
- DoubleConversion
- expo-dev-menu/Main (= 5.0.17)
- expo-dev-menu/ReactNativeCompatibles (= 5.0.17)
- expo-dev-menu/Main (= 5.0.18)
- expo-dev-menu/ReactNativeCompatibles (= 5.0.18)
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
Expand All @@ -128,7 +128,7 @@ PODS:
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-menu-interface (1.8.3)
- expo-dev-menu/Main (5.0.17):
- expo-dev-menu/Main (5.0.18):
- DoubleConversion
- EXManifests
- expo-dev-menu-interface
Expand All @@ -154,7 +154,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-menu/ReactNativeCompatibles (5.0.17):
- expo-dev-menu/ReactNativeCompatibles (5.0.18):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -175,7 +175,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-menu/SafeAreaView (5.0.17):
- expo-dev-menu/SafeAreaView (5.0.18):
- DoubleConversion
- ExpoModulesCore
- glog
Expand All @@ -197,7 +197,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- expo-dev-menu/Vendored (5.0.17):
- expo-dev-menu/Vendored (5.0.18):
- DoubleConversion
- expo-dev-menu/SafeAreaView
- glog
Expand Down Expand Up @@ -1956,10 +1956,10 @@ SPEC CHECKSUMS:
EXConstants: 409690fbfd5afea964e5e9d6c4eb2c2b59222c59
EXJSONUtils: 30c17fd9cc364d722c0946a550dfbf1be92ef6a4
EXManifests: c1fab4c3237675e7b0299ea8df0bcb14baca4f42
Expo: 88047e6d12a8113a18887b6ebd775fccfcdbf3c9
expo-dev-client: 3a5d838e562927099488c094acba1818296c6bc6
expo-dev-launcher: 0336379dae2faeb2da861c61977a6fbd02ab52f1
expo-dev-menu: 11322d81c62f966399ec162383a8488b55cce366
Expo: f3e39cddde295c79d206e972a59693cbb329ef46
expo-dev-client: 05a436763435d5f50bbdbcc51adf8b0b55d8dabc
expo-dev-launcher: 140874617542fa32908b1710775bca3ff4bd66c6
expo-dev-menu: 101ecf9a992bc3d51841b31e4301f4ca54600ad4
expo-dev-menu-interface: be32c09f1e03833050f0ee290dcc86b3ad0e73e4
ExpoAsset: 323700f291684f110fb55f0d4022a3362ea9f875
ExpoBlur: fa53f874e7b208bc3756d1bf07903c12e790beb1
Expand Down
4 changes: 3 additions & 1 deletion ios/TestFlight/WhatToTest.en-US.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
- New quick links
- New quick links card on the dashboard
- Performance improvements
- Bug fixes
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@tanstack/react-query-persist-client": "^5.51.23",
"@th3rdwave/react-navigation-bottom-sheet": "^0.3.2",
"color": "^4.2.3",
"expo": "~51.0.25",
"expo": "~51.0.26",
"expo-application": "~5.9.1",
"expo-blur": "~13.0.2",
"expo-brightness": "~12.0.1",
Expand All @@ -52,7 +52,6 @@
"expo-navigation-bar": "~3.0.7",
"expo-router": "~3.5.21",
"expo-secure-store": "~13.0.2",
"expo-splash-screen": "~0.27.5",
"expo-system-ui": "~3.0.7",
"fuse.js": "^7.0.0",
"graphql": "^16.9.0",
Expand Down Expand Up @@ -99,7 +98,6 @@
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/color": "^3.0.6",
"@types/geojson": "^7946.0.14",
"@types/node": "^22.1.0",
"@types/prop-types": "^15.7.12",
"@types/react": "~18.2.79",
"@types/sanitize-html": "^2.11.0",
Expand All @@ -118,7 +116,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-native": "^4.1.0",
"expo-atlas": "^0.3.11",
"expo-dev-client": "~4.0.21",
"expo-dev-client": "~4.0.22",
"husky": "^9.1.4",
"lint-staged": "^15.2.8",
"prettier": "3.2.5",
Expand Down
15 changes: 6 additions & 9 deletions src/api/thi-session-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ export async function callWithSession<T>(
} catch (e) {
throw new NoSessionError()
}

return await method(session)
} else {
throw new NoSessionError()
Expand Down Expand Up @@ -211,20 +210,18 @@ export async function forgetSession(): Promise<void> {
const session = load('session')
if (session === null) {
console.log('No session to forget')
return
} else {
try {
await API.logout(session)
} catch (e) {
console.error(e)
}
}

try {
await API.logout(session)
} catch (e) {
console.error(e)
}
await Promise.all([
SecureStore.deleteItemAsync('session'),
SecureStore.deleteItemAsync('username'),
SecureStore.deleteItemAsync('password'),
SecureStore.deleteItemAsync('userFullName'),
SecureStore.deleteItemAsync('userType'),
])

// clear all AsyncStorage data except analytics
Expand Down
14 changes: 4 additions & 10 deletions src/app/(flow)/onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import WhatsNewBox from '@/components/Elements/Flow/WhatsnewBox'
import LogoSVG from '@/components/Elements/Flow/svgs/logo'
import LogoTextSVG from '@/components/Elements/Flow/svgs/logoText'
import { type Colors } from '@/components/colors'
import { FlowContext, UserKindContext } from '@/components/contexts'
import { PRIVACY_URL, USER_GUEST } from '@/data/constants'
import { FlowContext } from '@/components/contexts'
import { PRIVACY_URL } from '@/data/constants'
import { getContrastColor } from '@/utils/ui-utils'
import { useTheme } from '@react-navigation/native'
import * as Haptics from 'expo-haptics'
Expand Down Expand Up @@ -34,7 +34,6 @@ import Shimmer from 'react-native-shimmer'

export default function OnboardingScreen(): JSX.Element {
const flow = React.useContext(FlowContext)
const userkind = React.useContext(UserKindContext)
const { t } = useTranslation('flow')

const data = [
Expand Down Expand Up @@ -82,13 +81,8 @@ export default function OnboardingScreen(): JSX.Element {
flow.setOnboarded(true)
flow.setUpdated(true)
flow.setAnalyticsAllowed(true)

if (userkind.userKind === USER_GUEST) {
router.navigate('login')
router.setParams({ fromOnboarding: 'true' })
} else {
router.replace('(tabs)/(index)')
}
router.navigate('login')
router.setParams({ fromOnboarding: 'true' })
}}
disabled={buttonDisabled}
>
Expand Down
8 changes: 4 additions & 4 deletions src/app/(flow)/whatsnew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function WhatsNewScreen(): JSX.Element {
setTimeout(() => {
opacityValues.forEach((opacity, index) => {
opacity.value = withDelay(
index * 440,
index * 400,
withTiming(1, {
duration: 800,
easing: Easing.linear,
Expand All @@ -84,7 +84,7 @@ export default function WhatsNewScreen(): JSX.Element {
}, [])

return (
<View style={styles.page}>
<View style={{ ...styles.page, backgroundColor: colors.contrast }}>
<View style={styles.titleBox}>
<Text
style={[
Expand Down Expand Up @@ -242,14 +242,14 @@ const styles = StyleSheet.create({
},
button: {
borderRadius: 7,
paddingVertical: 12,
paddingVertical: 15,
paddingHorizontal: 20,
width: '50%',
alignSelf: 'center',
},
buttonText: {
textAlign: 'center',
fontWeight: '500',
fontWeight: '600',
fontSize: 15,
},
})
2 changes: 1 addition & 1 deletion src/app/(screens)/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function About(): JSX.Element {
title: 'System Status',
icon: {
ios: 'bubble.left.and.exclamationmark.bubble.right',
android: 'sync_problem',
android: 'troubleshoot',
},
onPress: () => {
void Linking.openURL(STATUS_URL)
Expand Down
1 change: 1 addition & 0 deletions src/app/(screens)/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default function Login(): JSX.Element {
}>()

const navigateHome = (): void => {
console.log('navigateHome', fromOnboarding)
if (fromOnboarding === 'true') {
router.dismissAll()
router.replace('(tabs)/(index)')
Expand Down
2 changes: 1 addition & 1 deletion src/app/(screens)/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default function Settings(): JSX.Element {
ios: 'fork.knife',
},
onPress: () => {
router.navigate('preferences')
router.navigate('foodPreferences')
},
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/app/(tabs)/(index)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export default function Layout(): JSX.Element {
backgroundColor: colors.labelSecondaryColor,
},
backdropComponent: renderBackdrop,
stackBehavior: 'replace',
enableDynamicSizing: true,
}}
/>
)
Expand Down
1 change: 0 additions & 1 deletion src/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default function HomeLayout(): JSX.Element {
const prepare = async (): Promise<void> => {
const tabsPaths = ['/', '/timetable', '/map', '/food', '/links']
const isTab = tabsPaths.includes(pathname)

if (isOnboarded !== true) {
await NavigationBar.setBackgroundColorAsync(colors.contrast)
return
Expand Down
Loading

0 comments on commit 3a9a58c

Please sign in to comment.