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

Merge fix/collapsible en veel meer #292

Merged
merged 26 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 12 additions & 8 deletions .github/workflows/expo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
semVer: ${{steps.gitversion.outputs.semVer}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gittools/actions/gitversion/setup@v0.9.8
- uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/execute@v0.9.8
- uses: gittools/actions/gitversion/execute@v3.0.0
id: gitversion
- uses: rickstaa/action-create-tag@v1
with:
Expand All @@ -35,8 +35,8 @@ jobs:
EXPO_PUBLIC_CONTENT_ROOT: Staging
environment: Staging
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: 20.x
- uses: expo/expo-github-action@v6
Expand All @@ -45,6 +45,8 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: yarn install --immutable
- name: Generate licenses.json
run: yarn generate-licenses
- run: eas update --branch staging --message ${{env.SEMVER}}
production:
name: Build and deploy
Expand All @@ -56,8 +58,8 @@ jobs:
EXPPO_PUBLIC_CONTENT_ROOT: Production
environment: Production
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: 20.x

Expand All @@ -67,4 +69,6 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: yarn install --immutable
- run: eas update --branch production --message ${{env.SEMVER}}
- name: Generate licenses.json
run: yarn generate-licenses
- run: eas update --branch production --message ${{env.SEMVER}} && npx sentry-expo-upload-sourcemaps dist
8 changes: 4 additions & 4 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 20.x
- uses: gittools/actions/gitversion/setup@v0.9.8
- uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/execute@v0.9.8
- uses: gittools/actions/gitversion/execute@v3.0.0
- run: yarn install
- run: yarn run lint
8 changes: 5 additions & 3 deletions .github/workflows/store-submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
env:
EXPO_PUBLIC_CONTENT_ROOT: Production
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gittools/actions/gitversion/setup@v0.9.8
- uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/execute@v0.9.8
- uses: gittools/actions/gitversion/execute@v3.0.0
id: gitversion
- uses: actions/setup-node@v2
with:
Expand All @@ -31,5 +31,7 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Generate licenses.json
run: yarn generate-licenses
- name: Build on EAS
run: eas build --platform all --non-interactive
1 change: 1 addition & 0 deletions __azurite_db_blob__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"filename":"/Users/thomasdewulf/repos/FOS/saamdagen/__azurite_db_blob__.json","collections":[{"name":"$SERVICES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{},"constraints":null,"uniqueNames":["accountName"],"transforms":{},"objType":"$SERVICES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$CONTAINERS_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"accountName":{"name":"accountName","dirty":false,"values":[]},"name":{"name":"name","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$CONTAINERS_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$BLOBS_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"accountName":{"name":"accountName","dirty":false,"values":[]},"containerName":{"name":"containerName","dirty":false,"values":[]},"name":{"name":"name","dirty":false,"values":[]},"snapshot":{"name":"snapshot","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$BLOBS_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$BLOCKS_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"accountName":{"name":"accountName","dirty":false,"values":[]},"containerName":{"name":"containerName","dirty":false,"values":[]},"blobName":{"name":"blobName","dirty":false,"values":[]},"name":{"name":"name","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$BLOCKS_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":5000,"autosaveHandle":null,"throttledSaves":true,"options":{"persistenceMethod":"fs","autosave":true,"autosaveInterval":5000,"serializationMethod":"normal","destructureDelimiter":"$<\n"},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"}
1 change: 1 addition & 0 deletions __azurite_db_blob_extent__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"filename":"/Users/thomasdewulf/repos/FOS/saamdagen/__azurite_db_blob_extent__.json","collections":[{"name":"$EXTENTS_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"id":{"name":"id","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$EXTENTS_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":5000,"autosaveHandle":null,"throttledSaves":true,"options":{"persistenceMethod":"fs","autosave":true,"autosaveInterval":5000,"serializationMethod":"normal","destructureDelimiter":"$<\n"},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"}
45 changes: 21 additions & 24 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
import { ExpoConfig, ConfigContext } from '@expo/config';
import 'dotenv/config';
import { withSentry } from '@sentry/react-native/expo';

export default ({ config }: ConfigContext): Partial<ExpoConfig> => ({
...config,
runtimeVersion: {
policy: 'sdkVersion',
},
updates: {
url: 'https://u.expo.dev/7830594e-890b-4c9e-89cf-b91bf1926f72',
},
extra: {
eas: {
projectId: '7830594e-890b-4c9e-89cf-b91bf1926f72',
export default withSentry(
//@ts-expect-error withSentry expects full config, only passing Partial
({ config }: ConfigContext): Partial<ExpoConfig> => ({
...config,
runtimeVersion: {
policy: 'sdkVersion',
},
},
plugins: [
[
'@sentry/react-native/expo',
{
organization: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
updates: {
url: 'https://u.expo.dev/7830594e-890b-4c9e-89cf-b91bf1926f72',
},
extra: {
eas: {
projectId: '7830594e-890b-4c9e-89cf-b91bf1926f72',
},
],
'expo-asset',
'expo-font',
'expo-router',
],
});
},
}),
{
organization: 'fosopenscouting',
project: 'saamdagen-app',
url: 'https://sentry.io/',
},
);
82 changes: 42 additions & 40 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
{
"expo": {
"name": "Saamdagen",
"slug": "saamdagen",
"version": "#{APP_VERSION}#",
"owner": "fos-open-scouting",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "saamdagen",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash_new.png",
"resizeMode": "cover",
"backgroundColor": "#00549F"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"buildNumber": "7",
"supportsTablet": true,
"bundleIdentifier": "be.fos.saamdagen",
"infoPlist": {
"NSCameraUsageDescription": "Je camera wordt gebruikt om je ticket te scannen en zo persoonlijke info te krijgen zoals bijvoorbeeld de workshops waarvoor je bent ingeschreven.",
"UIBackgroundModes": ["fetch"]
}
},
"android": {
"package": "be.fos.saamdagen",
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundImage": "./assets/images/adaptive-icon-bg.png"
},
"permissions": ["CAMERA"]
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"description": ""
}
"expo": {
"newArchEnabled": true,
"name": "Saamdagen",
"slug": "saamdagen",
"version": "#{APP_VERSION}#",
"owner": "fos-open-scouting",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "saamdagen",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash_new.png",
"resizeMode": "cover",
"backgroundColor": "#00549F"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"buildNumber": "7",
"supportsTablet": true,
"bundleIdentifier": "be.fos.saamdagen",
"infoPlist": {
"NSCameraUsageDescription": "Je camera wordt gebruikt om je ticket te scannen en zo persoonlijke info te krijgen zoals bijvoorbeeld de workshops waarvoor je bent ingeschreven.",
"UIBackgroundModes": ["fetch"]
}
},
"android": {
"package": "be.fos.saamdagen",
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundImage": "./assets/images/adaptive-icon-bg.png"
},
"permissions": ["CAMERA"]
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"description": "",
"plugins": ["expo-asset", "expo-font", "expo-router"]
}
}
66 changes: 0 additions & 66 deletions app/(tabs)/faq.tsx

This file was deleted.

35 changes: 35 additions & 0 deletions app/(tabs)/faq/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';

import { Stack } from 'expo-router';
import SaamdagenAppbar from '@/components/SaamdagenAppbar';
import Colors from '@/constants/Colors';
import useColorScheme from '@/hooks/useColorScheme';

export const unstable_settings = {
initialRouteName: 'index',
};

export default function MoreLayout() {
const colorScheme = useColorScheme();

return (
<>
<Stack
screenOptions={{
header: (props) => <SaamdagenAppbar {...props} />,
headerStyle: Colors[colorScheme].tabBarStyle,
headerTitleStyle: {
fontFamily: 'Quicksand_600SemiBold',
},
}}
>
<Stack.Screen
name="index"
options={{
headerTitle: 'Info',
}}
/>
</Stack>
</>
);
}
50 changes: 50 additions & 0 deletions app/(tabs)/faq/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React, { useEffect, useState } from 'react';

import { FlatList, RefreshControl, StyleSheet } from 'react-native';
import { Separator, View } from '@/components/Themed/Themed';
import { useDataContext } from '@/hooks/useDataContext';
import { ContentMetadata } from '@/models/ContentMetadata';
import { FAQ_ITEMS } from '@/constants/Strings';
import FaqCard from '@/components/FaqCard';

const FaqScreen: React.FC = () => {
const { data, refreshContext, refreshing } = useDataContext();
const [faqData, setFaqData] = useState<ContentMetadata>();

useEffect(() => {
if (data) {
const filtered = data.filter((x) => x.key === FAQ_ITEMS)[0];
setFaqData(filtered);
}
}, [data]);

const handleRefresh = async () => {
await refreshContext();
};

return (
<View style={styles.container}>
<FlatList
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} />
}
keyExtractor={(item) => item.title}
data={faqData?.content}
renderItem={({ item }) => (
<FaqCard title={item.title} text={item.content} icon={item.icon} />
)}
ItemSeparatorComponent={() => <Separator marginVertical={0} />}
ListFooterComponent={() => <Separator marginVertical={0} />}
/>
</View>
);
};

export default FaqScreen;

const styles = StyleSheet.create({
container: {
flex: 1,
height: 'auto',
},
});
Loading
Loading