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

Initialize mobile app with Ignite red react-native template #2026

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion apps/desktop-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@umami/tzkt": "workspace:^",
"date-fns": "^4.1.0",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react": "catalog:",
"start-server-and-test": "^2.0.8",
"typescript": "^5.5.4"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
"prettier-plugin-gherkin": "^3.1.0",
"process": "^0.11.10",
"promise-retry": "^2.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "catalog:",
"react-dom": "catalog:",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.52.2",
"react-player": "^2.16.0",
Expand All @@ -138,7 +138,7 @@
"react-refresh": "^0.14.2",
"react-remove-scroll": "^2.6.0",
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.26.1",
"react-router-dom": "catalog:",
"react-test-renderer": "^18.3.1",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down
6 changes: 3 additions & 3 deletions apps/embed-iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@umami/tezos": "workspace:^",
"@vercel/analytics": "^1.3.1",
"framer-motion": "^11.11.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.1"
"react": "catalog:",
"react-dom": "catalog:",
"react-router-dom": "catalog:"
},
"devDependencies": {
"@umami/eslint-config": "workspace:^",
Expand Down
8 changes: 8 additions & 0 deletions apps/mobile/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
ios
android
.expo
.vscode
ignite/ignite.json
package.json
.eslintignore
54 changes: 54 additions & 0 deletions apps/mobile/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: [
"standard",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-native/all",
// `expo` must come after `standard` or its globals configuration will be overridden
"expo",
// `jsx-runtime` must come after `expo` or it will be overridden
"plugin:react/jsx-runtime",
"prettier",
],
plugins: ["reactotron", "prettier"],
rules: {
"prettier/prettier": "error",
// typescript-eslint
"@typescript-eslint/array-type": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-var-requires": 0,
// eslint
"no-use-before-define": 0,
"no-restricted-imports": [
"error",
{
paths: [
// Prefer named exports from 'react' instead of importing `React`
{
name: "react",
importNames: ["default"],
message: "Import named exports from 'react' instead.",
},
],
},
],
//react-native
"react-native/no-raw-text": 0,
// reactotron
"reactotron/no-tron-in-production": "error",
// eslint-config-standard overrides
"comma-dangle": 0,
"no-global-assign": 0,
"quotes": 0,
"space-before-function-paren": 0,
},
}
92 changes: 92 additions & 0 deletions apps/mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ignite-specific items below
# You can safely replace everything above this comment with whatever is
# in the default .gitignore generated by React-Native CLI

# VS Code
.vscode

# Expo
.expo/*
bin/Exponent.app
/android
/ios
expo-env.d.ts

## Secrets
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/

# Configurations
!env.js

/coverage

# Yarn
.yarn/*
35 changes: 35 additions & 0 deletions apps/mobile/.maestro/FavoritePodcast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# flow: run the login flow and then navigate to the demo podcast list screen, favorite a podcast, and then switch the list to only be favorites.

appId: com.mobile
env:
FAVORITES_TEXT: "Switch on to only show favorites"

---
- runFlow: Login.yaml
- tapOn: "Podcast"
- assertVisible: "React Native Radio episodes"
- tapOn:
text: ${FAVORITES_TEXT}
- assertVisible: "This looks a bit empty"
- tapOn:
text: ${FAVORITES_TEXT}
# https://maestro.mobile.dev/troubleshooting/known-issues#android-accidental-double-tap
retryTapIfNoChange: false
- repeat:
times: 2
commands:
- scroll
- copyTextFrom:
text: "^RNR.*" # assumes all podcast titles start with RNR
index: 1 # grab the second one, the first one might not be fully visible
- longPressOn: ${maestro.copiedText}
- scrollUntilVisible:
element:
text: ${FAVORITES_TEXT}
direction: UP
timeout: 50000
speed: 40
visibilityPercentage: 100
- tapOn:
text: ${FAVORITES_TEXT}
- assertVisible: ${maestro.copiedText}
18 changes: 18 additions & 0 deletions apps/mobile/.maestro/Login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#flow: Login
#intent:
# Open up our app and use the default credentials to login
# and navigate to the demo screen

appId: com.mobile # the app id of the app we want to test
# You can find the appId of an Ignite app in the `app.json` file
# as the "package" under the "android" section and "bundleIdentifier" under the "ios" section
---
- clearState # clears the state of our app (navigation and authentication)
- launchApp # launches the app
- assertVisible: "Log In"
- tapOn:
text: "Tap to Log in!"
- assertVisible: "Your app, almost ready for launch!"
- tapOn:
text: "Let's go!"
- assertVisible: "Components to jump start your project!"
2 changes: 2 additions & 0 deletions apps/mobile/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
undefined
node-linker=hoisted
8 changes: 8 additions & 0 deletions apps/mobile/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
ios
android
.expo
.vscode
ignite/ignite.json
package.json
.eslintignore
7 changes: 7 additions & 0 deletions apps/mobile/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": false,
"trailingComma": "all",
"quoteProps": "consistent"
}
Loading
Loading