From 1b9632a1df7b7dc459fcc4d90b9d5baa90190714 Mon Sep 17 00:00:00 2001 From: Hyo Date: Sun, 31 Jan 2021 09:55:45 +0900 Subject: [PATCH] Web support integrated in RN 0.63 (#162) * Configure react-native-web in project * Configured projects with all 3 platforms They almost look a like now. However still on more remaining issue is `fbt`. * Removed react-app-rewired and added craco * Fixed tests with correct fbtEnum path There was a space at the first of the path strings * More options to tsconfig * Fixed fbt for android * Refactor codes applying new eslint rules * Upgrade typescript to < 4.1 and > 3.9 Affected by the peer dep * Configured eslint rules * More lint fixes * Fixed false positiy eslint config upgrading package * Mocked @react-navigation/stack * Updated snapshots * Updated packages * Added v5 tag for dooboo-cli@5 compatibility Refer to https://github.com/dooboolab/dooboo-cli/pull/75 * TS config isolatedModules => false https://github.com/eveningkid/denodb/issues/146 * More lint fixes in root files * Set isolatedModules to true for in tsconfig * Generated fbts * Added `withScreen` util instead of wrapping whole screen * Remove i18n root which is moved to utils * Updated [ThemeProvider] and changed theme controls * Patch on new themeing and media queries * Updated button text color * Enable PWA Support (#163) * Updated packages and eslint config * Removed empty spaces in .gitignore * Removed generated i18n files from git * Update packages * Upgrade android sdk version to 29 * Circleci android sdk 29 image Co-authored-by: Donghyeon Kim <0916dhkim@gmail.com> --- .circleci/config.yml | 2 +- .dooboo/v5 | 0 .eslintignore | 2 + .eslintrc.js | 4 + .gitignore | 11 +- .prettierrc.js | 4 +- .vscode/settings.json | 1 - README.md | 2 +- android/app/build.gradle | 2 +- .../src/main/res/raw-en-rUS/localizable.json | 2 +- .../src/main/res/raw-ko-rKR/localizable.json | 2 +- android/build.gradle | 6 +- babel.config.js | 16 +- craco.config.js | 15 + environment.d.ts | 5 +- i18n/fbt/translatedFbts.json | 1 - index.js | 15 +- jest.config.js | 7 +- package.json | 83 +- public/favicon.ico | Bin 0 -> 1150 bytes public/index.html | 43 + public/logo192.png | Bin 0 -> 3914 bytes public/logo512.png | Bin 0 -> 12565 bytes public/manifest.json | 25 + public/robots.txt | 3 + public/service-worker.js | 58 + src/App.tsx | 2 +- src/apis/__tests__/sample.test.ts | 6 +- src/apis/sample.ts | 6 +- {assets => src/assets}/icons/mask.png | Bin {assets => src/assets}/icons/mask@2x.png | Bin {assets => src/assets}/icons/mask@3x.png | Bin {assets => src/assets}/translations/en.json | 0 {assets => src/assets}/translations/ko.json | 0 .../navigation/GestureHandler/index.ts | 2 + .../navigation/GestureHandler/index.web.ts | 1 + .../navigation/RootStackNavigator.tsx | 43 +- .../__tests__/RootStackNavigator.test.tsx | 16 +- .../RootStackNavigator.test.tsx.snap | 893 +-- src/components/screen/Intro.tsx | 79 +- src/components/screen/Temp.tsx | 23 +- .../screen/__tests__/Intro.test.tsx | 12 +- src/components/screen/__tests__/Temp.test.tsx | 13 +- .../__snapshots__/Intro.test.tsx.snap | 1364 ++-- .../__snapshots__/Temp.test.tsx.snap | 162 +- src/components/shared/Button.tsx | 32 +- .../shared/__tests__/Button.test.tsx | 8 +- .../__snapshots__/Button.test.tsx.snap | 20 +- src/index.tsx | 19 + src/providers/AppProvider.tsx | 11 +- src/providers/ThemeProvider.tsx | 80 + src/providers/__tests__/AppProvider.test.tsx | 6 +- src/providers/index.tsx | 12 +- src/react-app-env.d.ts | 1 + src/styled.d.ts | 15 +- src/theme.ts | 39 - src/types/index.ts | 4 +- src/utils/Icons.ts | 2 +- src/utils/Styles.ts | 22 - src/utils/fbt.ts | 42 +- .../utils/i18n}/FbtI18nNativeAssets.js | 2 + {i18n => src/utils/i18n}/NativeFbtModule.js | 0 src/utils/i18n/fbt/translatedFbts.json | 1 + .../utils/i18n}/getTranslatedInput.js | 0 .../generate-android-localizables-executor.js | 2 +- .../scripts/generate-android-localizables.js | 0 src/utils/media.ts | 35 + src/utils/theme.ts | 57 + src/utils/wrapper.tsx | 27 + test/jestSetup.js | 45 +- test/jestSetup.ts | 5 +- test/testUtils.tsx | 8 +- tsconfig.json | 45 +- yarn.lock | 6871 +++++++++++++++-- 74 files changed, 8174 insertions(+), 2168 deletions(-) create mode 100644 .dooboo/v5 create mode 100644 .eslintignore create mode 100644 craco.config.js delete mode 100644 i18n/fbt/translatedFbts.json create mode 100644 public/favicon.ico create mode 100644 public/index.html create mode 100644 public/logo192.png create mode 100644 public/logo512.png create mode 100644 public/manifest.json create mode 100644 public/robots.txt create mode 100644 public/service-worker.js rename {assets => src/assets}/icons/mask.png (100%) rename {assets => src/assets}/icons/mask@2x.png (100%) rename {assets => src/assets}/icons/mask@3x.png (100%) rename {assets => src/assets}/translations/en.json (100%) rename {assets => src/assets}/translations/ko.json (100%) create mode 100644 src/components/navigation/GestureHandler/index.ts create mode 100644 src/components/navigation/GestureHandler/index.web.ts create mode 100644 src/index.tsx create mode 100644 src/providers/ThemeProvider.tsx create mode 100644 src/react-app-env.d.ts delete mode 100644 src/theme.ts delete mode 100644 src/utils/Styles.ts rename {i18n => src/utils/i18n}/FbtI18nNativeAssets.js (99%) rename {i18n => src/utils/i18n}/NativeFbtModule.js (100%) create mode 100644 src/utils/i18n/fbt/translatedFbts.json rename {i18n => src/utils/i18n}/getTranslatedInput.js (100%) rename {i18n => src/utils/i18n}/scripts/generate-android-localizables-executor.js (96%) rename {i18n => src/utils/i18n}/scripts/generate-android-localizables.js (100%) create mode 100644 src/utils/media.ts create mode 100644 src/utils/theme.ts create mode 100644 src/utils/wrapper.tsx diff --git a/.circleci/config.yml b/.circleci/config.yml index faa040a9..f47813a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,7 @@ jobs: android: working_directory: ~/dooboo docker: - - image: circleci/android:api-28-node8-alpha + - image: circleci/android:api-29-node steps: - checkout: path: ~/dooboo diff --git a/.dooboo/v5 b/.dooboo/v5 new file mode 100644 index 00000000..e69de29b diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..72cbdf12 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +src/assets +src/utils/i18n diff --git a/.eslintrc.js b/.eslintrc.js index 80e6328e..ed0e10ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,8 @@ module.exports = { root: true, extends: '@dooboo/eslint-config', + rules: { + 'eslint-comments/no-unlimited-disable': 0, + 'eslint-comments/no-unused-disable': 0, + }, }; diff --git a/.gitignore b/.gitignore index d95acaf5..ceb1ba39 100644 --- a/.gitignore +++ b/.gitignore @@ -31,12 +31,15 @@ local.properties *.iml # node.js -# + dist/ node_modules/ npm-debug.log yarn-error.log +# eslint +.eslintcache + # BUCK buck-out/ \.buckd/ @@ -64,6 +67,6 @@ package-lock.json ios/Pods/ # fbt -i18n/fbt/.enum_manifest.json -i18n/fbt/.source_strings.json -i18n/fbt/.src_manifest.json +src/utils/i18n/fbt/.enum_manifest.json +src/utils/i18n/fbt/.source_strings.json +src/utils/i18n/fbt/.src_manifest.json diff --git a/.prettierrc.js b/.prettierrc.js index 6b84d2ff..fe9e87fc 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -3,5 +3,7 @@ module.exports = { trailingComma: "all", arrowParens: "always", singleQuote: true, - jsxSingleQuote: false + jsxSingleQuote: false, + jsxBracketSameLine: true, + bracketSpacing: false, }; diff --git a/.vscode/settings.json b/.vscode/settings.json index d5515cd6..3b8e94e4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "eslint.enable": true, "eslint.validate": [ "javascript", "javascriptreact", diff --git a/README.md b/README.md index 520538ea..a063e21a 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ const component = (props): React.ReactElement => { ### Localization -Previously, we used `i18n-j` to localize our app and we decided to switch to [fbt](https://github.com/facebook/fbt). If you want to understand why, you may see our blog for [Localizing react app with FBT instead of i18n](https://medium.com/dooboolab/localizing-react-app-with-fbt-instead-of-i18n-90822e0cb373). +Previously, we used `i18n-j` to localize our app and we decided to switch to [fbt](https://github.com/facebook/fbt). If you want to understand why, you may see our blog for [Localizing react app with FBT instead of src/utils/i18n](https://medium.com/dooboolab/localizing-react-app-with-fbt-instead-of-i18n-90822e0cb373). We've defined localized strings in `assets/translations/en.json` for English and `assets/translations/ko.json` for Korean. Since the `en` is default locale setup in current project, you do not need to localize this file. However, you still should not delete this if you don't want to see missing localization warning messages when you are running jest. diff --git a/android/app/build.gradle b/android/app/build.gradle index 7022dce3..f0c9bbcb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -104,7 +104,7 @@ def enableProguardInReleaseBuilds = false * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * - * The international variant includes ICU i18n library and necessary data + * The international variant includes ICU src/utils/i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. diff --git a/android/app/src/main/res/raw-en-rUS/localizable.json b/android/app/src/main/res/raw-en-rUS/localizable.json index 04dcab6f..802c9c2b 100644 --- a/android/app/src/main/res/raw-en-rUS/localizable.json +++ b/android/app/src/main/res/raw-en-rUS/localizable.json @@ -1 +1 @@ -{"18yDJU":"\"Go Back\"","4rqrl3":"\"Sign In\"","3fayOT":"\"Navigate\"","zcXn6":"\"Change Theme\""} \ No newline at end of file +{"4rqrl3":"\"Sign In\"","3fayOT":"\"Navigate\"","zcXn6":"\"Change Theme\""} \ No newline at end of file diff --git a/android/app/src/main/res/raw-ko-rKR/localizable.json b/android/app/src/main/res/raw-ko-rKR/localizable.json index 36fc07e4..b8c7e5b8 100644 --- a/android/app/src/main/res/raw-ko-rKR/localizable.json +++ b/android/app/src/main/res/raw-ko-rKR/localizable.json @@ -1 +1 @@ -{"18yDJU":"\"뒤로가기\"","4rqrl3":"\"로그인\"","3fayOT":"\"화면 전환\"","zcXn6":"\"테마 변경\""} \ No newline at end of file +{"4rqrl3":"\"로그인\"","3fayOT":"\"화면 전환\"","zcXn6":"\"테마 변경\""} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 5d5d188b..05a233c4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,10 +2,10 @@ buildscript { ext { - buildToolsVersion = "28.0.3" + buildToolsVersion = "29.0.3" minSdkVersion = 16 - compileSdkVersion = 28 - targetSdkVersion = 28 + compileSdkVersion = 29 + targetSdkVersion = 29 } repositories { google() diff --git a/babel.config.js b/babel.config.js index 47791c68..c7fc3e7e 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,11 @@ +// eslint-disable-next-line const path = require('path'); +const fbtEnumPath = path.join( + __dirname, + 'src/utils/i18n/fbt/.enum_manifest.json', +); + module.exports = { presets: [ 'module:metro-react-native-babel-preset', @@ -7,10 +13,12 @@ module.exports = { ], plugins: [ 'babel-plugin-fbt-runtime', - ['babel-plugin-fbt', { - fbtEnumPath: path.join(__dirname, 'i18n/fbt/.enum_manifest.json'), - extraOptions: { __self: true }, - }, + [ + 'babel-plugin-fbt', + { + fbtEnumPath, + extraOptions: {__self: true}, + }, ], ], }; diff --git a/craco.config.js b/craco.config.js new file mode 100644 index 00000000..e1cc3e23 --- /dev/null +++ b/craco.config.js @@ -0,0 +1,15 @@ +module.exports = { + babel: { + presets: ['@babel/preset-typescript'], + plugins: [ + [ + 'babel-plugin-fbt', + { + fbtEnumManifest: require('./src/utils/i18n/fbt/.enum_manifest.json'), + extraOptions: {__self: true}, + }, + ], + 'babel-plugin-fbt-runtime', + ], + }, +}; diff --git a/environment.d.ts b/environment.d.ts index 7e3ff16c..676b7f36 100644 --- a/environment.d.ts +++ b/environment.d.ts @@ -1,8 +1,7 @@ declare module '*.svg' { + import {IconType} from './src/types'; -import { IconType } from './src/types'; - -const content: IconType; + const content: IconType; export default content; } diff --git a/i18n/fbt/translatedFbts.json b/i18n/fbt/translatedFbts.json deleted file mode 100644 index f5372106..00000000 --- a/i18n/fbt/translatedFbts.json +++ /dev/null @@ -1 +0,0 @@ -{"en_US":{"18yDJU":"Go Back","4rqrl3":"Sign In","3fayOT":"Navigate","zcXn6":"Change Theme"},"ko_KR":{"18yDJU":"뒤로가기","4rqrl3":"로그인","3fayOT":"화면 전환","zcXn6":"테마 변경"}} \ No newline at end of file diff --git a/index.js b/index.js index a4648096..e71a1204 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,3 @@ -import { AppRegistry, YellowBox } from 'react-native'; +import {App} from './src'; -import App from './src/App'; - -/** - * React Native 0.54 warning message ignore. - */ -YellowBox.ignoreWarnings([ - 'Warning: componentWillMount is deprecated', - 'Warning: componentWillReceiveProps is deprecated', - 'Module RCTImageLoader', -]); - -AppRegistry.registerComponent('dooboo', () => App); +export default App; diff --git a/jest.config.js b/jest.config.js index 1ca5c9cb..c68c3645 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -const { defaults: tsjPreset } = require('ts-jest/presets'); +const {defaults: tsjPreset} = require('ts-jest/presets'); /* eslint-enable @typescript-eslint/no-var-requires */ module.exports = { @@ -36,10 +36,7 @@ module.exports = { '/test/jestSetup.ts', ], testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$', - testPathIgnorePatterns: [ - '\\.snap$', - '/node_modules/', - ], + testPathIgnorePatterns: ['\\.snap$', '/node_modules/'], /* eslint-disable */ transformIgnorePatterns: [ 'node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|react-navigation|@react-navigation/.*|@dooboo-ui)', diff --git a/package.json b/package.json index 8794906f..bc0df159 100644 --- a/package.json +++ b/package.json @@ -7,88 +7,107 @@ "postinstall": "npx jetify", "scripts": { "postinstall": "yarn fbt:all", - "dev": "node node_modules/react-native/local-cli/cli.js start", + "dev": "react-native start", "tsc": "tsc", "watch": "tsc -w", "start": "npm run dev", "codecov": "codecov", "upgrade": "react-native-git-upgrade && npm install --save react-native", "upgrade:major": "react-native upgrade", - "test": "jest", + "test": "jest --runInBand", "start:packager": "node_modules/react-native/packager/packager.sh", - "start:reset": "node node_modules/react-native/local-cli/cli.js start --reset-cache", - "android": "node node_modules/react-native/local-cli/cli.js run-android", + "start:reset": "react-native start --reset-cache", + "web": "craco start", + "build": "craco build", + "reset": "watchman watch-del-all; rm -rf /tmp/metro-bundler-cache-*; rm -rf ./android/build; rm -rf ./android/.gradle; rm -rf ./android/app/build; rm -rf ~/Library/Developer/Xcode/DerivedData; rm -rf /tmp/haste-map-react-native-packager-*; rm -rf ./ios/build; jest --clearCache; cd ios; pod install --repo-update; cd ..; npx jetify; cd android; ./gradlew clean; cd ..; react-native start --reset-cache", + "android": "react-native run-android", "android:shake": "adb shell input keyevent 82", "android:log": "adb logcat '*:S' ReactNative:V ReactNativeJS:V", "android:apk": "cd android && ./gradlew assembleRelease", - "android:release": "node node_modules/react-native/local-cli/cli.js run-android --variant=release", - "ios": "node node_modules/react-native/local-cli/cli.js run-ios", - "ios:release": "node node_modules/react-native/local-cli/cli.js run-ios --configuration Release", + "android:release": "react-native run-android --variant=release", + "ios": "react-native run-ios", + "ios:release": "react-native run-ios --configuration Release", "ios:devices": "xcrun simctl list devices", - "ios:dooboolab": "node node_modules/react-native/local-cli/cli.js run-ios --device 'dooboolab'", - "ios:dooboolab-release": "node node_modules/react-native/local-cli/cli.js run-ios --configuration Release --device 'dooboolab'", - "ios:iphone5": "node node_modules/react-native/local-cli/cli.js run-ios --simulator='iPhone 5s'", - "ios:iphone7": "node node_modules/react-native/local-cli/cli.js run-ios --simulator='iPhone 7'", + "ios:dooboolab": "react-native run-ios --device 'dooboolab'", + "ios:dooboolab-release": "react-native run-ios --configuration Release --device 'dooboolab'", + "ios:iphone5": "react-native run-ios --simulator='iPhone 5s'", + "ios:iphone7": "react-native run-ios --simulator='iPhone 7'", "ios:reset": "rm -rf ios/build/ModuleCache", "lint": "eslint src --ext .ts,.tsx,.js,.jsx", "build:ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ./ios", "build:android": "react-native bundle --entry-file index.js --platform android --dev false --bundle-output android/main.jsbundle --assets-dest ./android", - "manifest": "babel-node ./node_modules/babel-plugin-fbt/bin/manifest --src src/ --enum-manifest i18n/fbt/.enum_manifest.json --src-manifest i18n/fbt/.src_manifest.json", - "collect-fbts": "babel-node ./node_modules/babel-plugin-fbt/bin/collectFBT --hash-module 'fb-tiger-hash/src/hashPhrases' --react-native-mode --manifest --options __self < i18n/fbt/.src_manifest.json > i18n/fbt/.source_strings.json", - "translate-fbts": "babel-node ./node_modules/babel-plugin-fbt/bin/translate.js --jenkins --source-strings i18n/fbt/.source_strings.json --translations assets/translations/*.json > i18n/fbt/translatedFbts.json", - "clean-fbts": "rm i18n/fbt/.enum_manifest.json i18n/fbt/.src_manifest.json i18n/fbt/.source_strings.json assets/translatedFbts.json 2&> /dev/null || exit 0", - "fbt:all": "yarn manifest && yarn collect-fbts && yarn translate-fbts", - "fbt:android": "babel-node i18n/scripts/generate-android-localizables-executor.js" + "manifest": "fbt-manifest --src src/ --enum-manifest src/utils/i18n/fbt/.enum_manifest.json --src-manifest src/utils/i18n/fbt/.src_manifest.json", + "collect-fbts": "fbt-collect --hash-module 'fb-tiger-hash/src/hashPhrases' --react-native-mode --manifest --options __self < src/utils/i18n/fbt/.src_manifest.json > src/utils/i18n/fbt/.source_strings.json", + "translate-fbts": "fbt-translate --jenkins --source-strings src/utils/i18n/fbt/.source_strings.json --translations src/assets/translations/*.json > src/utils/i18n/fbt/translatedFbts.json", + "clean-fbts": "rm src/utils/i18n/fbt/.enum_manifest.json src/utils/i18n/fbt/.src_manifest.json src/utils/i18n/fbt/.source_strings.json src/assets/translatedFbts.json 2&> /dev/null || exit 0", + "fbt:android": "babel-node src/utils/i18n/scripts/generate-android-localizables-executor.js", + "fbt:all": "yarn manifest && yarn collect-fbts && yarn translate-fbts && yarn fbt:android" }, "dependencies": { - "@dooboo-ui/theme": "^0.0.3", "@react-native-community/async-storage": "^1.12.0", "@react-native-community/masked-view": "^0.1.10", - "@react-navigation/core": "^5.14.4", - "@react-navigation/native": "^5.8.10", - "@react-navigation/stack": "^5.12.8", - "fbt": "^0.16.0", + "@react-navigation/core": "^5.15.1", + "@react-navigation/native": "^5.9.2", + "@react-navigation/stack": "^5.14.2", + "fbt": "^0.16.1", "react": "16.13.1", "react-native": "0.63.4", "react-native-gesture-handler": "^1.9.0", "react-native-reanimated": "^1.13.2", "react-native-safe-area-context": "^3.1.9", - "react-native-screens": "^2.16.1", + "react-native-screens": "^2.17.1", + "react-native-web": "^0.14.10", + "react-responsive": "^8.2.0", + "react-scripts": "^4.0.1", "styled-components": "^5.2.1" }, "devDependencies": { "@babel/cli": "^7.12.10", "@babel/core": "^7.12.10", "@babel/node": "^7.12.10", + "@babel/plugin-syntax-jsx": "^7.12.1", "@babel/preset-typescript": "^7.12.7", "@babel/runtime": "^7.12.5", - "@dooboo/eslint-config": "^0.5.8", + "@craco/craco": "^6.1.0", + "@dooboo/eslint-config": "^0.6.19", "@testing-library/jest-native": "^3.4.3", "@testing-library/react-native": "^7.1.0", - "@types/jest": "^26.0.19", + "@types/jest": "^26.0.20", "@types/react": "^17.0.0", - "@types/react-native": "^0.63.43", + "@types/react-native": "^0.63.46", + "@types/react-responsive": "^8.0.2", "@types/react-test-renderer": "^17.0.0", "@types/styled-components": "^5.1.7", + "@types/styled-components-react-native": "^5.1.1", "babel-jest": "^26.6.3", - "babel-plugin-fbt": "^0.16.0", - "babel-plugin-fbt-runtime": "^0.9.12", + "babel-plugin-fbt": "^0.17.1", + "babel-plugin-fbt-runtime": "^0.9.13", "babel-preset-react-native": "^4.0.1", "codecov": "^3.8.1", - "eslint": "^7.16.0", + "eslint": "^7.18.0", "fb-tiger-hash": "^0.1.6", "fbt-generate-translations": "^0.0.4", - "jest": "^26.6.3", "jest-fetch-mock": "^3.0.3", "jest-styled-components": "^7.0.3", "jetifier": "^1.6.6", - "metro-react-native-babel-preset": "^0.64.0", + "metro-react-native-babel-preset": "^0.65.0", "prettier": "^2.2.1", "react-dom": "^16.13.1", "react-native-fbt": "^0.0.1", "react-test-renderer": "16.13.1", - "shelljs": "^0.8.4", "ts-jest": "^26.4.4", "typescript": "4.1.3" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] } } diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8a1f9c2618b1df9dc9eb11267a46a7ca1d274333 GIT binary patch literal 1150 zcmbVMPiWI{6#f-j)Uz4-YsDC9khvpCBZ!*+={#$>8tIMyTNAgHX*O6K5LlX?m z-=wkDsnK!%Q%lgp1uV!9a8o=BCE!KE8^G<$M^Sk1GIe&lza|m)OcsxZFX4)tgTi|; zA##`qaiqZ`?(^X3)Dbi`x={N&!|ndYyoPcpjiyoh=)%M415kM$ibsGVc%X_t%mm}e z$w&SF1(}rY9IDtD&CJsNA+{7pH_ck=ElBMV)K??v@g{)nm2i0jJ_Z)-A`)AEk7O5 zB3YE>*C<6^;>pl8q|^J+_~pP`>Tm2$aU_MZq@g6|EPR%5+6Uu&hM#3Qk2&ccCPTwW z@B>H;@VIfojoh1VI*SvP=sYsw3?{`Ee2nmw9<#?CaST_56G)O@st}-A4?;Okvp?y_ z{iGYyr_Vv*2p8J%q%VNGYCrkx!MMN?m!s@ALk$f=4f@U9F?PtPcjDuOD_)_kZu9MI Z>a^(Ebvvt~)zALka}IK_{{#P<{{Z&=c5eUx literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html new file mode 100644 index 00000000..aa069f27 --- /dev/null +++ b/public/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + React App + + + +
+ + + diff --git a/public/logo192.png b/public/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..9ed436cf65182e5e0b3c87a833ed74a893f78b55 GIT binary patch literal 3914 zcmc(i_dgZx`^S&HQ?hqR%E~@g_RLK79wD1@j5tR|BCCarjz~xL36YbKS$3RrWUu0! zgF}vWobmPkBfgK%57+g2-1q&<{loQmy`EQ=osAg>s~{@?0N}7NH@Z!1LKiz6=1sg=Gt4 zgS+uGJBygeGIT8CUeHlS-<7KhD#8jX3w+T1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(Y literal 0 HcmV?d00001 diff --git a/public/logo512.png b/public/logo512.png new file mode 100644 index 0000000000000000000000000000000000000000..63f1a514ce33bd00c0859e66a95849cd00972381 GIT binary patch literal 12565 zcmeIY_dlEO`#ydPEv2ZUMN3*8R?(%cO$Tk&7MoD55o*>RiK@1=Xi;iw?HN?Widj5u zMeMzTSVdw)lF#k^CwzbT{_^_49g)lRIIk<`IL_lZ!*sON*;xfx0RUis_VlqH06@TB zAppxs@MYI$@DO}C<@(gb0|3~#kAE0|#AH73j|?7q>JNe9o{KBs8zwtdO;rFWjbb~p zJ^=tX^PfFdHSl3rpS1g$Je)F3f#>8jztv7n?Hh>UzJ58x>iQFLov=B*t53e!8kZPcmT(kByc2bVlmHLXYL6(4-a90{W&i*W^C+f; zbD(h?;2Tsh3uyM~$Kb>2((#EIxxfeCC-Bjr!UR4~3WJZEXa2YJe>d=dH!$J-UXIs` znW^F8#;2?}bd-Hky~SlL9O#;LWXW49Rr2*Vu@ESo8>>+$zLMu#G*S=5io{PB9BO04 zXcM0lf;4LAlxq?DW+dC~^2lt$iS&S~<~RYN)e<=UQGWRQMbDr+qG>{>IqVIZSymT-V(xE9EBhb zUt$Ab_bYnaB#o?}rMHD6(x}&Fd~8({z9$2*=i(Q2k3zYgD36Pwsmt_cALUgjc^pYh zRY9v!-EavNkE{|%s_9oNGsl?6d68aE8;u`hg_p~ARqRzV4h;QGTp#BA25*OHWEM(w ziZ`vhm#$*d(nixoE2(C6T0(cni6K*J>%Y@jlH1L>P;(1WM)?$qyn$?gI$np!L1dfN zP3cJwN%We;>JoE&fBRO=UGAHek#+$7`8Orw2S6uO$D`6{-zFA#<`0zh;mG= zqQ+>mwlWG6Qt_Qx_=Te!&jSJ0&UZaD)O|hf8*Gp#f1vDQv~J1#dg&m2`UE?(N@Mt4 zE13e&pa2OO6Q4Uzx77eAKJUJQF>OpiXK@hL?hV0@N~Hnt!5{%w)3!Tyv9FOpiM0Z+ z(v$kZ0x$m}IJS>^|2$A{)t*svG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F7|$d)i;rOR`+ONP`)Jm4GD)72M=pU-3bHF)*@?ipukuV*cOs_Wy3+|HBO|V8jC; qR;lKFL5!}xObrT_6bhZrgpFUYRY`8l1jqe>XHT>q7eBOm_x}Jsk { + const cache = await caches.open(CACHE); + + await cache.addAll([ + // ? Precached resources. + ]); +}; + +// Time limited network request. If the network fails or the response is not +// served before timeout, the promise is rejected. +const fromNetwork = async (request, timeout) => { + const timeoutId = setTimeout(() => { + throw new Error('Request timeout.'); + }, timeout); + + const response = await fetch(request); + + clearTimeout(timeoutId); + + return response; +}; + +// Open the cache where the assets were stored and search for the requested +// resource. Notice that in case of no matching, the promise still resolves +// but it does with `undefined` as value. +const fromCache = async (request) => { + const cache = await caches.open(CACHE); + const matching = await cache.match(request); + + if (matching === undefined) throw new Error('no-match'); + + return matching; +}; + +// On install, cache some resource. +self.addEventListener('install', (evt) => { + console.log('The service worker is being installed.'); + + // Ask the service worker to keep installing until the returning promise + // resolves. + evt.waitUntil(precache()); +}); + +// On fetch, use cache but update the entry with the latest contents +// from the server. +self.addEventListener('fetch', (evt) => { + console.log('The service worker is serving the asset.'); + + // Try network and if it fails, go for the cached copy. + evt.respondWith( + fromNetwork(evt.request, 4000).catch(() => fromCache(evt.request)), + ); +}); diff --git a/src/App.tsx b/src/App.tsx index 345d8d1f..2aaed1d0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,7 @@ import React from 'react'; import RootNavigator from './components/navigation/RootStackNavigator'; import RootProvider from './providers'; -import { initFbt } from './utils/fbt'; +import {initFbt} from './utils/fbt'; initFbt(); diff --git a/src/apis/__tests__/sample.test.ts b/src/apis/__tests__/sample.test.ts index ba552875..c2e80143 100644 --- a/src/apis/__tests__/sample.test.ts +++ b/src/apis/__tests__/sample.test.ts @@ -1,4 +1,4 @@ -import { ROOT_URL, sample } from '../sample'; +import {ROOT_URL, sample} from '../sample'; import fetchMock from 'jest-fetch-mock'; @@ -9,11 +9,11 @@ describe('testing sample api', () => { }); it('calls google and returns data to me', () => { - const mockedResult = JSON.stringify({ data: '12345' }); + const mockedResult = JSON.stringify({data: '12345'}); fetchMock.mockResponseOnce(mockedResult); - return sample({ zoyi: 'zoyi' }).then(async (res) => { + return sample({zoyi: 'zoyi'}).then(async (res) => { const result = await res.text(); expect(result).toEqual(mockedResult); diff --git a/src/apis/sample.ts b/src/apis/sample.ts index 2e3a2fa7..12748a1c 100644 --- a/src/apis/sample.ts +++ b/src/apis/sample.ts @@ -4,11 +4,9 @@ export const sample = async ( body: Record | undefined, signal?: AbortSignal | undefined, ): Promise => { - if (!body) { - throw new Error('No request object'); - } + if (!body) throw new Error('No request object'); - const fetchOption: RequestInit = { + const fetchOption = { signal, method: 'POST', headers: new Headers({ diff --git a/assets/icons/mask.png b/src/assets/icons/mask.png similarity index 100% rename from assets/icons/mask.png rename to src/assets/icons/mask.png diff --git a/assets/icons/mask@2x.png b/src/assets/icons/mask@2x.png similarity index 100% rename from assets/icons/mask@2x.png rename to src/assets/icons/mask@2x.png diff --git a/assets/icons/mask@3x.png b/src/assets/icons/mask@3x.png similarity index 100% rename from assets/icons/mask@3x.png rename to src/assets/icons/mask@3x.png diff --git a/assets/translations/en.json b/src/assets/translations/en.json similarity index 100% rename from assets/translations/en.json rename to src/assets/translations/en.json diff --git a/assets/translations/ko.json b/src/assets/translations/ko.json similarity index 100% rename from assets/translations/ko.json rename to src/assets/translations/ko.json diff --git a/src/components/navigation/GestureHandler/index.ts b/src/components/navigation/GestureHandler/index.ts new file mode 100644 index 00000000..d0721317 --- /dev/null +++ b/src/components/navigation/GestureHandler/index.ts @@ -0,0 +1,2 @@ +import 'react-native'; +import 'react-native-gesture-handler'; diff --git a/src/components/navigation/GestureHandler/index.web.ts b/src/components/navigation/GestureHandler/index.web.ts new file mode 100644 index 00000000..1ab6eba6 --- /dev/null +++ b/src/components/navigation/GestureHandler/index.web.ts @@ -0,0 +1 @@ +import 'react-native'; diff --git a/src/components/navigation/RootStackNavigator.tsx b/src/components/navigation/RootStackNavigator.tsx index a5d83117..7ee2abfb 100644 --- a/src/components/navigation/RootStackNavigator.tsx +++ b/src/components/navigation/RootStackNavigator.tsx @@ -1,43 +1,52 @@ -import 'react-native-gesture-handler'; +import './GestureHandler'; -import { StackNavigationProp, createStackNavigator } from '@react-navigation/stack'; -import { ThemeType, useThemeContext } from '@dooboo-ui/theme'; +import { + StackNavigationProp, + createStackNavigator, +} from '@react-navigation/stack'; import Intro from '../screen/Intro'; -import { NavigationContainer } from '@react-navigation/native'; +import {NavigationContainer} from '@react-navigation/native'; import React from 'react'; import Temp from '../screen/Temp'; +import {useTheme} from '../../providers/ThemeProvider'; export type RootStackParamList = { - default: undefined; Intro: undefined; - Temp: { param: string }; -} + Temp: {param: string}; +}; export type RootStackNavigationProps< - T extends keyof RootStackParamList = 'default' + T extends keyof RootStackParamList > = StackNavigationProp; const Stack = createStackNavigator(); function RootNavigator(): React.ReactElement { - const { theme, themeType } = useThemeContext(); + const {theme} = useTheme(); return ( - + + headerTitleStyle: {color: theme.text}, + headerTintColor: theme.heading, + }}> diff --git a/src/components/navigation/__tests__/RootStackNavigator.test.tsx b/src/components/navigation/__tests__/RootStackNavigator.test.tsx index f457c01e..65002c11 100644 --- a/src/components/navigation/__tests__/RootStackNavigator.test.tsx +++ b/src/components/navigation/__tests__/RootStackNavigator.test.tsx @@ -1,10 +1,10 @@ import 'react-native'; -import React, { ReactElement } from 'react'; -import { createTestElement, createTestProps } from '../../../../test/testUtils'; +import React, {ReactElement} from 'react'; +import {createTestElement, createTestProps} from '../../../../test/testUtils'; import StackNavigator from '../RootStackNavigator'; -import { ThemeType } from '@dooboo-ui/theme'; +import {ThemeType} from '../../../providers/ThemeProvider'; import renderer from 'react-test-renderer'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -15,9 +15,7 @@ describe('[Stack] navigator', () => { beforeEach(() => { props = createTestProps(); - component = createTestElement( - , - ); + component = createTestElement(); }); it('should renders without crashing', () => { @@ -32,7 +30,11 @@ describe('[Stack] navigator', () => { it('should renders [Dark] mode', () => { jest.useFakeTimers(); - component = createTestElement(, ThemeType.DARK); + + component = createTestElement( + , + ThemeType.DARK, + ); const rendered = renderer.create(component).toJSON(); diff --git a/src/components/navigation/__tests__/__snapshots__/RootStackNavigator.test.tsx.snap b/src/components/navigation/__tests__/__snapshots__/RootStackNavigator.test.tsx.snap index e68537cf..f68903af 100644 --- a/src/components/navigation/__tests__/__snapshots__/RootStackNavigator.test.tsx.snap +++ b/src/components/navigation/__tests__/__snapshots__/RootStackNavigator.test.tsx.snap @@ -19,6 +19,112 @@ exports[`[Stack] navigator should renders [Dark] mode 1`] = ` ] } > + + + + + + + + + + + Intro + + + + + + - - - - - - - - - - - - - - + - - Login - - - - - - + + + - + + + + - Navigate - + + + Sign In + + - - - + - - Change Theme - + + Navigate + + - - - - - - - - - - - - + - - Intro - + + Change Theme + + @@ -571,10 +585,10 @@ exports[`[Stack] navigator should renders without crashing 1`] = ` - - - - - - - + + + + + + + + + + - - - - - - - - Login - + + + Sign In + + - - - + - - Navigate - + + Navigate + + - - - + - - Change Theme - + + Change Theme + + diff --git a/src/components/screen/Intro.tsx b/src/components/screen/Intro.tsx index e3def2ef..db917d92 100644 --- a/src/components/screen/Intro.tsx +++ b/src/components/screen/Intro.tsx @@ -1,30 +1,31 @@ +import styled, {css} from 'styled-components/native'; + import Button from '../shared/Button'; -import { IC_MASK } from '../../utils/Icons'; +import {IC_MASK} from '../../utils/Icons'; import React from 'react'; -import { RootStackNavigationProps } from '../navigation/RootStackNavigator'; -import { User } from '../../types'; -import { View } from 'react-native'; -import { fbt } from 'fbt'; -import styled from 'styled-components/native'; -import { useAppContext } from '../../providers/AppProvider'; -import { useThemeContext } from '@dooboo-ui/theme'; +import {RootStackNavigationProps} from '../navigation/RootStackNavigator'; +import {User} from '../../types'; +import {View} from 'react-native'; +import {fbt} from 'fbt'; +import {useAppContext} from '../../providers/AppProvider'; +import {useTheme} from '../../providers/ThemeProvider'; +import {withScreen} from '../../utils/wrapper'; const Container = styled.View` flex: 1; - align-self: stretch; - overflow: scroll; - background-color: ${({ theme }): string => theme.background}; + align-items: stretch; - flex-direction: column; - justify-content: flex-start; - align-items: center; - overflow: hidden; + ${({theme: {isDesktop}}) => + isDesktop && + css` + flex-direction: row; + `} `; -const ContentWrapper = styled.View` +const Content = styled.View` + flex: 1; flex-direction: column; - height: 100%; - width: 100%; + align-self: stretch; justify-content: flex-start; align-items: center; `; @@ -40,7 +41,7 @@ const ButtonWrapper = styled.View` const StyledText = styled.Text` font-size: 18px; line-height: 27px; - color: ${({ theme }): string => theme.fontColor}; + color: ${({theme}): string => theme.text}; `; interface Props { @@ -49,21 +50,26 @@ interface Props { function Intro(props: Props): React.ReactElement { let timer: number; - const { state: { user }, setUser } = useAppContext(); - const { changeThemeType } = useThemeContext(); + + const { + state: {user}, + setUser, + } = useAppContext(); + + const {changeThemeType} = useTheme(); const [isLoggingIn, setIsLoggingIn] = React.useState(false); const onLogin = (): void => { setIsLoggingIn(true); timer = setTimeout(() => { - const user: User = { + const myUser: User = { displayName: 'dooboolab', age: 30, job: 'developer', }; - setUser(user); + setUser(myUser); setIsLoggingIn(false); clearTimeout(timer); }, 1000); @@ -71,17 +77,16 @@ function Intro(props: Props): React.ReactElement { return ( - + - {user ? user.displayName : ''} + }}> + {user?.displayName ?? ''} - {user ? user.age : ''} - {user ? user.job : ''} - + {user?.age ?? ''} + {user?.job ?? ''} +