Skip to content

Commit

Permalink
Merge branch 'main' of github.com:wyne/scorepad-react-native into nav…
Browse files Browse the repository at this point in the history
…igation-tests
  • Loading branch information
wyne committed Mar 22, 2024
2 parents 4a19939 + 82f14b1 commit f016f22
Show file tree
Hide file tree
Showing 151 changed files with 26,777 additions and 13,784 deletions.
19 changes: 18 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
jest: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
Expand All @@ -16,6 +16,23 @@ module.exports = {
'jest/no-disabled-tests': 0,
'semi': ['error', 'always'],
'eol-last': ['error', 'always'],
'import/order': ['error', {
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'alphabetize': {
'order': 'asc',
'caseInsensitive': true,
},
'newlines-between': 'always',
}],
'import/no-duplicates': 'error',
},
ignorePatterns: ['web-build', '__mocks__'],
};
6 changes: 3 additions & 3 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: Install and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
- uses: expo/expo-github-action@8.0.0
- uses: expo/expo-github-action@8.2.1
with:
expo-version: 4.x
token: ${{ secrets.EXPO_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.19.0
18.18.0
37 changes: 28 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
import React from 'react';

import analytics from '@react-native-firebase/analytics';
import { StatusBar } from 'expo-status-bar';
import { View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { MenuProvider } from 'react-native-popup-menu';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistor } from './redux/store';
import { StatusBar } from 'expo-status-bar';

import { persistor, store } from './redux/store';
import { AddendModalContextProvider } from './src/components/Sheets/AddendModalContext';
import { GameSheetContextProvider } from './src/components/Sheets/GameSheetContext';
import { Navigation } from './src/Navigation';
import { View } from 'react-native';

if (process.env.EXPO_PUBLIC_FIREBASE_ANALYTICS == "false") {
analytics().setAnalyticsCollectionEnabled(false);
}

export default function App() {
return (
<View style={{ flex: 1, backgroundColor: '#fff' }}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<StatusBar />
<Navigation />
</PersistGate>
</Provider>
<GestureHandlerRootView style={{ flex: 1 }}>
<Provider store={store}>
<GameSheetContextProvider>
<MenuProvider>
<AddendModalContextProvider>
<PersistGate loading={null} persistor={persistor}>
<StatusBar />
<Navigation />
</PersistGate>
</AddendModalContextProvider>
</MenuProvider>
</GameSheetContextProvider>
</Provider>
</GestureHandlerRootView>
</View>
);
};
5 changes: 4 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Run any build command remotely by removing `--local` flag.

### Development - Simulator

Prerequisite: `SENTRY_AUTH_TOKEN` in `.env`
For android, use JDK 17.

```zsh
npx react-native-clean-project
npx expo prebuild
eas build --profile development-simulator --platform ios --local
eas build --profile development-simulator --platform android --local
eas build:run -p ios # select expo build from above
eas build:run -p android # select expo build from above
npx expo start --dev-client
Expand Down Expand Up @@ -43,6 +44,8 @@ npx eas-cli build --platform android --profile preview --local

### Production Build

Remember to bump `versionCode` and `buildNumber` in `app.config.js`.

```zsh
npx expo-doctor
npx expo prebuild
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ https://github.com/wyne/scorepad-react-native/assets/1986068/05bde405-3025-4156-

## Website

https://wyne.github.io/scorepad/
https://www.scorepadapp.com

## Contributing

Expand Down
173 changes: 85 additions & 88 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,102 @@ const variant = process.env.APP_VARIANT;

let packageName;
switch (variant) {
case 'development':
packageName = 'com.wyne.scorepad.dev';
break;
case 'preview':
packageName = 'com.wyne.scorepad.preview';
break;
default:
packageName = 'com.wyne.scorepad';
break;
case "development":
packageName = "com.wyne.scorepad.dev";
break;
case "preview":
packageName = "com.wyne.scorepad.preview";
break;
default:
packageName = "com.wyne.scorepad";
break;
}

let name;
switch (variant) {
case 'development':
name = 'ScorePad with Rounds (dev)';
break;
case 'preview':
name = 'ScorePad with Rounds (preview)';
break;
default:
name = 'ScorePad with Rounds';
break;
case "development":
name = "ScorePad with Rounds (dev)";
break;
case "preview":
name = "ScorePad with Rounds (preview)";
break;
default:
name = "ScorePad with Rounds";
break;
}

let icon;
switch (variant) {
case 'development':
icon = './assets/icon-dev.png';
break;
case 'preview':
icon = './assets/icon-preview.png';
break;
default:
icon = './assets/icon.png';
break;
case "development":
icon = "./assets/icon-dev.png";
break;
case "preview":
icon = "./assets/icon-preview.png";
break;
default:
icon = "./assets/icon.png";
break;
}

export default {
name: name,
slug: 'scorepad',
version: "2.2.2",
orientation: "default",
icon: icon,
assetBundlePatterns: [
"assets/*"
],
backgroundColor: "#000000",
ios: {
bundleIdentifier: packageName,
supportsTablet: true,
requireFullScreen: false,
buildNumber: "57",
infoPlist: {
RCTAsyncStorageExcludeFromBackup: false
name: name,
slug: "scorepad",
version: "2.5.0",
orientation: "default",
icon: icon,
assetBundlePatterns: ["assets/*"],
backgroundColor: "#000000",
ios: {
bundleIdentifier: packageName,
supportsTablet: true,
requireFullScreen: false,
buildNumber: "73",
infoPlist: {
RCTAsyncStorageExcludeFromBackup: false,
},
googleServicesFile: "./GoogleService-Info.plist",
},
googleServicesFile: "./GoogleService-Info.plist",
},
android: {
icon: "./assets/adaptive-icon.png",
adaptiveIcon: {
"foregroundImage": "./assets/adaptive-icon-fg.png",
"backgroundImage": "./assets/adaptive-icon-bg.png"
android: {
icon: "./assets/adaptive-icon.png",
adaptiveIcon: {
foregroundImage: "./assets/adaptive-icon-fg.png",
backgroundImage: "./assets/adaptive-icon-bg.png",
},
package: packageName,
permissions: [],
versionCode: 73,
googleServicesFile: "./google-services.json",
},
package: packageName,
permissions: [],
versionCode: 57,
googleServicesFile: "./google-services.json",
},
userInterfaceStyle: "dark",
web: {
"favicon": "./assets/favicon.png"
},
extra: {
eas: {
projectId: 'fc8859ea-b320-41cd-a091-36b3ec7f9b1f'
}
},
updates: {
fallbackToCacheTimeout: 0,
url: "https://u.expo.dev/fc8859ea-b320-41cd-a091-36b3ec7f9b1f"
},
runtimeVersion: {
policy: "sdkVersion",
},
description: "",
githubUrl: "https://github.com/wyne/scorepad-react-native",
owner: "wyne",
plugins: [
"@react-native-firebase/app",
"@react-native-firebase/crashlytics",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static"
}
}
]
],
hooks: {
}
userInterfaceStyle: "dark",
web: {
favicon: "./assets/favicon.png",
},
extra: {
eas: {
projectId: "fc8859ea-b320-41cd-a091-36b3ec7f9b1f",
},
},
updates: {
fallbackToCacheTimeout: 0,
url: "https://u.expo.dev/fc8859ea-b320-41cd-a091-36b3ec7f9b1f",
},
runtimeVersion: {
policy: "sdkVersion",
},
description: "",
githubUrl: "https://github.com/wyne/scorepad-react-native",
owner: "wyne",
plugins: [
"@react-native-firebase/app",
"@react-native-firebase/crashlytics",
[
"expo-build-properties",
{
ios: {
useFrameworks: "static",
},
},
],
],
hooks: {},
};
Binary file not shown.
18 changes: 18 additions & 0 deletions assets-stores/StoreAssets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Store Assets

## Test data

Uncomment the `preloadedState` in `src/store.js` to load test data.

## Devices

| Dimensions | Device |
| --- | --- |
| 6.5" (required) | iPhone 14 Plus |
| 5.5" (required) | iPhone 8 Plus |
| 12.9" (required) | iPad Pro (6th gen) |

## Generating Screenshots

https://appscreens.com/

Binary file added assets-stores/apple/iOS Phones - 5.5/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 5.5/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 5.5/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 5.5/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.5/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.5/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.5/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.5/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.7/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.7/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.7/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets-stores/apple/iOS Phones - 6.7/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets-stores/ipadpro-11/configure.png
Diff not rendered.
Binary file removed assets-stores/ipadpro-11/home-2-players.png
Diff not rendered.
Diff not rendered.
Binary file removed assets-stores/ipadpro-11/home-many-players.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed assets-stores/iphone13pro/configure-4-players.png
Diff not rendered.
Binary file removed assets-stores/iphone13pro/home-2-players.png
Diff not rendered.
Diff not rendered.
Binary file removed assets-stores/iphone13pro/home-4-players.png
Diff not rendered.
Binary file removed assets-stores/iphone14/demo.mp4
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed assets/onboarding/add.jpg
Diff not rendered.
Binary file modified assets/onboarding/add.png
Binary file added assets/onboarding/addend-button.png
Binary file added assets/onboarding/addend.png
Binary file added assets/onboarding/multiplier.jpeg
Binary file removed assets/onboarding/multiplier.png
Diff not rendered.
Binary file modified assets/onboarding/rounds.png
Binary file added assets/onboarding/sheet.png
Binary file added assets/onboarding/slide.png
Binary file modified assets/onboarding/subtract.png
Binary file added assets/onboarding/tile.jpg
Binary file added assets/onboarding/tile.png
Binary file added assets/video/gesture-select.mp4
Binary file not shown.
Binary file added assets/video/swipe-gesture.mp4
Binary file not shown.
Binary file added assets/video/swipe-powerhold.mp4
Binary file not shown.
Loading

0 comments on commit f016f22

Please sign in to comment.