From a08e7f5950bb485cd477389083ee0e9fe1cf08c2 Mon Sep 17 00:00:00 2001 From: Robert Eggl Date: Fri, 13 Dec 2024 12:40:22 +0100 Subject: [PATCH] feat(app): add truly native tabbar (#128) --- android/app/build.gradle | 2 +- android/app/src/main/res/values/strings.xml | 2 +- android/app/src/main/res/values/styles.xml | 2 +- app.config.json | 15 +- bun.lockb | Bin 680776 -> 666552 bytes ios/NeulandNext.xcodeproj/project.pbxproj | 133 ++++------ ios/Podfile | 4 +- ios/Podfile.lock | 170 ++++++++---- ios/Podfile.properties.json | 3 +- package.json | 19 +- patches/react-native-paper@5.12.5.patch | 247 ------------------ src/app/(screens)/lecturers.tsx | 6 +- src/app/(tabs)/(food)/_layout.tsx | 27 -- src/app/(tabs)/(index)/index.tsx | 6 +- src/app/(tabs)/(timetable)/_layout.tsx | 27 -- src/app/(tabs)/(timetable)/timetable.tsx | 155 ----------- src/app/(tabs)/_layout.tsx | 5 +- src/app/(tabs)/food.tsx | 40 +++ src/app/(tabs)/map.tsx | 2 +- src/app/(tabs)/timetable.tsx | 25 ++ src/assets/tabbar/calendar_month.svg | 1 + src/assets/tabbar/calendar_month_fill.svg | 1 + src/assets/tabbar/food.svg | 2 + src/assets/tabbar/food_fill.svg | 1 + src/assets/tabbar/home.svg | 1 + src/assets/tabbar/home_fill.svg | 1 + src/assets/tabbar/map.svg | 1 + src/assets/tabbar/map_fill.svg | 1 + src/components/Cards/AnnouncementCard.tsx | 6 +- src/components/Cards/CalendarCard.tsx | 2 +- src/components/Cards/EventsCard.tsx | 2 +- src/components/Cards/FoodCard.tsx | 2 +- src/components/Cards/LibraryCard.tsx | 2 +- src/components/Cards/LinkCard.tsx | 2 +- src/components/Cards/LoginCard.tsx | 2 +- src/components/Cards/NewsCard.tsx | 45 +++- src/components/Cards/TimetableCard.tsx | 2 +- .../Food/FoodScreen.tsx} | 47 +--- src/components/Food/HeaderRight.tsx | 4 +- src/components/Layout/DefaultTabs.tsx | 139 ---------- src/components/Layout/MaterialTabbar.tsx | 16 -- src/components/Layout/MaterialTabs.tsx | 161 ------------ src/components/Layout/NativeBottomTabs.tsx | 8 + src/components/Layout/Tabbar.tsx | 100 +++++++ src/components/Map/BottomSheetBackground.tsx | 2 +- src/components/Map/BottomSheetMap.tsx | 1 - src/components/Map/MapScreen.tsx | 22 +- src/components/Map/NextLectureSuggestion.tsx | 2 +- src/components/Timetable/HeaderButtons.tsx | 7 +- src/components/Timetable/TimetableList.tsx | 11 +- src/components/Timetable/TimetableScreen.tsx | 163 ++++++++++++ src/components/Timetable/TimetableWeek.tsx | 2 +- src/components/Universal/FormList.tsx | 12 +- src/components/Universal/ShareButton.tsx | 2 +- src/components/Universal/WorkaroundStack.tsx | 15 +- src/components/provider.tsx | 5 +- src/data/licenses.json | 30 ++- src/types/timetable.ts | 7 + src/utils/food-utils.ts | 6 +- src/utils/timetable-utils.ts | 12 + 60 files changed, 692 insertions(+), 1046 deletions(-) delete mode 100644 patches/react-native-paper@5.12.5.patch delete mode 100644 src/app/(tabs)/(food)/_layout.tsx delete mode 100644 src/app/(tabs)/(timetable)/_layout.tsx delete mode 100644 src/app/(tabs)/(timetable)/timetable.tsx create mode 100644 src/app/(tabs)/food.tsx create mode 100644 src/app/(tabs)/timetable.tsx create mode 100644 src/assets/tabbar/calendar_month.svg create mode 100644 src/assets/tabbar/calendar_month_fill.svg create mode 100644 src/assets/tabbar/food.svg create mode 100644 src/assets/tabbar/food_fill.svg create mode 100644 src/assets/tabbar/home.svg create mode 100644 src/assets/tabbar/home_fill.svg create mode 100644 src/assets/tabbar/map.svg create mode 100644 src/assets/tabbar/map_fill.svg rename src/{app/(tabs)/(food)/index.tsx => components/Food/FoodScreen.tsx} (90%) delete mode 100644 src/components/Layout/DefaultTabs.tsx delete mode 100644 src/components/Layout/MaterialTabbar.tsx delete mode 100644 src/components/Layout/MaterialTabs.tsx create mode 100644 src/components/Layout/NativeBottomTabs.tsx create mode 100644 src/components/Layout/Tabbar.tsx create mode 100644 src/components/Timetable/TimetableScreen.tsx create mode 100644 src/types/timetable.ts diff --git a/android/app/build.gradle b/android/app/build.gradle index 0c3befb2..1b4f0cbc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,7 +91,7 @@ android { applicationId 'app.neuland' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 262 + versionCode 265 versionName "0.11.0" } signingConfigs { diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 8eeca487..65fbd8aa 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,6 +1,6 @@ Neuland Next contain - false + true automatic \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 6351ad73..ac96e85f 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,5 +1,5 @@ -