From ce535518a9a09d4f8afada53924de79da39fcdd7 Mon Sep 17 00:00:00 2001 From: Sergio Avalos Date: Thu, 2 Nov 2023 07:25:04 +0100 Subject: [PATCH 1/3] chore(docs): update ios_mac.md (#665) Minor typo --- docs/ios_mac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ios_mac.md b/docs/ios_mac.md index cb47f2ca..c43108b1 100644 --- a/docs/ios_mac.md +++ b/docs/ios_mac.md @@ -49,7 +49,7 @@ For more information, please visit [CocoaPods Getting Started guide](https://gui ### Running on a device -The above command will automatically run your app on the iOS Simulator by default. If you want to run the app on an actual physical iOS device, please follow the instructions [here](https://reactnative.dev/docs/running-on-device. +The above command will automatically run your app on the iOS Simulator by default. If you want to run the app on an actual physical iOS device, please follow the instructions [here](https://reactnative.dev/docs/running-on-device). ## Running the app From 34c376a727ad0bbfbd3f7be01aedb91d1705b34b Mon Sep 17 00:00:00 2001 From: Sebastian Palmqvist Date: Thu, 2 Nov 2023 07:27:34 +0100 Subject: [PATCH 2/3] feat: navigate from "Your Children" to specific tabs (#660) * chore (substring to only show firstname, size of name made bigger) * Co-authored-by: Lee Sheppard Co-authored-by: Lvan Ni * chore(size edit) Co-authored-by: Lee Sheppard Co-authored-by: Lvan Ni * feat (navigate to specific tabs from childlist) Co-authored-by: Lee Sheppard Co-authored-by: Lvan Ni * fix (title now gets inititated with correct value, not default "News") Co-authored-by: Lee Sheppard Co-authored-by: Lvan Ni * Revert "feat (navigate to specific tabs from childlist)" This reverts commit 8af068946d566d6a3f4575b9cea6d65abd2a2a8d. * fix(correct title showing in header) * fix(removed TouchableOpacity. Using Pressable) Co-authored-by: Lee Sheppard Co-authored-by: Lvan Ni --------- Co-authored-by: Lvan Ni --- .../components/child.component.tsx | 5 +- .../components/childListItem.component.tsx | 116 +++++++++++------- .../components/navigationTitle.component.tsx | 8 +- 3 files changed, 85 insertions(+), 44 deletions(-) diff --git a/apps/skolplattformen-app/components/child.component.tsx b/apps/skolplattformen-app/components/child.component.tsx index c7985cb6..cfc05358 100644 --- a/apps/skolplattformen-app/components/child.component.tsx +++ b/apps/skolplattformen-app/components/child.component.tsx @@ -139,7 +139,10 @@ const TabNavigator = ({ ) const getHeaderTitle = (route: any) => { - const routeName = getFocusedRouteNameFromRoute(route) ?? 'News' + const routeName = + getFocusedRouteNameFromRoute(route) ?? + route.params.initialRouteName ?? + 'News' return getRouteTitleFromName(routeName) } diff --git a/apps/skolplattformen-app/components/childListItem.component.tsx b/apps/skolplattformen-app/components/childListItem.component.tsx index 8ca199f5..4ec4d97c 100644 --- a/apps/skolplattformen-app/components/childListItem.component.tsx +++ b/apps/skolplattformen-app/components/childListItem.component.tsx @@ -18,7 +18,7 @@ import { } from '@ui-kitten/components' import moment, { Moment } from 'moment' import React, { useEffect } from 'react' -import { TouchableOpacity, useColorScheme, View } from 'react-native' +import { Pressable, useColorScheme, View } from 'react-native' import { useTranslation } from '../hooks/useTranslation' import { Colors, Layout, Sizing } from '../styles' import { getMeaningfulStartingDate } from '../utils/calendarHelpers' @@ -157,11 +157,15 @@ export const ChildListItem = ({ ) return ( - navigation.navigate('Child', { child, color })} - > - - + + + [ + styles.cardHeaderLeft || {}, + { opacity: pressed ? 0.5 : 1 }, + ]} + onPress={() => navigation.navigate('Child', { child, color })} + > @@ -178,16 +182,37 @@ export const ChildListItem = ({ name="star" /> - + + + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'Calendar', + }) + } + > - {scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => ( {`${calendarItem.title} (${displayDate(calendarItem.startDate)})`} ))} + + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'News', + }) + } + > {t('navigation.news')} @@ -202,43 +227,52 @@ export const ChildListItem = ({ {newsItem.header ?? ''} ))} + - {scheduleAndCalendarThisWeek.length || - notificationsThisWeek.length || - newsThisWeek.length ? null : ( - - {t('news.noNewNewsItemsThisWeek')} + {scheduleAndCalendarThisWeek.length || + notificationsThisWeek.length || + newsThisWeek.length ? null : ( + + {t('news.noNewNewsItemsThisWeek')} + + )} + {shouldShowLunchMenu ? ( + ['' || {}, { opacity: pressed ? 0.5 : 1 }]} + onPress={() => + navigation.navigate('Child', { + child, + color, + initialRouteName: 'Menu', + }) + } + > + + {meaningfulStartingDate.format( + '[' + t('schedule.lunch') + '] dddd' + )} - )} - {shouldShowLunchMenu ? ( - <> - - {meaningfulStartingDate.format( - '[' + t('schedule.lunch') + '] dddd' - )} - - - {menu[meaningfulStartingDate.isoWeekday() - 1]?.description} - - - ) : null} + + {menu[meaningfulStartingDate.isoWeekday() - 1]?.description} + + + ) : null} - - - + + - + ) } diff --git a/apps/skolplattformen-app/components/navigationTitle.component.tsx b/apps/skolplattformen-app/components/navigationTitle.component.tsx index 1b7dbba9..5543175b 100644 --- a/apps/skolplattformen-app/components/navigationTitle.component.tsx +++ b/apps/skolplattformen-app/components/navigationTitle.component.tsx @@ -19,7 +19,11 @@ export const NavigationTitle = ({ title, subtitle }: NavigationTitleProps) => { {title} )} - {subtitle && {subtitle}} + {subtitle && ( + + {subtitle.substring(0, subtitle.indexOf(' '))} + + )} ) } @@ -32,5 +36,5 @@ const styles = StyleSheet.create({ ...fontSize.sm, fontWeight: '500', }, - subtitle: { ...fontSize.xxs }, + subtitle: { ...fontSize.base }, }) From ab90b944aef714bd682ffa301c2ce3d1b235ec7a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 2 Nov 2023 07:30:50 +0100 Subject: [PATCH 3/3] chore(release): 2.16.0 [skip ci] # [2.16.0](https://github.com/kolplattformen/skolplattformen/compare/v2.15.10...v2.16.0) (2023-11-02) ### Features * navigate from "Your Children" to specific tabs ([#660](https://github.com/kolplattformen/skolplattformen/issues/660)) ([34c376a](https://github.com/kolplattformen/skolplattformen/commit/34c376a727ad0bbfbd3f7be01aedb91d1705b34b)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3550ec3..97f222f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.16.0](https://github.com/kolplattformen/skolplattformen/compare/v2.15.10...v2.16.0) (2023-11-02) + + +### Features + +* navigate from "Your Children" to specific tabs ([#660](https://github.com/kolplattformen/skolplattformen/issues/660)) ([34c376a](https://github.com/kolplattformen/skolplattformen/commit/34c376a727ad0bbfbd3f7be01aedb91d1705b34b)) + ## [2.15.10](https://github.com/kolplattformen/skolplattformen/compare/v2.15.9...v2.15.10) (2023-10-07) diff --git a/package.json b/package.json index ea22aa30..33b4aaf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "skolplattformen", - "version": "2.15.10", + "version": "2.16.0", "license": "MIT", "scripts": { "start": "nx start",