Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
502718440c | ||
|
|
f0cbfd7155 | ||
|
|
9c49991bae | ||
|
|
1b4c65ea97 | ||
|
|
41547a70a5 | ||
|
|
a030046401 | ||
|
|
7557e885d0 | ||
|
|
06fa981954 | ||
|
|
38522e5180 | ||
|
|
ecba5ade66 | ||
|
|
c94508e559 |
@@ -12,11 +12,11 @@ status-im.chat.models.message-content/actions
|
||||
status-im.chat.models.message-content/blank-string
|
||||
status-im.chat.models.message-content/sorted-ranges
|
||||
status-im.ethereum.mnemonic/words->passphrase
|
||||
native-module.core/listener
|
||||
native-module.core/multiaccount-reset
|
||||
native-module.core/extract-group-membership-signatures
|
||||
native-module.core/sign-group-membership
|
||||
native-module.core/update-mailservers
|
||||
status-im.native-module.core/listener
|
||||
status-im.native-module.core/multiaccount-reset
|
||||
status-im.native-module.core/extract-group-membership-signatures
|
||||
status-im.native-module.core/sign-group-membership
|
||||
status-im.native-module.core/update-mailservers
|
||||
status-im.ethereum.abi-spec/bytes-to-hex
|
||||
status-im.android.core/init
|
||||
status-im.chat.models.message/transport-keys
|
||||
@@ -50,6 +50,13 @@ status-im2.config/rpc-networks-only?
|
||||
status-im2.config/waku-enabled?
|
||||
status-im.utils.pairing/has-paired-installations?
|
||||
status-im.tribute-to-talk.core-test/user-cofx
|
||||
quo.gesture-handler/tap-gesture-handler
|
||||
quo.gesture-handler/pan-gesture-handler
|
||||
quo.gesture-handler/long-press-gesture-handler
|
||||
quo.gesture-handler/pure-native-button
|
||||
quo.gesture-handler/createNativeWrapper
|
||||
quo.gesture-handler/animated-raw-button
|
||||
quo.gesture-handler/states
|
||||
mocks.js-dependencies/action-button
|
||||
mocks.js-dependencies/camera
|
||||
mocks.js-dependencies/dismiss-keyboard
|
||||
@@ -88,17 +95,56 @@ status-im.hardwallet.simulated-keycard/sign-typed-data
|
||||
status-im.utils.core/safe-read-message-content
|
||||
status-im.ui.components.react/native-modules
|
||||
status-im.ui.components.react/progress-bar
|
||||
react-native.fs/move-file
|
||||
react-native.fs/read-dir
|
||||
react-native.fs/mkdir
|
||||
react-native.fs/unlink
|
||||
react-native.fs/file-exists?
|
||||
status-im.ui.components.colors/white
|
||||
status-im.ui.components.colors/black
|
||||
status-im.ui.components.core/animated-header
|
||||
status-im.ui.components.core/safe-area-provider
|
||||
status-im.ui.components.core/safe-area-consumer
|
||||
status-im.ui.components.core/safe-area-view
|
||||
status-im.utils.fs/move-file
|
||||
status-im.utils.fs/read-dir
|
||||
status-im.utils.fs/mkdir
|
||||
status-im.utils.fs/unlink
|
||||
status-im.utils.fs/file-exists?
|
||||
quo.animated/code
|
||||
quo.animated/eq
|
||||
quo.animated/neq
|
||||
quo.animated/greater-or-eq
|
||||
quo.animated/not*
|
||||
quo.animated/or*
|
||||
quo.animated/and*
|
||||
quo.animated/add
|
||||
quo.animated/sub
|
||||
quo.animated/multiply
|
||||
quo.animated/abs
|
||||
quo.animated/min*
|
||||
quo.animated/max*
|
||||
quo.animated/set
|
||||
quo.animated/start-clock
|
||||
quo.animated/stop-clock
|
||||
quo.animated/bezier
|
||||
quo.animated/linear
|
||||
quo.animated/set-value
|
||||
quo.animated/clock
|
||||
quo.animated/debug
|
||||
quo.animated/log
|
||||
quo.animated/event
|
||||
quo.animated/on-change
|
||||
quo.animated/cond*
|
||||
quo.animated/block
|
||||
quo.animated/call*
|
||||
quo.animated/timing
|
||||
quo.animated/spring
|
||||
quo.animated/clamp
|
||||
quo.animated/with-spring
|
||||
quo.animated/with-timing
|
||||
quo.animated/re-timing
|
||||
quo.design-system.colors/white
|
||||
quo.design-system.colors/black
|
||||
status-im.transport.core-test/messages
|
||||
status-im.ethereum.core/sidechain?
|
||||
status-im.ethereum.core/network-with-upstream-rpc?
|
||||
status-im.ethereum.core/current-address
|
||||
status-im.ethereum.core/network->network-name
|
||||
status-im.ethereum.core/estimate-gas
|
||||
quo.core/animated-header
|
||||
quo.core/safe-area-provider
|
||||
quo.core/safe-area-consumer
|
||||
quo.core/safe-area-view
|
||||
status-im.utils.universal-links.core/open!
|
||||
status-im.transport.filters.core-test/member-2
|
||||
status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
|
||||
@@ -148,8 +194,12 @@ status-im.utils.async/async-periodic-run!
|
||||
status-im.desktop.core/app-root
|
||||
status-im.desktop.core/init
|
||||
status-im.chat.models-test/test-db
|
||||
status-im.ui.components.spacing/padding-vertical
|
||||
quo.design-system.spacing/padding-vertical
|
||||
status-im.utils.money/percent-change
|
||||
status-im.utils.platform/isMacOs?
|
||||
status-im.utils.platform/isNix?
|
||||
status-im.utils.platform/isWin?
|
||||
status-im.utils.platform/android-version>=
|
||||
utils.debounce/clear-all
|
||||
status-im.transport.db/create-chat
|
||||
status-im.utils.priority-map/priority-map
|
||||
@@ -165,6 +215,7 @@ status-im.ui.components.animation/add
|
||||
status-im.ui.components.animation/subtract
|
||||
status-im.ui.components.animation/get-layout
|
||||
status-im.wallet.transactions-test/uri-query-data
|
||||
quo.react-native/touchable-highlight
|
||||
status-im.utils.name/shortened-name
|
||||
status-im.ui.components.button.haptic/trigger
|
||||
status-im.contact.db/filter-dapps
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{:lint-as {babashka.fs/with-temp-dir clojure.core/let}}
|
||||
@@ -1 +0,0 @@
|
||||
{:hooks {:macroexpand {sci.core/copy-ns sci.core/copy-ns}}}
|
||||
@@ -1,9 +0,0 @@
|
||||
(ns sci.core)
|
||||
|
||||
(defmacro copy-ns
|
||||
([ns-sym sci-ns]
|
||||
`(copy-ns ~ns-sym ~sci-ns nil))
|
||||
([ns-sym sci-ns opts]
|
||||
`[(quote ~ns-sym)
|
||||
~sci-ns
|
||||
(quote ~opts)]))
|
||||
@@ -1,5 +1,4 @@
|
||||
{:config-paths ["status-im"]
|
||||
:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
{:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
status-im.utils.views/letsubs clojure.core/let
|
||||
reagent.core/with-let clojure.core/let
|
||||
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
|
||||
@@ -10,66 +9,15 @@
|
||||
status-im.utils.styles/defn clojure.core/defn
|
||||
test-helpers.unit/deftest-sub clojure.core/defn
|
||||
taoensso.tufte/defnp clojure.core/defn}
|
||||
:linters {:case-duplicate-test {:level :error}
|
||||
:case-quoted-test {:level :error}
|
||||
:case-symbol-test {:level :error}
|
||||
:clj-kondo-config {:level :error}
|
||||
:cond-else {:level :error}
|
||||
:consistent-alias {:level :error
|
||||
:aliases {clojure.set set
|
||||
clojure.string string
|
||||
clojure.walk walk
|
||||
malli.core malli
|
||||
malli.dev.pretty malli.pretty
|
||||
malli.dev.virhe malli.virhe
|
||||
malli.error malli.error
|
||||
malli.generator malli.generator
|
||||
malli.transform malli.transform
|
||||
malli.util malli.util
|
||||
schema.core schema
|
||||
taoensso.timbre log}}
|
||||
:deprecated-namespace {:level :warning}
|
||||
:docstring-blank {:level :error}
|
||||
:equals-true {:level :error}
|
||||
:inline-def {:level :error}
|
||||
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
|
||||
:loop-without-recur {:level :error}
|
||||
:minus-one {:level :error}
|
||||
:misplaced-docstring {:level :error}
|
||||
:missing-body-in-when {:level :error}
|
||||
:missing-clause-in-try {:level :error}
|
||||
:missing-else-branch {:level :error}
|
||||
:not-empty? {:level :error}
|
||||
:plus-one {:level :error}
|
||||
:redundant-do {:level :error}
|
||||
:redundant-let {:level :error}
|
||||
:refer-all {:level :error}
|
||||
:shadowed-var {:level :error
|
||||
;; We temporarily use :include to define an
|
||||
;; allowlist of core Clojure vars. In the
|
||||
;; future, as we progressively fix shadowed
|
||||
;; vars, we should be able to delete this
|
||||
;; option and lint all vars.
|
||||
:exclude [type name]}
|
||||
:single-operand-comparison {:level :error}
|
||||
:syntax {:level :error}
|
||||
:unbound-destructuring-default {:level :error}
|
||||
:uninitialized-var {:level :error}
|
||||
:unknown-require-option {:level :error}
|
||||
:unreachable-code {:level :error}
|
||||
:unresolved-namespace {:level :error}
|
||||
:linters {:consistent-alias {:level :error
|
||||
:aliases {clojure.string string
|
||||
clojure.set set
|
||||
clojure.walk walk
|
||||
taoensso.timbre log}}
|
||||
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
|
||||
;; TODO remove number when this is fixed
|
||||
;; https://github.com/borkdude/clj-kondo/issues/867
|
||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
||||
number
|
||||
status-im.test-helpers/restore-app-db]}
|
||||
:unresolved-var {:level :error}
|
||||
:unsorted-required-namespaces {:level :error}
|
||||
:unused-alias {:level :warning}
|
||||
:unused-binding {:level :error}
|
||||
:unused-import {:level :error}
|
||||
:unused-namespace {:level :error}
|
||||
:unused-private-var {:level :error}
|
||||
:unused-referred-var {:level :error}
|
||||
:use {:level :error}}
|
||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
||||
number
|
||||
status-im.test-helpers/restore-app-db]}}
|
||||
:config-in-ns {mocks.js-dependencies {:linters {:clojure-lsp/unused-public-var {:level :off}}}}}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
{:lint-as {malli.experimental/defn schema.core/defn}
|
||||
:linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}}
|
||||
@@ -1,4 +0,0 @@
|
||||
{:linters
|
||||
{:unresolved-symbol
|
||||
{:exclude [(cljs.test/is [match? thrown-match?])
|
||||
(clojure.test/is [match? thrown-match?])]}}}
|
||||
@@ -1,2 +0,0 @@
|
||||
{:hooks {:analyze-call {utils.i18n/label utils.i18n/label}}
|
||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
|
||||
@@ -1,26 +0,0 @@
|
||||
(ns utils.i18n
|
||||
(:require [clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn label
|
||||
"Verify call to `utils.i18n/label` pass the translation keyword qualified with `t`."
|
||||
[{:keys [node]}]
|
||||
(let [[_ translation-key-node & _] (:children node)]
|
||||
(when (and (hooks/keyword-node? translation-key-node)
|
||||
(not= "t" (-> translation-key-node hooks/sexpr namespace)))
|
||||
(hooks/reg-finding! (assoc (meta translation-key-node)
|
||||
:message "Translation keyword should be qualified with \"t\""
|
||||
:type :status-im.linter/invalid-translation-keyword)))))
|
||||
|
||||
(comment
|
||||
;; Valid
|
||||
(label {:node (hooks/parse-string "(i18n/label :t/foo {:var \"hello\"})")
|
||||
:cljc false
|
||||
:lang :cljs
|
||||
:filename ""
|
||||
:config {}
|
||||
:ns ""
|
||||
:context nil})
|
||||
|
||||
;; Invalid
|
||||
(label {:node (hooks/parse-string "(i18n/label :foo)")})
|
||||
)
|
||||
@@ -0,0 +1,37 @@
|
||||
module.exports = {
|
||||
"testRunner": "jest",
|
||||
"testRegex": "\\.visual\\.js$",
|
||||
"runner-config": "visual-test/config.json",
|
||||
"devices": {
|
||||
"simulator": {
|
||||
"type": "ios.simulator",
|
||||
"device": {
|
||||
"type": "iPhone 11 Pro"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apps": {
|
||||
"ios.release": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/StatusIm.app",
|
||||
"build": "make release-ios"
|
||||
},
|
||||
"ios.debug": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": process.env.TEST_BINARY_PATH,
|
||||
"build": "make run-ios SIMULATOR='iPhone 11 Pro'"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ios.sim.release": {
|
||||
"device": "simulator",
|
||||
"app": "ios.release"
|
||||
},
|
||||
"ios.sim.debug": {
|
||||
"device": "simulator",
|
||||
"app": "ios.debug"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ KEYCARD_TEST_MENU=0
|
||||
QR_READ_TEST_MENU=1
|
||||
ENABLE_ROOT_ALERT=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
MAX_IMAGES_BATCH=5
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
COMMUNITIES_ENABLED=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
@@ -32,5 +33,3 @@ TWO_MINUTES_SYNCING=1
|
||||
SWAP_ENABLED=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
TEST_STATEOFUS=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
|
||||
@@ -21,6 +21,7 @@ COMMANDS_ENABLED=1
|
||||
KEYCARD_TEST_MENU=1
|
||||
QR_READ_TEST_MENU=1
|
||||
ENABLE_ROOT_ALERT=0
|
||||
MAX_IMAGES_BATCH=5
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
VERIFY_TRANSACTION_CHAIN_ID=5
|
||||
VERIFY_ENS_CHAIN_ID=5
|
||||
@@ -32,4 +33,3 @@ DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
|
||||
@@ -26,6 +26,7 @@ VERIFY_TRANSACTION_CHAIN_ID=5
|
||||
VERIFY_ENS_CHAIN_ID=5
|
||||
TEST_STATEOFUS=1
|
||||
BLANK_PREVIEW=0
|
||||
MAX_IMAGES_BATCH=5
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
COMMUNITIES_ENABLED=1
|
||||
COMMUNITIES_MANAGEMENT_ENABLED=1
|
||||
@@ -34,4 +35,3 @@ TWO_MINUTES_SYNCING=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
|
||||
@@ -17,8 +17,8 @@ RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
ENABLE_ROOT_ALERT=1
|
||||
MAX_IMAGES_BATCH=5
|
||||
BLANK_PREVIEW=0
|
||||
COMMUNITIES_ENABLED=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
|
||||
@@ -19,4 +19,3 @@ ENABLE_ROOT_ALERT=1
|
||||
MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
COLLECTIBLES_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native',
|
||||
};
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
|
||||
@@ -43,4 +43,4 @@ As a <user|developer|...>, I want to <task> so that <goal>.
|
||||
[comment]: # (if on Android please replicate bug whilst running adb logcat)
|
||||
```
|
||||
...
|
||||
```
|
||||
```
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: MVPBug Report
|
||||
about: MVPBug Report
|
||||
name: Bug Report
|
||||
about: Bug Report
|
||||
title: ''
|
||||
labels: 'E:Mobile Bug MVP'
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
@@ -22,7 +22,8 @@ assignees: ''
|
||||
|
||||
### Reproduction
|
||||
|
||||
1.
|
||||
1) Open Status
|
||||
2)
|
||||
|
||||
### Additional Information
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Wont fix Report
|
||||
about: to facilitate future handling, identify and address non-urgent issues that won't be prioritized in the near future
|
||||
title: ''
|
||||
labels: likely_wont_fix
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
|
||||
#### Expected behavior
|
||||
|
||||
|
||||
#### Actual behavior
|
||||
|
||||
|
||||
### Reproduction
|
||||
|
||||
1.
|
||||
|
||||
### Additional Information
|
||||
|
||||
- Status version: release
|
||||
- Operating System: Android, iOS
|
||||
|
||||
|
||||
[comment]: # (Please, add logs/notes if necessary)
|
||||
|
||||
@@ -63,10 +63,4 @@ Documentation change PR (review please): https://github.com/status-im/status.im/
|
||||
|
||||
<!-- (PRs will only be accepted if squashed into single commit.) -->
|
||||
|
||||
### Before and after screenshots comparison
|
||||
|
||||
| Figma (if available) | iOS (if available) | Android (if available)
|
||||
| --- | --- | --- |
|
||||
| Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. |
|
||||
|
||||
status: ready <!-- Can be ready or wip -->
|
||||
|
||||
@@ -5,6 +5,7 @@ project-board:
|
||||
min-reviewers: 1
|
||||
tested-pr-label-name: 'Tested - Issues'
|
||||
contributor-column-name: 'CONTRIBUTOR'
|
||||
to-rebase-column-name: 'TO REBASE'
|
||||
review-column-name: 'REVIEW'
|
||||
test-column-name: 'E2E Tests'
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
# Xcode
|
||||
#
|
||||
/ios/.xcode.env.local
|
||||
/component-spec
|
||||
result/
|
||||
build/
|
||||
@@ -36,10 +35,6 @@ project.xcworkspace
|
||||
**/android/.project
|
||||
**/android/.settings/org.eclipse.buildship.core.prefs
|
||||
local.properties
|
||||
*.hprof
|
||||
.cxx/
|
||||
*.keystore
|
||||
!debug.keystore
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
@@ -188,14 +183,3 @@ test/appium/tests/users.py
|
||||
|
||||
## component-tests
|
||||
*.log
|
||||
|
||||
## local xcode env introduced in react-native 0.69
|
||||
.xcode.env.local
|
||||
|
||||
## git hooks
|
||||
lefthook.yml
|
||||
|
||||
## clj-kondo
|
||||
/.clj-kondo/taoensso/*
|
||||
/.clj-kondo/babashka/*
|
||||
/.clj-kondo/rewrite-clj/rewrite-clj/config.edn
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{:clean {:ns-inner-blocks-indentation :keep}}
|
||||
@@ -1,10 +0,0 @@
|
||||
*
|
||||
!*.js
|
||||
!*/
|
||||
*.clj-kondo
|
||||
*.shadow-cljs
|
||||
modules
|
||||
result
|
||||
target
|
||||
component-spec
|
||||
/app
|
||||
@@ -1,9 +1,7 @@
|
||||
module.exports = {
|
||||
arrowParens: 'always',
|
||||
printWidth: 120,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'all',
|
||||
useTabs: false,
|
||||
bracketSpacing: false,
|
||||
bracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
tabWidth: 4,
|
||||
};
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"clojure.format.enable": false,
|
||||
"[clojure]": {
|
||||
"editor.defaultFormatter": "rflagreca.vscode-clj-zprint"
|
||||
},
|
||||
"vscode-clj-zprint.IgnoreExternalFiles": false,
|
||||
"vscode-clj-zprint.CommunityFormatting": false,
|
||||
"vscode-clj-zprint.OptionsMap": "",
|
||||
"vscode-clj-zprint.width": "",
|
||||
"vscode-clj-zprint.Styles.UseOnlyTheseStyles": false
|
||||
}
|
||||
@@ -31,13 +31,10 @@
|
||||
"defview" :arg1-body
|
||||
"letsubs" :binding
|
||||
"with-let" "let"
|
||||
"reg-event-fx" :arg1-pair
|
||||
"reg-fx" :arg1-pair
|
||||
"testing" :arg1-body
|
||||
"deftest-sub" :arg1-body
|
||||
"wait-for" :arg1-body
|
||||
"with-deps-check" :arg1-body
|
||||
"schema/=>" :arg1-body
|
||||
"->" [:noarg1-body
|
||||
{:list {:constant-pair? false :force-nl? false}
|
||||
:next-inner-restore [[:list :constant-pair?]]}]
|
||||
|
||||
@@ -14,17 +14,17 @@ WHITE := $(shell tput -Txterm setaf 7)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
HELP_FUN = \
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# This can come from Jenkins
|
||||
@@ -42,14 +42,11 @@ export NODE_OPTIONS += --openssl-legacy-provider
|
||||
export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
|
||||
# Our custom config is located in nix/nix.conf
|
||||
export NIX_USER_CONF_FILES = $(PWD)/nix/nix.conf
|
||||
export NIX_CONF_DIR = $(PWD)/nix
|
||||
# Location of symlinks to derivations that should not be garbage collected
|
||||
export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-mobile
|
||||
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
|
||||
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,\
|
||||
BUILD_TYPE,BUILD_NUMBER,COMMIT_HASH,\
|
||||
ANDROID_GRADLE_OPTS,ANDROID_ABI_SPLIT,ANDROID_ABI_INCLUDE,\
|
||||
STATUS_GO_SRC_OVERRIDE,STATUS_GO_IPFS_GATEWAY_URL
|
||||
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE
|
||||
|
||||
# Useful for Android release builds
|
||||
TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10)
|
||||
@@ -84,10 +81,6 @@ nix-gc-protected:
|
||||
@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
|
||||
ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
|
||||
|
||||
nix-upgrade: SHELL := /bin/sh
|
||||
nix-upgrade: ##@nix Upgrade Nix interpreter to current version.
|
||||
nix/scripts/upgrade.sh
|
||||
|
||||
nix-gc: export TARGET := nix
|
||||
nix-gc: nix-gc-protected ##@nix Garbage collect all packages older than 20 days from /nix/store
|
||||
nix-store --gc
|
||||
@@ -108,7 +101,7 @@ nix-update-clojure: export TARGET := clojure
|
||||
nix-update-clojure: ##@nix Update maven Nix expressions based on current clojure setup
|
||||
nix/deps/clojure/generate.sh
|
||||
|
||||
nix-update-gems: export TARGET := fastlane
|
||||
nix-update-gems: export TARGET := default
|
||||
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
|
||||
fastlane/update.sh
|
||||
|
||||
@@ -224,20 +217,24 @@ release-android: keystore build-android ##@build Build signed Android APK
|
||||
@scripts/sign-android.sh result/app-release-unsigned.apk
|
||||
|
||||
release-ios: export TARGET := ios
|
||||
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
|
||||
release-ios: export BUILD_ENV ?= prod
|
||||
release-ios: watchman-clean ios-clean jsbundle ##@build Build release for iOS release
|
||||
xcodebuild \
|
||||
-scheme StatusIm \
|
||||
-configuration Release \
|
||||
-workspace ios/StatusIm.xcworkspace \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-UseModernBuildSystem=N clean archive
|
||||
release-ios: watchman-clean ##@build Build release for iOS release
|
||||
@git clean -dxf -f target/ios && \
|
||||
$(MAKE) jsbundle-ios && \
|
||||
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive
|
||||
|
||||
jsbundle: SHELL := /bin/sh
|
||||
jsbundle: export BUILD_ENV ?= prod
|
||||
jsbundle: ##@build Build JavaScript and Clojurescript bundle for iOS and Android
|
||||
nix/scripts/build.sh targets.mobile.jsbundle
|
||||
jsbundle-android: SHELL := /bin/sh
|
||||
jsbundle-android: export TARGET := android
|
||||
jsbundle-android: export BUILD_ENV ?= prod
|
||||
jsbundle-android: ##@jsbundle Compile JavaScript and Clojurescript into app directory
|
||||
# Call nix-build to build the 'targets.mobile.android.jsbundle' attribute and copy the.js files to the project root
|
||||
nix/scripts/build.sh targets.mobile.android.jsbundle && \
|
||||
mv result/*.js ./
|
||||
|
||||
jsbundle-ios: export TARGET := ios
|
||||
jsbundle-ios: export BUILD_ENV ?= prod
|
||||
jsbundle-ios: ##@jsbundle Compile JavaScript and Clojure into index.ios.js
|
||||
yarn shadow-cljs release mobile
|
||||
|
||||
#--------------
|
||||
# status-go lib
|
||||
@@ -263,7 +260,7 @@ run-clojure: export TARGET := clojure
|
||||
run-clojure: ##@run Watch for and build Clojure changes for mobile
|
||||
yarn shadow-cljs watch mobile
|
||||
|
||||
run-metro: export TARGET := android
|
||||
run-metro: export TARGET := clojure
|
||||
run-metro: ##@run Start Metro to build React Native changes
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
@@ -273,14 +270,11 @@ run-re-frisk: ##@run Start re-frisk server
|
||||
|
||||
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
|
||||
run-android: export TARGET := android
|
||||
# INFO: If it's empty (no devices attached, parsing issues, script error) - for Nix it's the same as not set.
|
||||
run-android: export ANDROID_ABI_INCLUDE ?= $(shell ./scripts/adb_devices_abis.sh)
|
||||
run-android: ##@run Build Android APK and start it on the device
|
||||
npx react-native run-android --appIdSuffix debug
|
||||
|
||||
SIMULATOR=iPhone 13
|
||||
run-ios: export TARGET := ios
|
||||
run-ios: export IOS_STATUS_GO_TARGETS := iossimulator/amd64
|
||||
run-ios: ##@run Build iOS app and start it in a simulator/device
|
||||
ifneq ("$(SIMULATOR)", "")
|
||||
npx react-native run-ios --simulator="$(SIMULATOR)"
|
||||
@@ -288,17 +282,6 @@ else
|
||||
npx react-native run-ios
|
||||
endif
|
||||
|
||||
show-ios-devices: ##@other shows connected ios device and its name
|
||||
xcrun xctrace list devices
|
||||
|
||||
run-ios-device: export TARGET := ios
|
||||
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64
|
||||
run-ios-device: ##@run iOS app and start it on a connected device by its name
|
||||
ifndef DEVICE_NAME
|
||||
$(error Usage: make run-ios-device DEVICE_NAME=your-device-name)
|
||||
endif
|
||||
react-native run-ios --device "$(DEVICE_NAME)"
|
||||
|
||||
#--------------
|
||||
# Tests
|
||||
#--------------
|
||||
@@ -308,28 +291,20 @@ define find_all_clojure_files
|
||||
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn)
|
||||
endef
|
||||
|
||||
lint: export TARGET := clojure
|
||||
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
|
||||
lint: export TARGET := default
|
||||
lint: ##@test Run code style checks
|
||||
@sh scripts/lint/re-frame-in-quo-components.sh && \
|
||||
sh scripts/lint/direct-require-component-outside-quo.sh && \
|
||||
sh scripts/lint/require-i18n-resource-first.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
|
||||
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --lint src && \
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
scripts/lint/translations.clj && \
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||
sh scripts/lint/trailing-newline.sh && \
|
||||
node_modules/.bin/prettier --write .
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES
|
||||
|
||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||
lint-fix: export TARGET := clojure
|
||||
lint-fix: export TARGET := default
|
||||
lint-fix: ##@test Run code style checks and fix issues
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
clojure-lsp --ns-exclude-regex ".*/src/status_im2/core\.cljs$$" clean-ns && \
|
||||
sh scripts/lint/trailing-newline.sh --fix && \
|
||||
node_modules/.bin/prettier --write .
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES
|
||||
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
@@ -356,31 +331,29 @@ test: ##@test Run tests once in NodeJS
|
||||
yarn shadow-cljs compile test && \
|
||||
node --require ./test-resources/override.js target/test/test.js
|
||||
|
||||
android-test: jsbundle
|
||||
android-test: export TARGET := android
|
||||
android-test:
|
||||
cd android && ./gradlew test
|
||||
|
||||
run-visual-test-ios: export TARGET := clojure
|
||||
run-visual-test-ios: XCODE_DERIVED_DATA := $(HOME)/Library/Developer/Xcode/DerivedData
|
||||
run-visual-test-ios: APPLICATION_NAME := StatusIm-brfnruzfrkkycpbndmdoeyrigthc
|
||||
run-visual-test-ios: export TEST_BINARY_PATH := $(XCODE_DERIVED_DATA)/$(APPLICATION_NAME)/Build/Products/Debug-iphonesimulator/StatusIm.app
|
||||
run-visual-test-ios: ##@test Run tests once in NodeJS
|
||||
detox test --configuration ios.sim.debug
|
||||
|
||||
component-test-watch: export TARGET := clojure
|
||||
component-test-watch: export COMPONENT_TEST := true
|
||||
component-test-watch: export BABEL_ENV := test
|
||||
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
@@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
yarn install
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js' -e cljs
|
||||
|
||||
component-test: export TARGET := clojure
|
||||
component-test: export COMPONENT_TEST := true
|
||||
component-test: export BABEL_ENV := test
|
||||
component-test: ##@test Run component tests once in NodeJS
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
yarn install
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||
jest --config=test/jest/jest.config.js
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
|
||||
@@ -389,10 +362,6 @@ geth-connect: ##@other Connect to Geth on the device
|
||||
adb forward tcp:8545 tcp:8545 && \
|
||||
build/bin/geth attach http://localhost:8545
|
||||
|
||||
ios-clean: SHELL := /bin/sh
|
||||
ios-clean: ##@prepare Clean iOS build artifacts
|
||||
git clean -dxf -f target/ios
|
||||
|
||||
android-clean: export TARGET := gradle
|
||||
android-clean: ##@prepare Clean Gradle state
|
||||
git clean -dxf -f ./android/app/build; \
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/>](https://play.google.com/store/apps/details?id=im.status.ethereum)
|
||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/>](https://f-droid.org/packages/im.status.ethereum/)
|
||||
[<img src="doc/github_badge.png" alt="Get it on Github" height="80"/>](https://github.com/status-im/status-mobile/releases)
|
||||
|
||||
|
||||
[Get it on Github](https://github.com/status-im/status-mobile/releases)
|
||||
|
||||
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middlemen and `go-ethereum` running directly on your device.
|
||||
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.
|
||||
|
||||
[](https://www.youtube.com/watch?v=oDCSEmS9c3o "Getting started with Status")
|
||||
|
||||
@@ -14,49 +12,52 @@ Join us in creating a browser, messenger, and gateway to a decentralized world.
|
||||
|
||||
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
|
||||
|
||||
We want to take responsibility for our data, and the way we conduct ourselves privately and promote this way of life to a mass audience.
|
||||
We want to take responsibility for our data, the way we conduct ourselves privately and promote this way of life to a mass audience.
|
||||
|
||||
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us with a path forward.
|
||||
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provides us a path forward.
|
||||
|
||||
If this interests you, **help us make Status a reality** - anyone can contribute and we need everyone at any skill level to participate.
|
||||
|
||||
## How to Contribute?
|
||||
|
||||
Go straight to the [docs](doc/) and choose what interests you:
|
||||
Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
|
||||
|
||||
- **Developer** Developers are the heart of software and to keep Status beating
|
||||
we need all the help we can get! If you're looking to code in ClojureScript or
|
||||
Golang then Status is the project for you! We use React Native and there is even
|
||||
some Java/Objective-C too! Want to learn more about it? Start by reading our
|
||||
[Developer Introduction](doc/starting-guide.md) which guides you
|
||||
[Developer Introduction](https://status.im/developer_tools/) which guides you
|
||||
through the technology stack and start browsing [beginner
|
||||
issues](https://github.com/status-im/status-mobile/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20).
|
||||
Then you can read how to [Build
|
||||
Status](doc/starting-guide.md), which talks about managing
|
||||
project dependencies, coding guidelines and testing procedures.
|
||||
Check out our [coding guidelines](doc/new-guidelines.md).
|
||||
Status](https://status.im/technical/build_status/), which talks about managing
|
||||
project dependencies, coding guidelines and testing procedures. The [doc/](doc/)
|
||||
directory also has valuable information for contributors.
|
||||
|
||||
- **Community Management**
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
|
||||
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said, "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
|
||||
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
|
||||
|
||||
- **Testers**
|
||||
It's bug-hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user checks out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](https://status.im/technical/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
|
||||
- **Security**
|
||||
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
|
||||
|
||||
- **Evangelism**
|
||||
Help us spread the word! Tell a friend *right now*, in fact, tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
|
||||
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
|
||||
|
||||
## Status API
|
||||
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).
|
||||
|
||||
## Give me Binaries!
|
||||
|
||||
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](https://status.im/technical/build_status/).
|
||||
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
|
||||
|
||||
## Core Contributors
|
||||
|
||||
@@ -67,8 +68,12 @@ Without the dedication of these outstanding individuals, Status would not exist.
|
||||
|
||||
## Contact us
|
||||
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im).
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-mobile/blob/develop/LICENSE.md)
|
||||
|
||||
## Testing Supported by
|
||||
|
||||
[](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
### Redesign
|
||||
|
||||
* quo, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* Quo2, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
|
||||
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
|
||||
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
|
||||
|
||||
@@ -1,74 +1,124 @@
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "com.facebook.react"
|
||||
|
||||
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
|
||||
|
||||
import com.android.build.OutputFile
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
|
||||
/*
|
||||
* This is the configuration block to customize your React Native Android app.
|
||||
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
||||
/**
|
||||
* The react.gradle file registers a task for each build variant:
|
||||
* - bundlePrJsAndAssets
|
||||
* - bundleDebugJsAndAssets
|
||||
* - bundleReleaseJsAndAssets
|
||||
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||
* bundle directly from the development server. Below you can see all the possible configurations
|
||||
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||
*
|
||||
* project.ext.react = [
|
||||
* // the name of the generated asset file containing your JS bundle
|
||||
* bundleAssetName: "index.android.bundle",
|
||||
*
|
||||
* // the entry file for bundle generation
|
||||
* entryFile: "index.js",
|
||||
*
|
||||
* // whether to bundle JS and assets in debug mode
|
||||
* bundleInDebug: false,
|
||||
*
|
||||
* // whether to bundle JS and assets in release mode
|
||||
* bundleInRelease: true,
|
||||
*
|
||||
* // whether to bundle JS and assets in another build variant (if configured).
|
||||
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'bundleIn${productFlavor}${buildType}'
|
||||
* // 'bundleIn${buildType}'
|
||||
* // bundleInFreeDebug: true,
|
||||
* // bundleInPaidRelease: true,
|
||||
* // bundleInBeta: true,
|
||||
*
|
||||
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
||||
* // for example: to disable dev mode in the staging build type (if configured)
|
||||
* devDisabledInStaging: true,
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'devDisabledIn${productFlavor}${buildType}'
|
||||
* // 'devDisabledIn${buildType}'
|
||||
*
|
||||
* // the root of your project, i.e. where "package.json" lives
|
||||
* root: "../../",
|
||||
*
|
||||
* // where to put the JS bundle asset in debug mode
|
||||
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
|
||||
*
|
||||
* // where to put the JS bundle asset in release mode
|
||||
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in debug mode
|
||||
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in release mode
|
||||
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
|
||||
*
|
||||
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
|
||||
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
|
||||
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||
* // for example, you might want to remove it from here.
|
||||
* inputExcludes: ["android/**", "ios/**"],
|
||||
*
|
||||
* // override which node gets called and with what additional arguments
|
||||
* nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"],
|
||||
*
|
||||
* // supply additional arguments to the packager
|
||||
* extraPackagerArgs: []
|
||||
* ]
|
||||
*/
|
||||
react {
|
||||
/* Folders */
|
||||
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
||||
// root = file("../")
|
||||
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
||||
// reactNativeDir = file("../node_modules/react-native")
|
||||
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
|
||||
// codegenDir = file("../node_modules/@react-native/codegen")
|
||||
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
||||
// cliFile = file("../node_modules/react-native/cli.js")
|
||||
|
||||
/* Variants */
|
||||
// The list of variants to that are debuggable. For those we're going to
|
||||
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
||||
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
||||
// debuggableVariants = ["liteDebug", "prodDebug"]
|
||||
/*
|
||||
Enabling Hermes on x86 devices is crashing the app after a few reloads,
|
||||
this flag can be used to disable Hermes while building app.
|
||||
https://github.com/status-im/status-mobile/issues/14031
|
||||
*/
|
||||
|
||||
/* Bundling */
|
||||
// A list containing the node command and its flags. Default is just 'node'.
|
||||
nodeExecutableAndArgs = ["node", "--max-old-space-size=16384" ]
|
||||
//
|
||||
// The command to run when bundling. By default is 'bundle'
|
||||
// bundleCommand = "ram-bundle"
|
||||
//
|
||||
// The path to the CLI configuration file. Default is empty.
|
||||
// bundleConfig = file(../rn-cli.config.js)
|
||||
//
|
||||
// The name of the generated asset file containing your JS bundle
|
||||
// bundleAssetName = "MyApplication.android.bundle"
|
||||
//
|
||||
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
||||
// entryFile = file("../js/MyApplication.android.js")
|
||||
//
|
||||
// A list of extra flags to pass to the 'bundle' commands.
|
||||
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
||||
// extraPackagerArgs = []
|
||||
def disableHermes = System.getenv('DISABLE_HERMES') == 'true'
|
||||
|
||||
/* Hermes Commands */
|
||||
// The hermes compiler command to run. By default it is 'hermesc'
|
||||
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
||||
//
|
||||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
||||
// hermesFlags = ["-O", "-output-source-map"]
|
||||
}
|
||||
project.ext.react = [
|
||||
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
|
||||
entryFile: "index.js",
|
||||
/* NOTE: Hermes engine is required for Android 64-bit builds running on 64 devices,
|
||||
* to guard against a hang in the UI thread after invoking status-go.
|
||||
* Also a clean and rebuild is required when changing this. */
|
||||
enableHermes: !disableHermes,
|
||||
/* Disable 'The first definition was here.' warnings */
|
||||
hermesFlagsRelease: ["-w"],
|
||||
bundleInPr: true,
|
||||
inputExcludes: ["android/**", "ios/**", "react-native/**", "src/**", "test/**"]
|
||||
]
|
||||
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
// configurations.all {
|
||||
// exclude group: 'com.facebook.react', module: 'react-native'
|
||||
// }
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
/**
|
||||
* The preferred build flavor of JavaScriptCore (JSC)
|
||||
* The preferred build flavor of JavaScriptCore.
|
||||
*
|
||||
* 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
|
||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||
* give correct results when using with locales other than en-US. Note that
|
||||
* give correct results when using with locales other than en-US. Note that
|
||||
* this variant is about 6MiB larger per architecture than default.
|
||||
*/
|
||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
@@ -80,8 +130,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||
*/
|
||||
def enableHermes = hermesEnabled.toBoolean();
|
||||
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
def getCommitHash = { ->
|
||||
if (project.hasProperty("commitHash")) {
|
||||
@@ -107,13 +156,12 @@ def getVersionCode = { ->
|
||||
|
||||
def getVersionName = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
// TODO: probably not used, cleanup
|
||||
if (project.hasProperty("releaseVersion")) {
|
||||
return project.releaseVersion
|
||||
}
|
||||
/* Necessary because Android Studio uses wrong PWD.
|
||||
* Is actually absolute directory path of this file. */
|
||||
def configDir = project.projectDir.toString()
|
||||
def configDir = project.projectDir.toString()
|
||||
version = new File(configDir + '/../../VERSION').text
|
||||
return version.replaceAll("\\s","")
|
||||
}
|
||||
@@ -135,16 +183,13 @@ def getEnvOrConfig = { varName ->
|
||||
}
|
||||
|
||||
android {
|
||||
ndkVersion rootProject.ext.ndkVersion
|
||||
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
namespace "im.status.ethereum"
|
||||
defaultConfig {
|
||||
applicationId "im.status.ethereum"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
@@ -161,7 +206,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Arbitrary project metadata
|
||||
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
|
||||
@@ -232,11 +276,10 @@ android {
|
||||
versionNameSuffix ".pr"
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
}
|
||||
}
|
||||
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@@ -252,7 +295,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
aaptOptions {
|
||||
// disable PNG optimization as for some reason it cannot be trusted to provide deterministic output (see https://f-droid.org/en/docs/Reproducible_Builds/)
|
||||
cruncherEnabled = false
|
||||
@@ -264,31 +306,51 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
implementation("com.facebook.react:react-android")
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||
|
||||
if (hermesEnabled.toBoolean()) {
|
||||
implementation("com.facebook.react:hermes-android")
|
||||
} else {
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||
// exclude group:'com.facebook.flipper'
|
||||
// }
|
||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.flipper'
|
||||
}
|
||||
|
||||
if (enableHermes) {
|
||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||
releaseImplementation files(hermesPath + "hermes-release.aar")
|
||||
prImplementation files(hermesPath + "hermes-release.aar")
|
||||
} else {
|
||||
implementation jscFlavor
|
||||
}
|
||||
|
||||
// react-native-screens
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
|
||||
implementation 'androidx.multidex:multidex:2.0.1' // required by status-mobile/android/app/src/main/java/im/status/ethereum/MainApplication.java
|
||||
|
||||
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
|
||||
implementation project(':react-native-dialogs')
|
||||
implementation project(':react-native-blur')
|
||||
// Force using exact RN version instead of relying on gradle dependency resolution
|
||||
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
|
||||
implementation project(':react-native-status')
|
||||
implementation project(':react-native-status-keycard')
|
||||
implementation 'com.github.status-im:function:0.0.1'
|
||||
implementation 'com.facebook.fresco:fresco:2.5.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.5.0'
|
||||
implementation "com.squareup.okhttp3:okhttp-tls:4.9.2"
|
||||
implementation("com.google.prefab:cli:2.0.0")
|
||||
implementation 'com.facebook.fresco:fresco:2.2.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.2.0'
|
||||
implementation "com.squareup.okhttp3:okhttp-tls:3.12.12"
|
||||
}
|
||||
|
||||
|
||||
def getLocalNDKDir = { ->
|
||||
def rootDir = project.rootDir
|
||||
def localProperties = new File(rootDir, "local.properties")
|
||||
|
||||
@@ -7,7 +7,5 @@
|
||||
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
|
||||
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
|
||||
|
||||
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" >
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
|
||||
</application>
|
||||
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
|
||||
</manifest>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||
import com.facebook.flipper.android.utils.FlipperUtils;
|
||||
import com.facebook.flipper.core.FlipperClient;
|
||||
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
||||
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
||||
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||
// import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||
// import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.modules.network.NetworkingModule;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
public class ReactNativeFlipper {
|
||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||
|
||||
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||
client.addPlugin(new ReactFlipperPlugin());
|
||||
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
||||
// NetworkingModule.setCustomClientBuilder(
|
||||
// new NetworkingModule.CustomClientBuilder() {
|
||||
// @Override
|
||||
// public void apply(OkHttpClient.Builder builder) {
|
||||
// builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
||||
// }
|
||||
// });
|
||||
// client.addPlugin(networkFlipperPlugin);
|
||||
client.start();
|
||||
|
||||
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
||||
// Hence we run if after all native modules have been initialized
|
||||
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||
if (reactContext == null) {
|
||||
reactInstanceManager.addReactInstanceEventListener(
|
||||
new ReactInstanceManager.ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(ReactContext reactContext) {
|
||||
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||
reactContext.runOnNativeModulesQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:installLocation="auto">
|
||||
android:installLocation="auto"
|
||||
package="im.status.ethereum">
|
||||
|
||||
<!-- non-dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
@@ -16,11 +17,11 @@
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
|
||||
<application
|
||||
@@ -31,11 +32,7 @@
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:name=".MainApplication"
|
||||
android:largeHeap="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
<!-- After upgrading Android Gradle Plugin to 4.2.0 and above we must get rid of `extractNativeLibs="true"`
|
||||
and use`useLegacyPackaging` flag in our app's `build.gradle`-->
|
||||
android:usesCleartextTraffic="true">
|
||||
<meta-data android:name="commitHash" android:value="${commitHash}"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
@@ -44,7 +41,7 @@
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:resizeableActivity="false"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
@@ -62,14 +59,14 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http" android:host="status.app" />
|
||||
<data android:scheme="https" android:host="status.app" />
|
||||
<data android:scheme="http" android:host="join.status.im" />
|
||||
<data android:scheme="https" android:host="join.status.im" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="status-app" />
|
||||
<data android:scheme="status-im" />
|
||||
<data android:scheme="ethereum" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
@@ -23,13 +23,13 @@ import android.provider.Settings;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
|
||||
import com.facebook.react.ReactFragmentActivity;
|
||||
import com.reactnativenavigation.NavigationActivity;
|
||||
import com.facebook.react.modules.core.PermissionListener;
|
||||
import androidx.core.splashscreen.SplashScreen;
|
||||
@@ -46,14 +46,6 @@ public class MainActivity extends NavigationActivity
|
||||
private boolean keepSplash = true;
|
||||
private final int SPLASH_DELAY = 3200;
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||
* rendering of the component.
|
||||
*/
|
||||
protected String getMainComponentName() {
|
||||
return "StatusIm";
|
||||
}
|
||||
|
||||
private static void registerUncaughtExceptionHandler(final Context context) {
|
||||
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
import android.util.Log;
|
||||
import android.content.Context;
|
||||
import android.webkit.WebView;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import com.facebook.react.PackageList;
|
||||
|
||||
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import cl.json.RNSharePackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.reactnativenavigation.NavigationApplication;
|
||||
import com.reactnativenavigation.react.NavigationReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
import com.reactnativecommunity.blurview.BlurViewPackage;
|
||||
|
||||
@@ -23,6 +26,7 @@ import im.status.ethereum.pushnotifications.PushNotificationPackage;
|
||||
import im.status.ethereum.StatusOkHttpClientFactory;
|
||||
|
||||
import com.facebook.react.bridge.JSIModulePackage;
|
||||
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
||||
|
||||
public class MainApplication extends NavigationApplication {
|
||||
|
||||
@@ -34,11 +38,11 @@ public class MainApplication extends NavigationApplication {
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
|
||||
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
|
||||
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
packages.add(statusPackage);
|
||||
packages.add(new ReactNativeDialogsPackage());
|
||||
packages.add(new RNStatusKeycardPackage());
|
||||
packages.add(new PushNotificationPackage());
|
||||
packages.add(new BlurViewPackage());
|
||||
@@ -50,23 +54,15 @@ public class MainApplication extends NavigationApplication {
|
||||
return "index";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isNewArchEnabled() {
|
||||
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean isHermesEnabled() {
|
||||
return BuildConfig.IS_HERMES_ENABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JSIModulePackage getJSIModulePackage() {
|
||||
return new ReanimatedJSIModulePackage();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
return mReactNativeHost;
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,12 +72,36 @@ public class MainApplication extends NavigationApplication {
|
||||
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
|
||||
|
||||
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
|
||||
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
DefaultNewArchitectureEntryPoint.load();
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
}
|
||||
/**
|
||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
*
|
||||
* @param context
|
||||
* @param reactInstanceManager
|
||||
*/
|
||||
private static void initializeFlipper(
|
||||
Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
try {
|
||||
/*
|
||||
We use reflection here to pick up the class that initializes Flipper,
|
||||
since Flipper library is not available in release mode
|
||||
*/
|
||||
Class<?> aClass = Class.forName("im.status.ethereum.ReactNativeFlipper");
|
||||
aClass
|
||||
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||
.invoke(null, context, reactInstanceManager);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,76 +20,25 @@ import java.security.cert.X509Certificate;
|
||||
import im.status.ethereum.module.StatusPackage;
|
||||
|
||||
class StatusOkHttpClientFactory implements OkHttpClientFactory {
|
||||
|
||||
private static final String TAG = "StatusOkHttpClientFactory";
|
||||
|
||||
public OkHttpClient createNewNetworkModuleClient() {
|
||||
X509Certificate cert = null;
|
||||
HandshakeCertificates clientCertificates;
|
||||
String certPem = "";
|
||||
// Get TLS PEM certificate from status-go
|
||||
try {
|
||||
// induce half second sleep because sometimes a cert is not immediately available
|
||||
// TODO : remove sleep if App no longer crashes on Android 10 devices with
|
||||
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
|
||||
Thread.sleep(500);
|
||||
certPem = getCertificatePem();
|
||||
} catch(Exception e) {
|
||||
Log.e(TAG, "Could not getImageTLSCert",e);
|
||||
}
|
||||
String certPem = StatusPackage.getImageTLSCert();
|
||||
X509Certificate cert;
|
||||
|
||||
if (certPem.isEmpty()) {
|
||||
Log.e(TAG, "Certificate is empty, cannot create OkHttpClient without a valid certificate");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Convert PEM certificate string to X509Certificate object
|
||||
try {
|
||||
// induce half second sleep because sometimes a cert is not immediately available
|
||||
// TODO : remove sleep if App no longer crashes on Android 10 devices
|
||||
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
|
||||
Thread.sleep(500);
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(certPem.getBytes()));
|
||||
} catch(Exception e) {
|
||||
Log.e(TAG, "Could not parse certificate",e);
|
||||
}
|
||||
// Create HandshakeCertificates object with our certificate
|
||||
try {
|
||||
// induce half second sleep because sometimes a cert is not immediately available
|
||||
// TODO : remove sleep if App no longer crashes on Android 10 devices
|
||||
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
|
||||
Thread.sleep(500);
|
||||
clientCertificates = new HandshakeCertificates.Builder()
|
||||
.addPlatformTrustedCertificates()
|
||||
.addTrustedCertificate(cert)
|
||||
.build();
|
||||
} catch(Exception e) {
|
||||
Log.e(TAG, "Could not build HandshakeCertificates", e);
|
||||
return null;
|
||||
Log.e("StatusOkHttpClientFactory", "Could not parse certificate");
|
||||
cert = null;
|
||||
}
|
||||
|
||||
// Create OkHttpClient with custom SSL socket factory and trust manager
|
||||
try {
|
||||
return OkHttpClientProvider.createClientBuilder()
|
||||
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
|
||||
.build();
|
||||
} catch(Exception e) {
|
||||
Log.e(TAG, "Could not create OkHttpClient", e);
|
||||
return null;
|
||||
}
|
||||
HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
|
||||
.addPlatformTrustedCertificates()
|
||||
.addTrustedCertificate(cert)
|
||||
.build();
|
||||
|
||||
return OkHttpClientProvider.createClientBuilder()
|
||||
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
|
||||
.build();
|
||||
}
|
||||
private String getCertificatePem() {
|
||||
try {
|
||||
String certPem = StatusPackage.getImageTLSCert();
|
||||
if (certPem == null || certPem.trim().isEmpty()) {
|
||||
Log.e(TAG, "Certificate PEM string is null or empty");
|
||||
return "";
|
||||
}
|
||||
return certPem;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Could not getImageTLSCert", e);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,19 +4,13 @@
|
||||
* Project-wide gradle configuration properties for use by all modules
|
||||
*/
|
||||
ext {
|
||||
// kotlin_version is needed for react-native-camera-kit library
|
||||
kotlin_version = project.kotlinVersion
|
||||
RNNKotlinVersion = project.kotlinPluginVersion
|
||||
RNGH_kotlinVersion = project.kotlinPluginVersion
|
||||
RNNKotlinVersion = "1.4.31"
|
||||
buildToolsVersion = project.buildToolsVersion
|
||||
minSdkVersion = Integer.valueOf(project.minSdkVersion)
|
||||
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
|
||||
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
|
||||
supportLibVersion = project.supportLibVersion
|
||||
gradlePluginVersion = project.gradlePluginVersion
|
||||
kotlinPluginVersion = project.kotlinPluginVersion
|
||||
|
||||
ndkVersion = "25.2.9519653"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
@@ -26,9 +20,10 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
|
||||
classpath("com.android.tools.build:gradle")
|
||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31"
|
||||
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
|
||||
// WARNING: Do not place your application dependencies here!
|
||||
// They belong in the individual module build.gradle files.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,14 +48,19 @@ allprojects {
|
||||
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
maven { url("$rootDir/../node_modules/react-native/android") }
|
||||
// Android JSC is installed from npm
|
||||
maven { url("$rootDir/../node_modules/jsc-android/dist") }
|
||||
// For geth, function, and status-go
|
||||
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
|
||||
// Everything Else
|
||||
google()
|
||||
jcenter() // Required for @react-native-community/blur:3.6.1, can be removed after updating to 3.6.1+
|
||||
mavenCentral()
|
||||
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
|
||||
maven { url "https://www.jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,15 +21,14 @@
|
||||
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status
|
||||
|
||||
# Version requirements used throughout the Gradle scripts
|
||||
kotlinVersion=1.7.22
|
||||
minSdkVersion=24
|
||||
compileSdkVersion=33
|
||||
targetSdkVersion=33
|
||||
buildToolsVersion=33.0.0
|
||||
kotlinVersion=1.3.50
|
||||
minSdkVersion=23
|
||||
compileSdkVersion=31
|
||||
targetSdkVersion=31
|
||||
buildToolsVersion=31.0.0
|
||||
supportLibVersion=28.0.0
|
||||
# This should match version from nix/pkgs/aapt2/default.nix
|
||||
gradlePluginVersion=7.4.2
|
||||
kotlinPluginVersion=1.7.22
|
||||
# This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix
|
||||
gradlePluginVersion=3.5.4
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -49,13 +48,5 @@ org.gradle.jvmargs=-Xmx8704M
|
||||
versionCode=9999
|
||||
commitHash=unknown
|
||||
|
||||
# Use this property to enable support to the new architecture.
|
||||
# This will allow you to use TurboModules and the Fabric render in
|
||||
# your application. You should enable this flag either if you want
|
||||
# to write custom TurboModules/Fabric components OR use libraries that
|
||||
# are providing them.
|
||||
newArchEnabled=false
|
||||
|
||||
# Use this property to enable or disable the Hermes JS engine.
|
||||
# If set to false, you will be using JSC instead.
|
||||
hermesEnabled=true
|
||||
# Flipper
|
||||
FLIPPER_VERSION=0.54.0
|
||||
|
||||
@@ -12,10 +12,11 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
|
||||
include ':react-native-nfc-manager'
|
||||
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
|
||||
include ':app'
|
||||
include ':react-native-dialogs'
|
||||
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
|
||||
include ':react-native-status'
|
||||
project(':react-native-status').projectDir = new File(rootProject.projectDir, '../modules/react-native-status/android')
|
||||
include ':react-native-status-keycard'
|
||||
project(':react-native-status-keycard').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-status-keycard/android')
|
||||
include ':react-native-blur'
|
||||
project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android')
|
||||
includeBuild('../node_modules/@react-native/gradle-plugin')
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
|
||||
env: {
|
||||
test: {
|
||||
presets: [
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
"presets": [
|
||||
"module:metro-react-native-babel-preset"
|
||||
],
|
||||
"plugins": [
|
||||
"react-native-reanimated/plugin"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '14',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.14' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
@@ -41,12 +40,16 @@ pipeline {
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* coverage report identification */
|
||||
COVERALLS_SERVICE_NAME = "jenkins"
|
||||
COVERALLS_SERVICE_JOB_ID = "${JOB_NAME}#${BUILD_NUMBER}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
@@ -9,6 +8,8 @@ pipeline {
|
||||
disableConcurrentBuilds()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 40, unit: 'MINUTES')
|
||||
/* Allow copying of artifacts from this job. */
|
||||
copyArtifactPermission('/status-mobile/e2e/*')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
@@ -18,7 +19,7 @@ pipeline {
|
||||
}
|
||||
|
||||
/* WARNING: Defining parameters here with the ?: trick causes them to remember last value. */
|
||||
parameters {
|
||||
parameters {
|
||||
choice(
|
||||
name: 'BUILD_TYPE',
|
||||
description: 'Makefile target to build. Optional Parameter.',
|
||||
@@ -47,6 +48,9 @@ pipeline {
|
||||
stage('Android') { steps { script {
|
||||
apk = jenkins.Build('status-mobile/platforms/android')
|
||||
} } }
|
||||
stage('Android e2e') { steps { script {
|
||||
apke2e = jenkins.Build('status-mobile/platforms/android-e2e')
|
||||
} } }
|
||||
stage('Tests') { steps { script {
|
||||
jenkins.Build('status-mobile/platforms/tests')
|
||||
} } }
|
||||
@@ -56,7 +60,9 @@ pipeline {
|
||||
steps { script {
|
||||
sh('rm -f pkg/*')
|
||||
jenkins.copyArts(ios)
|
||||
//jenkins.copyArts(iose2e)
|
||||
jenkins.copyArts(apk)
|
||||
jenkins.copyArts(apke2e)
|
||||
sha = "pkg/${utils.pkgFilename(ext: 'sha256')}"
|
||||
dir('pkg') {
|
||||
/* generate sha256 checksums for upload */
|
||||
@@ -70,8 +76,8 @@ pipeline {
|
||||
/* object for easier URLs handling */
|
||||
urls = [
|
||||
/* mobile */
|
||||
Apk: utils.pkgUrl(apk),
|
||||
iOS: utils.pkgUrl(ios),
|
||||
Apk: utils.pkgUrl(apk), Apke2e: utils.pkgUrl(apke2e),
|
||||
iOS: utils.pkgUrl(ios), /*iOSe2e: utils.pkgUrl(iose2e),*/
|
||||
Diawi: utils.getEnv(ios, 'DIAWI_URL'),
|
||||
/* upload the sha256 checksums file too */
|
||||
SHA: s3.uploadArtifact(sha),
|
||||
@@ -95,6 +101,17 @@ pipeline {
|
||||
}
|
||||
} }
|
||||
}
|
||||
stage('Run e2e') {
|
||||
when { expression { btype == 'nightly' && params.PUBLISH } }
|
||||
steps { script {
|
||||
e2eApk = utils.getEnv(apke2e, 'SAUCE_URL')
|
||||
build(
|
||||
job: 'status-mobile/e2e/status-app-nightly',
|
||||
parameters: [string(name: 'APK_URL', value: e2eApk)],
|
||||
wait: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
triggers {
|
||||
// Nightly at 2am
|
||||
cron 'H 2 * * *'
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'BRANCH',
|
||||
description: 'Name of the branch to checkout and build.',
|
||||
defaultValue: 'develop',
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
apk_build = jenkins.Build('status-mobile/platforms/android-e2e')
|
||||
apk_build_number = apk_build.getNumber().toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Run e2e') {
|
||||
steps {
|
||||
build(
|
||||
job: 'status-mobile/e2e/status-app-nightly',
|
||||
parameters: [
|
||||
string(name: 'APK_BUILD_NUMBER', value: apk_build_number),
|
||||
string(name: 'BRANCH', value: env.BRANCH),
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos && arm64 && nix-2.14 && xcode-14.3' }
|
||||
agent { label 'macos && arm64 && nix-2.11 && xcode-14.2' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
@@ -49,6 +48,7 @@ pipeline {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
@@ -64,9 +64,7 @@ pipeline {
|
||||
script { api = ios.bundle() }
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
archiveArtifacts 'ios/logs/*'
|
||||
}
|
||||
failure { archiveArtifacts 'ios/logs/*' }
|
||||
}
|
||||
}
|
||||
stage('Parallel Upload') {
|
||||
@@ -77,6 +75,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Upload') {
|
||||
when { expression { !utils.isReleaseBuild() } }
|
||||
steps { script {
|
||||
env.DIAWI_URL = ios.uploadToDiawi()
|
||||
env.PKG_URL = env.DIAWI_URL
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
@@ -29,7 +28,7 @@ pipeline {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
timeout(time: 300, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
@@ -42,19 +41,18 @@ pipeline {
|
||||
steps { script {
|
||||
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
|
||||
/* some build targets don't build on MacOS */
|
||||
os = sh(script: 'uname', returnStdout: true)
|
||||
arch = sh(script: 'arch', returnStdout: true)
|
||||
uname = sh(script: 'uname', returnStdout: true)
|
||||
} }
|
||||
}
|
||||
stage('Build status-go') {
|
||||
steps { script {
|
||||
def platforms = ['mobile.android', 'mobile.ios', 'library']
|
||||
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
|
||||
/* FIXME: Remove this when #16237 is merged. */
|
||||
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
|
||||
def platforms = ['mobile.android', 'mobile.ios']
|
||||
if (uname != "Darwin") {
|
||||
platforms.removeAll { it == "ios" }
|
||||
}
|
||||
platforms.each { os ->
|
||||
nix.build(
|
||||
attr: "targets.status-go.${os}",
|
||||
attr: "targets.status-go.${os}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
@@ -63,9 +61,10 @@ pipeline {
|
||||
}
|
||||
stage('Build android jsbundle') {
|
||||
steps { script {
|
||||
/* Build/fetch deps required for jsbundle build. */
|
||||
/* build/fetch things required to produce a js-bundle for android
|
||||
* (e.g. maven and node repos) */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.jsbundle',
|
||||
attr: 'targets.mobile.android.jsbundle',
|
||||
sandbox: false,
|
||||
pure: false,
|
||||
link: false
|
||||
@@ -74,7 +73,7 @@ pipeline {
|
||||
}
|
||||
stage('Build android deps') {
|
||||
steps { script {
|
||||
/* Build/fetch deps required to build android release. */
|
||||
/* build/fetch things required to build jsbundle and android */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.android.release.buildInputs',
|
||||
sandbox: false,
|
||||
@@ -85,16 +84,12 @@ pipeline {
|
||||
}
|
||||
stage('Build nix shell deps') {
|
||||
steps { script {
|
||||
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
|
||||
if (os != "Darwin") { shells.removeAll { it == 'ios' } }
|
||||
/* Build/fetch deps required to start default Nix shell. */
|
||||
shells.each { shell ->
|
||||
nix.build(
|
||||
attr: "shells.${shell}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
}
|
||||
/* build/fetch things required to instantiate shell.nix for TARGET=all */
|
||||
nix.build(
|
||||
attr: 'shells.default.buildInputs',
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Upload') {
|
||||
@@ -1,16 +1,15 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.14' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
timeout(time: 10, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
@@ -42,13 +41,20 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checks') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make lint CLJ_LINTER_PRINT_WARNINGS=true 2>&1 | tee ${LOG_FILE}
|
||||
make lint 2>&1 | tee ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -7,24 +6,14 @@ pipeline {
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'APK_BUILD_NUMBER',
|
||||
description: 'platform/e2e build number for apk artifact',
|
||||
name: 'APK_URL',
|
||||
description: 'URL of APK uploaded to SauceLabs.',
|
||||
)
|
||||
string(
|
||||
name: 'KEYWORD_EXPRESSION',
|
||||
description: 'This will run tests which contain names that match the given string expression (Optional)',
|
||||
defaultValue: '',
|
||||
)
|
||||
string(
|
||||
name: 'BRANCH',
|
||||
description: 'Name of the branch to checkout and build.',
|
||||
defaultValue: 'develop',
|
||||
)
|
||||
string(
|
||||
name: 'TR_CASE_IDS',
|
||||
description: 'IDs of the TestRail case, separated by a comma (Optional)',
|
||||
defaultValue: '',
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
@@ -33,14 +22,15 @@ pipeline {
|
||||
|
||||
stages {
|
||||
stage('Fetch') {
|
||||
when { expression { !params.APK_URL } }
|
||||
steps { script {
|
||||
copyArtifacts(
|
||||
projectName: "status-mobile/platforms/android-e2e",
|
||||
filter: 'result/*-x86.apk',
|
||||
selector: specific(env.APK_BUILD_NUMBER),
|
||||
projectName: "status-mobile/nightly",
|
||||
filter: '*-x86.apk',
|
||||
/* WARNING: This copies the latest available artifact. */
|
||||
selector: lastWithArtifacts(),
|
||||
)
|
||||
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*-x86.apk')}"
|
||||
|
||||
apk_path = "${env.WORKSPACE}/${utils.findFile('*-x86.apk')}"
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -83,7 +73,7 @@ pipeline {
|
||||
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
|
||||
sh """
|
||||
python3 -m pytest \
|
||||
--numprocesses 8 \
|
||||
--numprocesses 4 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
-m testrail_id \
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -46,7 +45,6 @@ pipeline {
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -123,7 +121,7 @@ pipeline {
|
||||
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
|
||||
sh """
|
||||
python3 -m pytest \
|
||||
--numprocesses 8 \
|
||||
--numprocesses 4 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
-k \"${params.KEYWORD_EXPRESSION}\" \
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
/**
|
||||
* This job runs daily and executes `pod repo update` on MacOS
|
||||
* This is done to avoid issues with out of date repo causing errors like:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.7.15'
|
||||
library 'status-jenkins-lib@v1.6.9'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -16,17 +16,9 @@
|
||||
|
||||
[Merging PR process](merging-pr-process.md)
|
||||
|
||||
[PR Review Policy](pr-review-policy.md)
|
||||
|
||||
[Working on PR together with QA team](pipeline_process.md)
|
||||
|
||||
[Debugging](debugging.md)
|
||||
|
||||
[Patching](patching.md)
|
||||
|
||||
[Creating a pixel perfect UI](pixel-perfection.md)
|
||||
|
||||
[Contributing to status-go](status-go-changes.md)
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -37,13 +29,6 @@
|
||||
[Component tests (jest) overview](component-tests-overview.md)
|
||||
|
||||
|
||||
## Project details
|
||||
|
||||
[status-go introduction (recorded meeting)](https://drive.google.com/file/d/1B7TljmTZ8fHkqJH8ChU1Cp4FGDFM03gq/view)
|
||||
|
||||
[re-frame usage (recorded meeting)](https://drive.google.com/file/d/1qv_E0CEGzQpu_zGXD0gCTU5EvhC2k8Jy/view)
|
||||
|
||||
[status app functionality demo](https://drive.google.com/file/u/0/d/1PmwsMLTLDNNIdv5_6wvMOwoj2PfT50c6/view)
|
||||
|
||||
## Misc
|
||||
|
||||
|
||||
@@ -91,11 +91,30 @@ These guidelines make db.cljs namespaces the place to go when making changes to
|
||||
|
||||
- If manual QA is not needed but all tests don't pass, you can ping @churik or @Serhy to confirm that failed E2E tests are not unrelated.
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
## Translations
|
||||
The app relies on system locale to select a language from the [list of supported languages](https://github.com/status-im/status-mobile/blob/bda73867471cf2bb8a68b1cc27c9f94b92d9a58b/src/status_im/i18n_resources.cljs#L9). It falls back to English in cash the system locale is not supported.
|
||||
|
||||
We use Lokalise App to manage [translations](https://translate.status.im/). In case you need to add/remove a key to translations, you only need to change `en.json`. Missing keys fallback to `en.json`. The actual translations will be added by Lokalise.
|
||||
|
||||
## re-frisk
|
||||
re-frisk is a state visualization tool written by our very own Andrey (@flexsurfer). To start re-frisk, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
## Merging approved PRs
|
||||
|
||||
We don't Github's UI to merge. Instead `./scripts/merge-pr.sh` is used to sign and merge PR to `develop`. You first need to enable [GPG signing on you commits](https://github.com/status-im/status-mobile/blob/develop/STARTING_GUIDE.md#configure-gpg-keys-for-signing-commits).
|
||||
|
||||
@@ -23,13 +23,13 @@ setups and runs the test suite once.
|
||||
setups and runs the test suite and watches for code changes will then retrigger the test suite.
|
||||
|
||||
## Writing Tests
|
||||
New test files will need their namespace added to either the file "src/quo/core_spec.cljs" or "src/status_im2/core_spec.cljs. These locations may update overtime but it is dependent on the entrypoint in shadow-cljs config discussed below.
|
||||
New test files will need their namespace added to either the file "src/quo2/core_spec.cljs" or "src/status_im2/core_spec.cljs. These locations may update overtime but it is dependent on the entrypoint in shadowcljs config discussed below.
|
||||
|
||||
|
||||
### Best practices
|
||||
For the moment we will keep best practices for tests in our other guidelines document:
|
||||
|
||||
To that point these guidelines will follow the conventions of Jest and React Native Testing Library recommendations and Status mobile will just stack their preferences on top.
|
||||
To that point these guidelines will follow the conventions of Jest and React Native Testing Library recomendations and Status mobile will just stack their preferences on top.
|
||||
|
||||
### Utilities
|
||||
There is a file of utility functions defined in "src/test_helpers/component.cljs" and "src/test_helpers/component.clj". It will be great to use these utilities and to add any common testing tools to these files as it should make writing tests easier and faster.
|
||||
@@ -52,4 +52,4 @@ It's worth knowing that our tests are compiled to JS and then run in the tempora
|
||||
### Jest
|
||||
There is also further configuration for Jest in "test/jest". There is a jest config file which has some mostly standard configuration pieces, where the tests live, what environment variables are set etc. This is documented by Jest here: https://jestjs.io/docs/configuration
|
||||
|
||||
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies
|
||||
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies
|
||||
@@ -1,136 +0,0 @@
|
||||
# Debugging
|
||||
|
||||
## Inspecting re-frame with re-frisk
|
||||
`re-frisk` is a state visualization tool written by our very own Andrey (@flexsurfer). With its help you can inspect the current state of app-db, watch event, etc.
|
||||
|
||||

|
||||
|
||||
To start `re-frisk`, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
More details about re-frisk are on the [project page](https://github.com/flexsurfer/re-frisk).
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
|
||||
## Checking status-go logs
|
||||
While status mobile works it saves logs from `status-go` to `geth.log` file.
|
||||
|
||||
|
||||
### Checking logs from physical device
|
||||
To obtain `geth.log` from physical device you need to shake it and in an opened menu select "Share logs".
|
||||
|
||||

|
||||
|
||||
|
||||
### Checking logs from iOS Simulator
|
||||
When developing with iOS simulator it is more convenient to see the `geth.log` updates in real-time.
|
||||
To do this:
|
||||
- open Activity Monitor
|
||||
- find the "StatusIm" app and doubleclick it
|
||||
- in the opened window select "Open files and ports" and find the full path to `geth.log` (note that it won't appear until you login to Status app)
|
||||
|
||||

|
||||
|
||||
## Inspecting database content
|
||||
|
||||
Encrypted database can be found using commands:
|
||||
```
|
||||
cd ~/Library/Developer/CoreSimulator/Devices
|
||||
find ./ -name accounts.sql
|
||||
```
|
||||
|
||||
To get unencrypted database you need to export it first:
|
||||
- open the status app in simulator
|
||||
- on login screen enter the correct password without logging in
|
||||
- using repl execute statement to export db:
|
||||
```
|
||||
(re-frame.core/dispatch [:multiaccounts.login.ui/export-db-submitted])
|
||||
```
|
||||
- save generated `export.db` file
|
||||
|
||||
Now you can locate the `export.db` and open it with preferred db viewer.
|
||||
|
||||
**Android:**
|
||||
|
||||
```sh
|
||||
adb root
|
||||
adb pull /storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/export.db /path/to/store/export.db
|
||||
```
|
||||
|
||||
If you're using a release build, change the path to `/storage/emulated/0/Android/data/im.status.ethereum/files/Download`
|
||||
|
||||
**iOS**
|
||||
|
||||
```
|
||||
cd ~/Library/Developer/CoreSimulator/Devices
|
||||
find ./ -name export.db
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Tips
|
||||
### From @ilmotta:
|
||||
|
||||
Something I find extremely convenient for Android is to use `adb` to tail logs. I don't use macOS so I don't know if the iOS simulator offers a CLI interface with the same capabilities.
|
||||
|
||||
But here's what I use for example:
|
||||
|
||||
```
|
||||
adb shell tail -n 10 -f /storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/geth.log | grep 'waku.relay'
|
||||
```
|
||||
|
||||
Also to inspect logs in a more flexible manner, instead of the strict output from `make run-metro`, I prefer `adb logcat`. Combined with enabling status-mobile logs in debug by default plus filtering the logs to only what I care during development, I find this helps me inspect the app without running re-frisk because with the debug log level I can already see which events are dispatched (one of the features I like the most from re-frisk).
|
||||
|
||||
```
|
||||
adb logcat | grep 'ReactNativeJS\|StatusModule\|GoLog'
|
||||
```
|
||||
|
||||
### From @clauxx (visual debugging):
|
||||
|
||||
When building/fixing/refactoring components, it can be annoying to set-up the component for instant visual feedback (i.e. finding it in the UI when fixing/refactoring; finding a place for it when building from scratch). Very often if the location of the screen containing your component nested deeply in the app, you might have to do a lot of repeated navigation, nevermind logging in every time the app reloads (even with fast refresh disabled this happens quite often).
|
||||
|
||||
To alleviate this discomfort and make the development cycle more *pleasant*, you can use one of the following options (*_both of which involve the ... REPL ༼ つ ╹ ╹ ༽つ, so make sure you have that set-up with your IDE/editor_*)
|
||||
|
||||
#### REPL-ing to a screen
|
||||
|
||||
This one is straightforward, just evaluate a navigation dispatch form from anywhere:
|
||||
|
||||
```cljs
|
||||
(comment (rf/dispatch [:navigate-to :your-favorite-buggy-screen]))
|
||||
```
|
||||
|
||||
> TIP: you can run this from an untracked user namespace `(ns user)`, from which you can experiment or interact with the REPL. This is where I usually keep my development navigation forms.
|
||||
|
||||
#### REPL-ing a component
|
||||
|
||||
This is also straighforward, but there are some small differences. Just like above, we only have to evaluate a dispatch form, as follows:
|
||||
|
||||
```cljs
|
||||
;; example debugging a quo component, although it could be any other component e.g. from the `status-im2` ns.
|
||||
(comment (re-frame/dispatch [:dev/preview-component
|
||||
[quo/slide-button
|
||||
{:track-icon :face-id
|
||||
:track-text "preview component example"
|
||||
:customization-color :blue
|
||||
:on-complete identity}]]))
|
||||
```
|
||||
|
||||
When evaluated, a full-screen bottom sheet will appear with your component inside. You can make changes to the props or the component internals and re-evaluate the changed forms, after which the component will be re-mounted without running a reload (unless you save the file). Other times it's quicker to just hit save and the component will be reloaded as usual (except for the props you evaluated, which have to be re-evaluated when changed).
|
||||
|
||||
> TIP: You can have multiple versions of the component as separate comments to check for the component variations
|
||||
|
||||
> TIP: You can leave `comment` blocks at the end of component files (other than quo, since can be previewed in other ways) with usages of components, which other developers can use for visualisation/testing.
|
||||
@@ -18,7 +18,7 @@ While neat in theory, it has some serious downsides:
|
||||
As a result of that, more dynamic/state requiring things (like the live tx detail in `/send` command messages) were very hard to do,
|
||||
so instead of "eating our own dogfood", we decided to side-step the API and implement such things as hard-coded logic in the app, while partly
|
||||
retaining the js code for "easier" things (like parameter declaration).
|
||||
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completely
|
||||
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completly
|
||||
defeating the point of "dogfooding" while still requiring more effort and being much more error prone (no way to unit test jail logic) because
|
||||
of the need to asynchronously communicate with jail for leftover logic in command messages (the parts not hardcoded in app).
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ accepted
|
||||
|
||||
There was a generally dissatisfaction with our PR flow process from multiple stakeholders, including devs, QA and design. These largely centered around size, speed of integration and quality of PRs.
|
||||
|
||||
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
|
||||
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceeding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
|
||||
|
||||
Also see conversations in Core Dev Call #12 and #13: https://github.com/status-im/pm/
|
||||
|
||||
|
||||
@@ -45,4 +45,4 @@ The `State` field in the Pivotal story is used to track the progress of a Pivota
|
||||
| 5 points | 2 - 3 days |
|
||||
| 8 points | ~1 week |
|
||||
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
@@ -18,7 +18,7 @@ The whitepaper also proposes that the deposit is only forfeited to the recipient
|
||||
|
||||
Considering:
|
||||
- the absence of efficient ways to perform anonymous transactions (zk-snarks could be used in the future for that)
|
||||
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be practical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
|
||||
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be pratical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
|
||||
- the limited time to develop the feature
|
||||
|
||||
We opted for a solution that:
|
||||
@@ -28,8 +28,8 @@ We opted for a solution that:
|
||||
|
||||
## Manifests
|
||||
|
||||
Since TtT related information aren't stored on chain, they need to be stored somewhere else.
|
||||
For the first iteration of TtT we opted for IPFS, which is already used across the app for other forms of content, through Infura IPFS gateway.
|
||||
Since TtT related informations aren't stored on chain, they need to be stored somewhere else.
|
||||
For the first iteration of TtT we opted for IPFS, which is already used accross the app for other forms of content, through Infura IPFS gateway.
|
||||
|
||||
On IPFS we store what we call a ttt manifest, which is a json file with the following format:
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# 0014. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | wallet team |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed
|
||||
|
||||
## Context:
|
||||
|
||||
In order to try out vertical team, which is a structure that is wanted by the company, we will be creating a wallet team within the mobile team.
|
||||
Some member of the mobile team will join the current wallet team, which is composed by developers from desktop and lead by @alaibe, on a voluntary basis.
|
||||
The responsibilities of the team are to implement the new wallet UI, with the support of the current wallet team, which will be assisting with the status-go work.
|
||||
|
||||
## Decision
|
||||
|
||||
The team members for the initial wallet team are:
|
||||
|
||||
- @rasom
|
||||
- @OmarBasem
|
||||
- @vkjr
|
||||
- @J-Son89
|
||||
- @briansztamfater
|
||||
- @smohamedjavid
|
||||
- @ulisesmac
|
||||
- @erikseppanen
|
||||
- @mmilad75
|
||||
- @tumanov-alex
|
||||
@@ -1,46 +0,0 @@
|
||||
# 0015. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | changes in team structure |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed/partially implemented
|
||||
|
||||
## Context:
|
||||
|
||||
Currently, there is only a single team lead in the mobile development team, and after a meeting with the design team, it has been identified that the mobile app lacks polishness. One of the main issues identified is a lack of oversight in certain areas. To address this problem, it has been decided to create an additional role within the team. For each section of the mobile app (communities, syncing & onboarding, activity center & shell, wallet, messaging), a person will be selected to fulfill the responsibilities outlined below.
|
||||
|
||||
## Decision
|
||||
|
||||
The decision is to create an additional role within the mobile development team for each section. The individuals selected for these roles will have the following responsibilities:
|
||||
|
||||
- Ensure GitHub issues are created for new features/designs of the section.
|
||||
- Ensure issues are adequately described and linked as best as possible.
|
||||
- Ensure issues have a grooming session where other developers can provide their feedback before working on the set of issues.
|
||||
- Ensure all relevant parties are invited, such as designers, QA, Product Owner, leads, etc., as needed (including the designer who created the feature).
|
||||
- Ensure there is consensus among the developers working on the section about the decided strategy approach. Ideally, this consensus should be documented.
|
||||
- Ensure UI quality by organizing designer reviews and guaranteeing pixel perfection.
|
||||
- Ensure overall implementation is satisfactory based on the predefined requirements.
|
||||
- Ensure alignment between desktop, web, and mobile versions for the respective section in collaboration with the mobile developers and design team.
|
||||
- Act as a point of contact for the design team with respect to the section.
|
||||
- Ensure that someone goes through the designs once they are created with the respective designer.
|
||||
- Assist the design team with technical feasibility analysis and address any product concerns.
|
||||
- Facilitate the growth of the next team member into the role.
|
||||
|
||||
The people identified for each sections are as follow:
|
||||
|
||||
- Messaging @flexsurfer, followed by @alwx
|
||||
- Syncing & Onboarding @siddarthkay
|
||||
- Communities @ilmotta, followed by @ajayesivan
|
||||
- Activity Center & Shell @J-Son89, followed by @Parveshdhull
|
||||
- Wallet (once the vertical team is created) @J-Son89, followed by @briansztamfater
|
||||
|
||||
This will be a rotating post, every 4 months it will go to the next in line.
|
||||
|
||||
The wallet team might have longer times for rotation, as stability might be more important. That's still to be decided.
|
||||
|
||||
# Follow-up Actions
|
||||
|
||||
- Find suitable next in line for Messaging, Onboarding, Communities
|
||||
@@ -1,31 +0,0 @@
|
||||
### How should the paste button behave when clipboard is empty?
|
||||
|
||||
This question first came up as a review comment to this PR
|
||||
https://github.com/status-im/status-mobile/pull/16852
|
||||
|
||||
There were 2 considerations :
|
||||
- Either keep the paste button disabled when there is nothing in the clipboard OR
|
||||
- Always keep the paste button enabled
|
||||
|
||||
There were positives and negatives for both approaches.
|
||||
|
||||
Positives of keeping paste button disabled when there is nothing in clipboard would require us to
|
||||
check the value of clipboard as soon as the component is mounted (i.e when the user first sees
|
||||
the screen). In iOS this means a native permissions dialog would appear requesting for permissions
|
||||
to paste from the clipboard.
|
||||
|
||||
Negatives of this approach is that as soon as any user navigates to this screen they are greeted with
|
||||
this popup which can be annoying sometimes.
|
||||
|
||||
Positives of keeping paste button always enabled is that we can trigger a request to the clipboard on
|
||||
tap of the paste button which would trigger the native permissions dialog requesting for permissions
|
||||
to paste from the clipboard.
|
||||
In this case seeing this dialog is okay because the user has initiated a paste action.
|
||||
|
||||
Negatives of this approach is that in the event the clipboard is empty the user will still see the
|
||||
system dialog and on approving nothing will be pasted (because the clipboard was empty).
|
||||
This behaviour can be confusing.
|
||||
|
||||
On consulting the Design Team via discord it was concluded that out of the two approaches
|
||||
having the paste button always enabled is a better UX overall.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||

|
||||
|
||||
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons2`
|
||||
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons`
|
||||
2. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name@2x.png"` should be renamed to `"icon_name@2x.png"`.
|
||||
3. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
|
||||
```clojure
|
||||
@@ -12,4 +12,4 @@
|
||||
[vector-icons/icon :icon-name {:color ...}]
|
||||
```
|
||||
2x@2x
|
||||
4. If you want platform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
|
||||
4. If you want paltform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# How to catch crash on ios use xcode
|
||||
|
||||
## Overview
|
||||
Sometimes, we can't reproduce crash with local dev build, probably because your built version differs from the one QA team used.
|
||||
The QA team mostly used the PR build version. In this guide we will try to make a build as close as possible to the PR build for iOS.
|
||||
|
||||
You may notice various configuration files starting with .env (such as .env, .env.e2e, .env.jenkins) in the project.
|
||||
The usage of these files and environment variables injected at build time on CI will not be covered in this guide.
|
||||
|
||||
This guide covers how to configure Xcode to capture a crash stack trace with a physical iOS device. This allows debugging crashes by inspecting the stack trace.
|
||||
I will use [issue #17255](https://github.com/status-im/status-mobile/issues/17255) as an example to reproduce and analyze a crash.
|
||||
|
||||
## Prerequisites
|
||||
- A physical ios device (simulator is not considered in this doc)
|
||||
- Xcode installed
|
||||
|
||||
## Steps
|
||||
1. Prepare Status Mobile
|
||||
1. Open Terminal, cd to project root
|
||||
2. Run `make run-clojure` in one tab
|
||||
3. Run `make run-metro` in a second tab
|
||||
4. Run `make pod-install` in a third tab
|
||||
2. Configure Xcode Project
|
||||
1. Open Xcode
|
||||
2. Open a project or file, navigate to folder `path_to_root_directory_of_status_mobile/ios`
|
||||
3. Set Scheme `StatusImPR` as current scheme 
|
||||
4. Edit scheme 
|
||||
5. Change `Info` 
|
||||
6. Change `Diagnostics` 
|
||||
7. Set automatically manage signing 
|
||||
3. Update Code
|
||||
1. Edit `src/status_im2/setup/dev.cljs`, comment out lines 47-52 
|
||||
2. Edit `shadow-cljs.edn`, comment out `re-frisk-remote.preload`, otherwise it will try to connect `localhost:4567` on physical device which could slow down performance 
|
||||
4. Reproduce Crash And Analyze
|
||||
1. Choose your physical ios device as target device and Run
|
||||
2. Follow reproduce steps from [issue #17255](https://github.com/status-im/status-mobile/issues/17255) mentioned and xcode will halt at crash point 
|
||||
3. Inspect stack trace to identify root cause. From the stack trace, we can locate the crash happened in `api/geth_backend.go:1048`(createTempDBFile) clearly! 
|
||||
|
||||
## Links
|
||||
- [changes](https://github.com/status-im/status-mobile/commit/4306d419de15e737e8ded3a749cc5e8d6a06e627) to source code
|
||||
@@ -19,7 +19,7 @@ For now we support e2e for Android only.
|
||||
## What's happening when any e2e job is running
|
||||
Whenever we need to push set of test scripts we create 16 parallel sessions (max, but depending on amount of cases that are included in job) and each thread: 1) uploads Android .apk file to SauceLabs -> 2) runs through the test steps -> 3) receives results whether test failed on particular step or succeeded with no errors -> 3) Parse test results and push them as a Github comment (if the suite ran against respective PR) and into TestRail.
|
||||
|
||||
We push **whole automation test suite (currently 155, amount is changing)** against each nightly build (if the nightly builds job succeeded). Results of the test run are saved in TestRail.
|
||||
We push **whole automation test suite (currently 155, amout is changing)** against each nightly build (if the nightly builds job succeeded). Results of the test run are saved in TestRail.
|
||||
And also we push set of autotests whenever PR with successful builds got moved in to `E2E Tests` column from [Pipeline for QA dashboard ](https://github.com/status-im/status-react/projects/7).
|
||||
In that case we save results in TestRail as well and push a comment with test results in a respective PR.
|
||||
|
||||
@@ -49,8 +49,8 @@ Params to specify:
|
||||
- apk: [url_to_apk_build_here]
|
||||
- pr_id: pull request number (e.g. 1234)
|
||||
- branch: branch name from which the test are taken (in most of cases `develop`)
|
||||
- keyword expression: tests by area (let's say `ens` or `chat`, they can be combined`ens or chat or send_tx`. All keywords can be found in testrail, ping Chu for details)
|
||||
- test_marks: tests by priorities (by default: `critical or high or medium`, which corresponds the whole suite; to launch the same suite as in PRs, use `critical or high`)
|
||||
- keyword expression: tests by area (let's say `ens` or `chat`, thay can be combined`ens or chat or send_tx`. All keywords can be found in testrail, ping Chu for details)
|
||||
- test_marks: tests by priorities (by default: `critical or high or medium`, which corresponds the whole suite; to lauch the same suite as in PRs, use `critical or high`)
|
||||
- testrail_case_id: here is the list of test cases which you may find in test rail (4-digit value)
|
||||
|
||||
For easier access you can hit `Rerun tests` in GH comment and testrail_case_id/ apk_name/ pr_id will be filled automatically. For making sure that tests are being rerun on most recent e2e build it is recommended to paste link to the last e2e build in apk_name field. The list of PR builds can be found in Jenkins Builds block on PR page.
|
||||
@@ -64,7 +64,7 @@ tests (otherwise some PRs could wait their turn of the scheduled Jenkins job til
|
||||
|
||||
## Analysing test results (and why test fails to pass)
|
||||
|
||||
After automated test run finished test results could be found in GH comment (if the test suite ran against PR) and TestRail. There are two states of the test: Passed and Failed. Test failure happens when certain condition of test step has not met or automated test can not proceed execution because it can not find the respective element on screen it expects should be there.
|
||||
After automated test run finished test results could be found in GH comment (if the test suite ran agaist PR) and TestRail. There are two states of the test: Passed and Failed. Test failure happens when certain condition of test step has not met or automated test can not proceed execution because it can not find the respective element on screen it expects should be there.
|
||||
|
||||
Several examples of when test fails to succeed:
|
||||
|
||||
|
||||
@@ -17,10 +17,9 @@ You can use any Clojure enabled editor. Here are instructions for developing the
|
||||
- [REPL!](#repl)
|
||||
- [Connecting to REPL to IntelliJ](#connecting-to-repl-to-intellij)
|
||||
- [Connecting REPL and IntelliJ to `status-mobile`](#connecting-repl-and-intellij-to-status-mobile)
|
||||
- [Visual Studio Code](#visual-studio-code)
|
||||
- [Set up the REPL](#set-up-the-repl)
|
||||
- [Auto-format files on save](#auto-format-files-on-save)
|
||||
- [Using Emacs with CIDER](#using-emacs-with-cider)
|
||||
- [Using Calva](#using-calva)
|
||||
- [Start and connect the REPL](#start-and-connect-the-repl)
|
||||
- [Use the REPL](#use-the-repl)
|
||||
|
||||
## Using Cursive
|
||||
|
||||
@@ -91,7 +90,7 @@ Press the green run button
|
||||
|
||||
<img src="images/ide-setup/8_REPL_6.png" width=75% />
|
||||
|
||||
You should now see a dialog with the following message:
|
||||
You should now see an dialog with the following message:
|
||||
|
||||
```shell
|
||||
Connecting to remote nREPL server...
|
||||
@@ -161,24 +160,24 @@ Following the above should give you the below result:
|
||||
|
||||
For additional details on issues you may face when setting up REPL with Cursive [see this document](https://notes.status.im/9Gr7kqF8SzC_SmYK0eB7uQ?view#Connecting-Cursive--IntelliJ-IDEA-to-REPL-Problems)
|
||||
|
||||
## Visual Studio Code
|
||||
## Using Calva
|
||||
|
||||
### Set up the REPL
|
||||
For VS Code users.
|
||||
|
||||
1. Install Calva extension.
|
||||
2. Open the `status-mobile` folder.
|
||||
3. Start [Status development](starting-guide.md#development) (Starting the
|
||||
`run-clojure` and `run-metro` jobs in split view in the VS Code integrated
|
||||
terminal works great).
|
||||
4. Run the VS Code command: **Calva: Connect to a running REPL Server in the
|
||||
project**.
|
||||
- Select the project type `shadow-cljs`.
|
||||
- Accept the suggested connection `host:port`.
|
||||
- Select to connect to the `:mobile` build.
|
||||
0. Install Calva.
|
||||
|
||||
Open any `.cljs` file in the project and evaluate forms in it. See
|
||||
https://calva.io/try-first/ for some starter tips and links. Confirm that your
|
||||
REPL is connected to the app by evaluating:
|
||||
### Start and connect the REPL
|
||||
|
||||
1. Open the `status-mobile` folder.
|
||||
1. Start [Status development](STARTING_GUIDE.md#development) (Starting the `run-clojure` and `run-metro` jobs in split view in the VS Code integrated terminal works great.)
|
||||
1. Run the VS Code command: **Calva: Connect to a running REPL Server in the project**
|
||||
1. Select the project type `shadow-cljs`
|
||||
1. Accept the suggested connection `host:port`
|
||||
1. Select to connect to the `:mobile` build
|
||||
|
||||
### Use the REPL
|
||||
|
||||
Open any `.cljs` file in the project and evaluate forms in it. See https://calva.io/try-first/ for some starter tips and links. Confirm that your REPL is connected to the app by evaluating:
|
||||
|
||||
```clojure
|
||||
(js/alert "Hello from Status App!")
|
||||
@@ -186,35 +185,9 @@ REPL is connected to the app by evaluating:
|
||||
|
||||
🎉 Tada! You are ready to use the REPL to improve Status.im! 🎉
|
||||
|
||||
Consider bookmarking [calva.io](https://calva.io/) for quick access to the Calva
|
||||
documentation.
|
||||
Please consider bookmarking [calva.io](https://calva.io/) for quick access to the Calva documentation.
|
||||
|
||||
### Auto-format files on save
|
||||
|
||||
We format Clojure code with [zprint](https://github.com/kkinnear/zprint). We
|
||||
recommend configuring VSCode to auto-format Clojure files on every save,
|
||||
otherwise you'll need to constantly rely on the much slower `make lint-fix`
|
||||
command.
|
||||
|
||||
1. Create a file `~/.zprintrc` and enable the `:search-config?` option. This is
|
||||
necessary so the VSCode extension finds the project's `.zprintrc`.
|
||||
|
||||
```bash
|
||||
echo "{:search-config? true}" > ~/.zprintrc
|
||||
```
|
||||
|
||||
2. Install the extension
|
||||
[vscode-clj-zprint](https://github.com/rflagreca/vscode-clj-zprint). By the
|
||||
way, did you know this extension is written in ClojureScript?
|
||||
3. Copy the recommended settings from our repository in
|
||||
[.vscode/settings.example.json](/.vscode/settings.example.json) and merge it
|
||||
with your workspace settings in `.vscode/settings.json`.
|
||||
|
||||
The extension `vscode-clj-zprint` is only available for VSCode. If you are using
|
||||
VSCodium, you'll need to build the `vsix` (extension) yourself (it's easy, only
|
||||
`yarn` and `vsce` are required).
|
||||
|
||||
## Using Emacs with CIDER
|
||||
## Using Emacs/Cider
|
||||
|
||||
1. Install Emacs/Cider/etc. (there is a lot of variability in how to manage things in emacs, so please google for help with this)
|
||||
2. Add a local ~/.shadow-cljs/config.edn file like below (corresponding to the version numbers of the packages you are using):
|
||||
@@ -225,3 +198,5 @@ VSCodium, you'll need to build the `vsix` (extension) yourself (it's easy, only
|
||||
[cider/cider-nrepl "0.28.4"]
|
||||
[cider/piggieback "0.5.2"]]}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 308 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 344 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 205 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 564 KiB |
|
Before Width: | Height: | Size: 64 KiB |
@@ -4,11 +4,9 @@
|
||||
2) Add some reviewers to the PR and wait for feedback
|
||||
3) Address feedback
|
||||
4) Make sure builds and tests are green (run `make test` locally, `make lint-fix` to fix any indentation issue and `make lint`)
|
||||
5) Once the PR has been reviewed by the dev team, run e2e tests on it by going to https://github.com/status-im/status-mobile/projects/7 and move the pr under the column E2E tests. This will trigger tests. **Running E2E tests is required for all PRs.**
|
||||
1) Read our [PR Review Policy](pr-review-policy.md) for more details on our approach to PR reviews.
|
||||
2) Learn more about our [Pipeline for QA](pipeline_process.md) process
|
||||
5) Once the PR has been reviewed by the dev team you can run e2e tests on it by going to https://github.com/status-im/status-mobile/projects/7 and move the pr under the column E2E tests. This will trigger tests.
|
||||
6) Once e2e tests have run, they will report the result on the PR, if it's less than 100%, ask QA to take a look to make sure everything is in order (some might fail for legitimate reasons)
|
||||
7) Ask QA for manual testing if the PR requires it (more details [here](pipeline_process.md))
|
||||
7) Ask QA for manual testing if the PR requires it
|
||||
8) Once it has been tested successfully, squash everything into one commit. rebase and merge. The commands we use:
|
||||
```
|
||||
git checkout develop
|
||||
@@ -41,9 +39,7 @@ In practice, this means that sometimes they need to be merged in lockstep.
|
||||
git push origin vx.y.z
|
||||
```
|
||||
5) Update status-mobile with the new status-go version, using the new tag `scripts/update-status-go.sh "vx.y.z"`
|
||||
6) If you had to rebase status-go to include new changes, e2e test MUST be re-run. If there's any issue you will
|
||||
have to fix in status-go with another PR and follow the same process.
|
||||
7) In status-mobile, push, rebase against `develop` and merge it 🚀
|
||||
6) In status-mobile, push, rebase against `develop` and merge it 🚀
|
||||
|
||||
|
||||
important note : make sure your status-go PRs get a tested-ok by QA before merging them in.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# Code Style Guidelines
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The goal of this document is to help all contributors (core and external) to
|
||||
> write code in _unison_ and help establish good practices that serve the Status
|
||||
> Mobile contributors well.
|
||||
>The goal of this document is to help all contributors (core and external) to
|
||||
>write code in _unison_ and help establish good practices that serve the Status
|
||||
>Mobile contributors well.
|
||||
|
||||
We don't want to turn this document into an exhaustive list of rules to be
|
||||
followed that nobody will read. As much as possible, we'll try to document only
|
||||
@@ -11,130 +10,37 @@ what we consider important for Status Mobile. In other words, we don't want to
|
||||
maintain a general Clojure convention/style guide, nor do we want to turn this
|
||||
document into a long tutorial.
|
||||
|
||||
> [!WARNING]
|
||||
> This is a **work in progress**, and not all conventions are properly
|
||||
> implemented in the codebase yet. The project structure is also undergoing
|
||||
> major changes, and it will take a considerable amount of time until we migrate
|
||||
> the existing code to the new structure.
|
||||
This is a **work in progress**, and not all conventions are properly implemented
|
||||
in the codebase yet. The project structure is also going over major changes (as
|
||||
of Nov/2022), and it'll take a considerable amount of time until we migrate the
|
||||
existing code to the new structure.
|
||||
|
||||
If you find out anything is outdated or missing, please, share with us or even
|
||||
better, create a pull-request! 🤸
|
||||
|
||||
## Style guide
|
||||
|
||||
We follow the [Clojure Style
|
||||
Guide](https://github.com/bbatsov/clojure-style-guide) and we use
|
||||
[zprint](https://github.com/kkinnear/zprint) to format Clojure code. Running
|
||||
`make lint-fix` should fix most formatting issues, but not all of them.
|
||||
We mostly follow the [Clojure Style
|
||||
Guide](https://github.com/bbatsov/clojure-style-guide), so it's recommended to
|
||||
get familiar with it.
|
||||
|
||||
As of Nov/2022, running `make lint` should fix the most basic formatting issues,
|
||||
and we are in the process of integrating a tool to format non-trivial code
|
||||
according to the Clojure Style Guide. This should greatly reduce noise in
|
||||
pull-request reviews and it'll simplify the life of all contributors.
|
||||
|
||||
Pay special attention to:
|
||||
|
||||
- Align let bindings https://github.com/bbatsov/clojure-style-guide#bindings-alignment
|
||||
- Align map keys https://github.com/bbatsov/clojure-style-guide#map-keys-alignment
|
||||
|
||||
## Dos and don'ts
|
||||
|
||||
### Hiccup
|
||||
|
||||
Never use anonymous inline function in hiccup, this will lead to
|
||||
reinitialization of component on each render of parent component.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn checkbox-view
|
||||
[{:keys [size]}]
|
||||
[rn/view
|
||||
[(fn [] [rn/view])]])
|
||||
|
||||
;; good
|
||||
(defn comp []
|
||||
[rn/view])
|
||||
|
||||
(defn checkbox-view
|
||||
[{:keys [size]}]
|
||||
[rn/view
|
||||
[comp]])
|
||||
```
|
||||
|
||||
This mistake mostly happens with functional components.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(fn []
|
||||
(let [atom (rf/sub [:sub])]
|
||||
(fn []
|
||||
[:f>
|
||||
(fn []
|
||||
[rn/text atom]
|
||||
|
||||
;; good
|
||||
(defn f-comp [atom]
|
||||
[rn/text atom])
|
||||
|
||||
(fn []
|
||||
(let [atom (rf/sub [:sub])]
|
||||
(fn []
|
||||
[:f> f-comp atom])))
|
||||
```
|
||||
|
||||
It's important to name functional components with `f-` prefix.
|
||||
|
||||
### Component props and API scheme to match Figma as closely as possible
|
||||
|
||||
Ideally, the prop names for components (particularly in quo Design System)
|
||||
should match the Figma properties as best as possible. This makes it easier for
|
||||
the developer using that component to configure it correctly for the screen it
|
||||
is being used on and avoids unnecessary overwrites and adjustments being made.
|
||||
|
||||
#### Avoid unnecessarily grouping categories to reduce the number of props
|
||||
|
||||
For example in Figma if there is a component and it has the following variants:
|
||||
|
||||
|theme: "light" blur: "False"|theme: "dark" blur: "False"|theme: "light" blur: "True"|theme: "dark" blur: "True"|
|
||||
|----------------------------|---------------------------|---------------------------|---------------------------|
|
||||
| type :neutral label "ABC" | type :neutral label "ABC" | | |
|
||||
| type :active label "ABC" | type :active label "ABC" | | |
|
||||
| type :danger label "ABC" | type :danger label "ABC" | type :danger label "ABC" | type :danger label "ABC" |
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
"theme - :light or :dark
|
||||
type - can be :neutral :active :danger :danger-blur"
|
||||
(defn my-component [{:keys [theme type]} label])
|
||||
|
||||
;; good
|
||||
"theme - :light or :dark
|
||||
type - can be :neutral :active :danger
|
||||
blur? - boolean
|
||||
"
|
||||
(defn my-component [{:keys [theme blur? type]} label])
|
||||
```
|
||||
|
||||
Please note this is only for the external API of the component and there should
|
||||
be no restriction of how the component manages its internal API as that will not
|
||||
affect the developer using the component with the issues described above.
|
||||
|
||||
In some cases this is not always possible or does not make sense. However the
|
||||
thought process should be how easy will it be for another developer to use this
|
||||
component with the correct configuration given the screen designs for Figma.
|
||||
|
||||
#### Avoid unnecessarily renaming props
|
||||
|
||||
In general it can be helpful to avoid renaming props from their counterpart in
|
||||
Figma.
|
||||
|
||||
For example if Figma has sizes `:small`, `:medium` and `:large`
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
":size - :little, :default or :big"
|
||||
(defn my-component [{:keys [size]}])
|
||||
|
||||
;; good
|
||||
":size - :small, :medium or :large"
|
||||
(defn my-component [{:keys [size]}])
|
||||
```
|
||||
|
||||
### Component styles
|
||||
|
||||
Prefer to define styles in a separate file named `style.cljs`, colocated with
|
||||
the source file. For a real example, see
|
||||
[src/quo/components/record_audio/record_audio/style.cljs](../src/quo/components/record_audio/record_audio/style.cljs).
|
||||
[src/quo2/components/record_audio/record_audio/style.cljs](../src/quo2/components/record_audio/record_audio/style.cljs).
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
@@ -155,81 +61,6 @@ the source file. For a real example, see
|
||||
[rn/view (do-something)]])
|
||||
```
|
||||
|
||||
### Always add styles inside the `:style` key
|
||||
|
||||
Although when compiling ReactNative for mobile some components are able work with
|
||||
their styles in the top-level of the properties map, prefer to add them inside the
|
||||
`:style` key in order to separate styles from properties:
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
[rn/button {:flex 1
|
||||
:padding-vertical 10
|
||||
:padding-horizontal 20
|
||||
:on-press #(js/alert "Hi!")
|
||||
:title "Button"}]
|
||||
|
||||
;; good
|
||||
[rn/button {:style {:flex 1
|
||||
:padding-vertical 10
|
||||
:padding-horizontal 20}
|
||||
:on-press #(js/alert "Hi!")
|
||||
:title "Button"}]
|
||||
|
||||
;; better
|
||||
;; (define them in a style ns & place them inside `:style` key)
|
||||
[rn/button {:style (style/button)
|
||||
:on-press #(js/alert "Hi!")
|
||||
:title "Button"}]
|
||||
```
|
||||
|
||||
Also its fine to keep one liner styles in view
|
||||
|
||||
```clojure
|
||||
;; ok
|
||||
[rn/view {:style {:flex 1 :padding-top 5}}]
|
||||
```
|
||||
|
||||
### Don't define properties in styles ns
|
||||
|
||||
Properties must be set on view level
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
{:style {:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:bottom 0}
|
||||
:blur-amount 30
|
||||
:blur-radius 25
|
||||
:blur-type :transparent
|
||||
:overlay-color :transparent}
|
||||
|
||||
;; good
|
||||
{:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:bottom 0}
|
||||
```
|
||||
|
||||
### Apply animated styles in the style file
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn circle
|
||||
[]
|
||||
(let [opacity (reanimated/use-shared-value 1)]
|
||||
[reanimated/view {:style (reanimated/apply-animations-to-style
|
||||
{:opacity opacity}
|
||||
style/circle-container)}]))
|
||||
|
||||
;; good
|
||||
(defn circle
|
||||
[]
|
||||
(let [opacity (reanimated/use-shared-value 1)]
|
||||
[reanimated/view {:style (style/circle-container opacity)}]))
|
||||
```
|
||||
|
||||
### Don't use percents to define width/height
|
||||
|
||||
In ReactNative, all layouts use the [flexbox
|
||||
@@ -246,37 +77,24 @@ Joshua Comeau.
|
||||
[rn/view {:style {:padding-horizontal 20}}]
|
||||
```
|
||||
|
||||
### Use a question mark to convey the value is a boolean
|
||||
### Don't prepend booleans with is-
|
||||
|
||||
The Clojure Style Guide suggests using a question mark only in [predicate
|
||||
functions](https://guide.clojure.style/#naming-predicates), but nothing is
|
||||
mentioned about other symbols and keywords. We prefer to extend the convention
|
||||
to all boolean references.
|
||||
It is a common practice in JavaScript and other languages to prepend boolean variable names with `is-*`.
|
||||
In ClojureScript it is common practice to suffix boolean variable names with a `?`.
|
||||
There is no need for both of these and so it is preferable to stick with the latter.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(let [is-open? true] ...)
|
||||
(def flag-is-enabled false)
|
||||
|
||||
;; good
|
||||
(let [open? true] ...)
|
||||
(def flag-enabled? false)
|
||||
```
|
||||
|
||||
And for keywords too:
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
[some-component {:logged-in true}]
|
||||
|
||||
;; good
|
||||
[some-component {:logged-in? true}]
|
||||
```
|
||||
|
||||
### Styles def vs defn
|
||||
|
||||
Always use `def` over `defn` if there are no dynamic values. This helps cut the
|
||||
cost of function calls.
|
||||
Always use `def` over `defn`, unless the style relies on dynamic values, such as
|
||||
deref'ed atoms.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
@@ -300,18 +118,15 @@ cost of function calls.
|
||||
|
||||
### Custom Colors
|
||||
|
||||
The Status designs have a lot of customization of user and group colors. For
|
||||
consistency it is best to use `customization-color` as the prop key on pages and
|
||||
components. This will help easily identify what pages and components in the
|
||||
application are using customized colors.
|
||||
The Status designs have a lot of customization of user and group colors with components and pages. For consistency it is best to use `customization-color` as the prop key on pages and components. This will help easily identify what pages and components in the application are using customized colors.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn community-card [{keys [custom-color]}]
|
||||
(defn community-card [{keys [custom-color]}]
|
||||
...)
|
||||
|
||||
;; good
|
||||
(defn community-card [{keys [customization-color]}]
|
||||
(defn community-card [{keys [customization-color]}]
|
||||
...)
|
||||
```
|
||||
|
||||
@@ -428,67 +243,23 @@ dispatch.
|
||||
(str "Hello " username)]])
|
||||
```
|
||||
|
||||
### Registering effects
|
||||
|
||||
When registering re-frame effects (`reg-fx`), prefer to expose a data-only
|
||||
interface because that will allow event handlers to stay pure.
|
||||
|
||||
For instance, if an effect needs a `on-success` callback, allow it to receive a
|
||||
*re-frame event vector*. This approach is used by us in the [json-rpc/call
|
||||
effect](src/status_im2/common/json_rpc/events.cljs), but also by third-party
|
||||
effects, such as https://github.com/Day8/re-frame-http-fx. For the complete
|
||||
rationale, see [PR #15936](https://github.com/status-im/status-mobile/pull/15936).
|
||||
|
||||
### Using the effect `:json-rpc/call`
|
||||
|
||||
Prefer the pure version of `:json-rpc/call` (no callbacks).
|
||||
|
||||
```clojure
|
||||
;; not as good
|
||||
(rf/defn accept-contact-request
|
||||
{:events [:activity-center.contact-requests/accept]}
|
||||
[_ contact-id]
|
||||
{:json-rpc/call
|
||||
[{:method "wakuext_acceptContactRequest"
|
||||
:params [{:id contact-id}]
|
||||
:on-success #(rf/dispatch [:sanitize-messages-and-process-response %])
|
||||
:on-error #(rf/dispatch [:activity-center.contact-requests/accept-error contact-id %])}]})
|
||||
|
||||
;; better
|
||||
(rf/defn accept-contact-request
|
||||
{:events [:activity-center.contact-requests/accept]}
|
||||
[_ contact-id]
|
||||
{:json-rpc/call
|
||||
[{:method "wakuext_acceptContactRequest"
|
||||
:params [{:id contact-id}]
|
||||
:on-success [:sanitize-messages-and-process-response]
|
||||
:on-error [:activity-center.contact-requests/accept-error contact-id]}]})
|
||||
```
|
||||
|
||||
### Registering event handlers
|
||||
|
||||
Register events with `utils.re-frame/reg-event-fx` and follow [re-frame's best
|
||||
practice](https://github.com/day8/re-frame/blob/39adca93673f334dc751ee2d99d340b51a9cc6db/docs/FAQs/BestPractice.md#use-the-fx-effect)
|
||||
so use only `:db` and `:fx` effects. `utils.re-frame/merge` and `utils.re-frame/defn` are deprecated and should not be
|
||||
used in the new code in `src/status_im2/`. Don't use
|
||||
Events must always be declared with the `utils.fx/defn` macro. Also, don't use
|
||||
`re-frame.core/reg-event-db`.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(rf/defn invite-people-pressed
|
||||
{:events [:communities/invite-people-pressed]}
|
||||
[cofx id]
|
||||
(rf/merge cofx
|
||||
(reset-community-id-input id)
|
||||
(bottom-sheet/hide-bottom-sheet)
|
||||
(navigation/open-modal :invite-people-community {:invite? true})))
|
||||
(re-frame/reg-event-fx
|
||||
:wakuv2.ui/save-all-confirmed
|
||||
(fn [{:keys [db] :as cofx}]
|
||||
...))
|
||||
|
||||
;; good
|
||||
(re-frame/reg-event-fx :communities/invite-people-pressed
|
||||
(fn [{:keys [db]} [id]]
|
||||
{:db (assoc db :communities/community-id-input id)
|
||||
:fx [[:dispatch [:hide-bottom-sheet]]
|
||||
[:dispatch [:open-modal :invite-people-community {:invite? true}]]]}))
|
||||
(fx/defn save-all
|
||||
{:events [:wakuv2.ui/save-all-confirmed]}
|
||||
[{:keys [db] :as cofx}]
|
||||
...)
|
||||
```
|
||||
|
||||
### Registering top-level re-frame subscriptions
|
||||
@@ -528,27 +299,27 @@ due to performance constraints.
|
||||
(:preferred-name multiaccount)))
|
||||
```
|
||||
|
||||
### Requiring quo components
|
||||
### Requiring quo2 components
|
||||
|
||||
Consume `quo` components from `quo.core`, unless the namespace is also inside
|
||||
the `quo/` directory.
|
||||
Consume `quo2` components from `quo2.core`, unless the namespace is also inside
|
||||
the `quo2/` directory.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(ns my-namespace
|
||||
(:require [quo.components.icon :as icon]))
|
||||
(:require [quo2.components.icon :as icon]))
|
||||
|
||||
(icon/icon :i/verified)
|
||||
|
||||
;; good
|
||||
(ns my-namespace
|
||||
(:require [quo.core :as quo]))
|
||||
(:require [quo2.core :as quo2]))
|
||||
|
||||
(quo/icon :i/verified)
|
||||
(quo2/icon :i/verified)
|
||||
|
||||
;; also good because both namespaces are inside quo/
|
||||
(ns quo.components.tabs.account-selector
|
||||
(:require [quo.components.markdown.text :as text]))
|
||||
;; also good because both namespaces are inside quo2/
|
||||
(ns quo2.components.tabs.account-selector
|
||||
(:require [quo2.components.markdown.text :as text]))
|
||||
```
|
||||
|
||||
### Require/import
|
||||
@@ -611,16 +382,17 @@ indices.
|
||||
|
||||
### Icons
|
||||
|
||||
Use the appropriate keyword qualification/namespace.
|
||||
Use the appropriate keyword qualification/namespace and don't directly require
|
||||
namespaces inside `quo2/components/`.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(require '[quo.components.icon :as icons])
|
||||
(require '[quo2.components.icon :as icons])
|
||||
(icons/icon :main-icons2/verified)
|
||||
|
||||
;; good
|
||||
(require '[quo.core :as quo])
|
||||
(quo/icon :i/verified)
|
||||
(require '[quo2.core :as quo2])
|
||||
(quo2/icon :i/verified)
|
||||
```
|
||||
|
||||
### Translations
|
||||
@@ -641,26 +413,6 @@ keywords and concatenating them into a single string.
|
||||
```
|
||||
|
||||
### Tests
|
||||
#### Prefer `match?` over `=` when comparing data structures
|
||||
|
||||
Prefer the `match?` directive over `=` when comparing data structures, otherwise
|
||||
when the check fails the output can be too difficult to read. `match?` is
|
||||
defined by library https://github.com/nubank/matcher-combinators.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(deftest some-test
|
||||
(let [expected {...}
|
||||
actual {...}]
|
||||
(is (= expected actual))))
|
||||
|
||||
;; good
|
||||
(deftest some-test
|
||||
(let [expected {...}
|
||||
actual {...}]
|
||||
(is (match? expected actual))))
|
||||
```
|
||||
|
||||
#### Subscription tests
|
||||
|
||||
Test [layer-3 subscriptions](https://day8.github.io/re-frame/subscriptions/) by
|
||||
@@ -715,7 +467,7 @@ First, the bird's-eye view with some example ClojureScript files:
|
||||
src
|
||||
├── js/
|
||||
├── mocks/
|
||||
├── quo
|
||||
├── quo2
|
||||
│ ├── components/
|
||||
│ ├── foundations/
|
||||
│ └── theme.cljs
|
||||
@@ -736,7 +488,7 @@ src
|
||||
|
||||
- `src/js`: Raw Javascript files, e.g. React Native Reanimated worklets.
|
||||
- `src/mocks`: Plumbing configuration to be able to run tests.
|
||||
- `src/quo/`: The component library for Status Mobile. [Read more...](../src/quo/README.md)
|
||||
- `src/quo2/`: The component library for Status Mobile.
|
||||
- `src/react_native/`: Contains only low-level constructs to help React Native
|
||||
work in tandem with Clojure(Script).
|
||||
- `src/status_im2/`: Directory where we try to be as strict as possible about
|
||||
@@ -748,7 +500,7 @@ src
|
||||
of the directory tree. Just like directories named `utils`, their directory
|
||||
nesting level communicates their applicable limits.
|
||||
- `src/status_im2/common/components/`: Contains reusable components that are not
|
||||
part of the design system (quo).
|
||||
part of the design system (quo2).
|
||||
- `src/status_im2/contexts/`: Contains [bounded contexts](#glossary), like
|
||||
`browser/`, `messaging/`, etc. As much as possible, _bounded contexts_ should
|
||||
not directly require each other's namespaces.
|
||||
@@ -763,9 +515,9 @@ directory nesting level precisely indicates its boundaries. For example, a
|
||||
`contexts/user_settings/utils/datetime.cljs` file communicates that it should
|
||||
only be used in the `user_settings` context.
|
||||
|
||||
### src/quo
|
||||
### src/quo2
|
||||
|
||||
The `src/quo/` directory holds all components for the new design system. As
|
||||
The `src/quo2/` directory holds all components for the new design system. As
|
||||
much as possible, its sub-directories and component names should reflect the
|
||||
same language used by designers.
|
||||
|
||||
@@ -773,14 +525,14 @@ Even though the directory lives alongside the rest of the codebase, we should
|
||||
think of it as an external entity that abstracts away particular Status domain
|
||||
knowledge.
|
||||
|
||||
Components inside `src/quo/` should not rely on re-frame, i.e. they should not
|
||||
Components inside `src/quo2/` should not rely on re-frame, i.e. they should not
|
||||
dispatch events or use subscriptions.
|
||||
|
||||
Example structure:
|
||||
|
||||
```
|
||||
src
|
||||
└── quo
|
||||
└── quo2
|
||||
├── components
|
||||
│ └── dropdown
|
||||
│ ├── style.cljs
|
||||
@@ -811,28 +563,6 @@ src
|
||||
└── view.cljs
|
||||
```
|
||||
|
||||
## Deprecation process
|
||||
|
||||
To deprecate a var, add the `:deprecated` metadata and, if necessary, suggest an
|
||||
alternative.
|
||||
|
||||
```clojure
|
||||
;; Good if there's no better alternative yet, but we want to deprecate it anyway.
|
||||
(defn ^:deprecated foo
|
||||
[]
|
||||
(bar))
|
||||
|
||||
;; Good
|
||||
(defn foo
|
||||
{:deprecated "Use some.namespace/var-name instead."}
|
||||
[]
|
||||
(bar))
|
||||
```
|
||||
|
||||
Please check the [Clojure Style](https://guide.clojure.style/#deprecated) documentation
|
||||
|
||||
To reduce visual clutter from deprecated methods in your text editor, consult this [example](https://rider-support.jetbrains.com/hc/en-us/community/posts/4419728641810-How-to-disable-the-the-strike-thru-for-deprecated-methods-in-Javascript-#:~:text=Try%20disabling%20%22Preferences%20%7C%20Editor%20%7C,It%20works%20for%20me). The approach can be adapted for settings in VSCode, Emacs, VIM, and others.
|
||||
|
||||
### Test structure
|
||||
|
||||
[Unit tests](#glossary) should be created alongside their respective source
|
||||
@@ -847,9 +577,9 @@ Clojure (JVM) codebases which mirror the sources in a top-level test directory.
|
||||
└── models_test.cljs
|
||||
```
|
||||
|
||||
Component tests should be created in the same directory as the source component,
|
||||
and named as `component_spec.cljs`.
|
||||
|
||||
Component tests should be created in a separate directory `__tests__`, colocated
|
||||
with the source. When the entire component implementation is isolated under a
|
||||
single directory, create a test file named `component_spec.cljs` instead.
|
||||
|
||||
```
|
||||
└── filter
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# Patching
|
||||
|
||||
## Libraries
|
||||
If 3rd party library has an issue and fix is not yet released (or we can't switch to a new release), we use forks. Fix should be committed to the fork, tagged and referenced from package.json.
|
||||
|
||||
Example: [`react-native-hole-view`](https://github.com/status-im/react-native-hole-view#refs/tags/v2.1.1-status)
|
||||
|
||||
## React Native
|
||||
When patch need to be applied to React Native itself Status does patching with Nix instead of doing it nodejs-way.
|
||||
|
||||
Patches should be added to [this file](https://github.com/status-im/status-mobile/blob/develop/nix/deps/nodejs-patched/default.nix).
|
||||
|
||||
Example: [patching `react-native/Yoga` to build app with XCode 14.3](https://github.com/status-im/status-mobile/pull/15589)
|
||||
@@ -1,6 +1,6 @@
|
||||
# Pipeline process
|
||||
|
||||
[Pipeline for QA](https://github.com/status-im/status-mobile/projects/7) is a project board for developers and testers used to track the status of a pull request, get reviews and manual testing, and run autotests.
|
||||
[Pipeline for QA](https://github.com/status-im/status-mobile/projects/7) is a project board for developers and testers used to track the status of a pull request, get reviews and manual testing, _and run autotests_ (_temporary disabled_).
|
||||
|
||||
The generally accepted recommendations for its use are described below:
|
||||
|
||||
@@ -30,7 +30,7 @@ Ready for testing PR should meet the following criteria:
|
||||
3. Wait for the review.
|
||||
4. Make sure that after review and before requesting manual QA your PR is rebased to current develop.
|
||||
5. Once the PR has been approved by reviewer(s) - label `request-manual-qa` should be applied to the PR
|
||||
6. Move PR to the E2E column when it is ready for testing (**mandatory for all PRs**). That will also trigger e2e tests run. QAs are monitoring PRs from E2E column and take it into test.
|
||||
6. Move PR to the E2E column when it is ready for testing. That will also trigger e2e tests run. QAs are monitoring PRs from E2E column and take it into test.
|
||||
|
||||
After that - PR will be taken into manual testing by the QA team.
|
||||
|
||||
@@ -41,50 +41,38 @@ After that - PR will be taken into manual testing by the QA team.
|
||||
- QA engineer picks up one of PRs with the ```request-manual-qa``` label, drags the item to the ```IN TESTING``` column and assigns it to themselves.
|
||||
- During testing, QA will add comments describing the issues found, and also review automation tests results.
|
||||
Usually found issues are numbered as "Issue 1, Issue 2", etc.
|
||||
When the first round of testing is completed and all issues for this stage are found, the QA can add the ```Tested - Issues``` label and drag the card to the ```CONTRIBUTOR``` column. These two actions are optional.
|
||||
- When manual testing of the PR is fully completed and all the issues are fixed, the QA adds the ```Tested - OK``` label and drags the card to the ```Design review``` column (the cases when design review is necessary are described below).
|
||||
- If design review is not required, the QA drags the PR to the ```MERGE``` column. After that the developer merges PR into develop.
|
||||
- If design review has been done, the designer (```@Francesca-G```) drags the PR to the ```MERGE``` column.
|
||||
After that the developer merges PR into develop.
|
||||
- If manual testing/design review was not carried out, the developer drags PR to the ```MERGE``` column themselves.
|
||||
|
||||
### Design review
|
||||
_**How do I know if a design review is needed?**_
|
||||
|
||||
There are three cases here depending on the changes in the PR:
|
||||
1. **Functional PRs with UI changes:** after the ```Tested - OK``` label is added, the QA moves the PR to the ```Design review``` column + mentions ```@Francesca-G``` in comments.
|
||||
2. **Component PRs:** once the PR has received a review from developers and e2e tests results, it can be moved directly to the ```Design review``` column by the developer (manual testing step can be skipped) + the developer mentions ```@Francesca-G``` in comments.
|
||||
3. **Functional PRs changes in which are not related to UI (e.g. a crash fix):** skip the ```Design review``` step (the PR should only be manually tested by QA).
|
||||
|
||||
There are three possible scenarios when the design review is completed:
|
||||
1. **Approved by design** > the PR is moved to the ```MERGE``` column by Francesca
|
||||
2. **Some changes requested, but can be fixed as followups** > need to be negotiated with Francesca > Francesca moves PR to the ```MERGE``` column and adds the ```Follow-up required``` label > follow-ups should be added **by the dev** right after the PR is merged
|
||||
3. **Some changes requested, they should be fixed before merge** > Francesca reviews the PR again after the fixes and moves PR to the ```MERGE``` column from ```Design review```
|
||||
|
||||
---
|
||||
**Notes:**
|
||||
- If your PR has a long story and started from `develop` branch several days ago, please rebase it to current develop before adding label
|
||||
- if PR can be tested by developer (in case of small changes) and/or developer is sure that the changes made cannot introduce a regression, then PR can be merged without manual testing. Also, currently, PRs are not manually tested if the changes relate only the design (creation of components, etc.) and do not affect the functionality.
|
||||
---
|
||||
When the first round of testing is completed and all issues for this stage are found, tester can add the ```Tested - Issues``` label and drag the card to the ```CONTRIBUTOR``` column. These two actions are optional.
|
||||
- When manual testing of PR is fully completed and all issues are fixed, QA adds the ```Tested - OK``` label and drags the card to the ```MERGE``` column, after which developer merges PR into develop.
|
||||
If manual testing was not carried out, developer drags PR to the ```MERGE``` column themselves.
|
||||
|
||||
**Notes:**
|
||||
- If your PR has a long story and started from `develop` branch several days ago, please rebase it to current develop before adding label
|
||||
- if PR can be tested by developer (in case of small changes) and/or developer is sure that the changes made cannot introduce a regression, then PR can be merged without manual testing. Also, currently, PRs are not manually tested if the changes relate only the design (creation of components, etc.) and do not affect the functionality.
|
||||
|
||||
#### Why my PR is in `Contributor` column?
|
||||
PR can be moved to this column by the ```status-github-bot``` or by QA engineer with label `Tested-issues`.
|
||||
In the first case most often this happens due to conflicting files in PR.
|
||||
In the second case - after fixing of all found issues, the developer should ping the QA in the PR comments for retesting.
|
||||
|
||||
|
||||
#### Why is my PR in `To Rebase` column?
|
||||
PR is moved to the "To Rebase" column in two cases:
|
||||
- automatically by github bot if PR branch has conflicts that should be resolved
|
||||
- manually (by QAs) if PR branch is out-of-date with the base branch and requires rebasing to the latest develop
|
||||
|
||||
If PR appeared in the "To Rebase" column dev who is working on the PR should resolve conflicts/rebase branch to the latest develop. After resolving conflicts/rebasing PR should be moved by developer to the right column depending on PR work progress.
|
||||
|
||||
## Merging a PR
|
||||
**Merge conditions:**
|
||||
1. Required number of reviews received
|
||||
2. E2E results are received and reviewed
|
||||
3. All commits are squashed into one.
|
||||
4. No conflicting files in PR
|
||||
5. No issues from lint
|
||||
6. Pay attention to automation checks (some of them are not blockers, best to check before merge anyway)
|
||||
2. All commits are squashed into one.
|
||||
3. No conflicting files in PR
|
||||
4. No issues from lint
|
||||
5. Pay attention to automation checks (some of them are not blockers, best to check before merge anyway)
|
||||

|
||||
|
||||
|
||||
6. In case of manual testing - the label ```Tested - OK``` from QA
|
||||
7. In case of design review - the approval from the designer
|
||||
|
||||
|
||||
You can merge your PR into develop - some useful clues you can find [here](https://notes.status.im/setup-e2e#3-Merging-PR)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Pixel Perfection
|
||||
The Status Mobile team aims to align the design implementation perfectly according to a given screens respective Figma design spec.
|
||||
|
||||
Currently, the Figma Designs match up with both "iPhone 11 Pro" and "iPhone 13" screen size.
|
||||
|
||||
The Dimension reference for iPhone 11 Pro is 375 x 812 (width x height) and for iPhone 13 is 390 x 844.
|
||||
|
||||
To test your implementation is correct you can take the following steps
|
||||
|
||||
- Open a new Figma file so that you have write privileges.
|
||||
|
||||
- Copy in the component or screen from the Figma file.
|
||||
|
||||
- Using the "iPhone 11 Pro" or the "iPhone 13" simulator (it is the default now) you take a screenshot of your component and paste it into your Figma file.
|
||||
|
||||
- To get the right size, set your screenshot to width according to your simulator:
|
||||
- for iPhone 13 set 390
|
||||
- for iPhone 11 Pro set 375
|
||||
|
||||
|
||||

|
||||
|
||||
- Lower the opacity so you can see it sitting on top of the Figma mock ups.
|
||||
@@ -13,7 +13,7 @@ QA process was focused on account creation and login with keycard, and this bug
|
||||
|
||||
## Resolution process
|
||||
|
||||
- the commit was reverted locally by the developer which fixed the issue locally and confirmed the faulty commit
|
||||
- the commit was reverted locally by the developer which fixed the issue localy and confirmed the faulty commit
|
||||
- the bug was only reproducible on iOS which strongly hinted at a potential issue with native code
|
||||
- the missing method was not the origin of the problem but was found at this point and further analysis lead to the shadowing error
|
||||
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
## Pull Request Review Policy
|
||||
|
||||
This document details the pull request policy of the Status Mobile repository / team.
|
||||
|
||||
- [Terms](#terms)
|
||||
- [Policy](#policy)
|
||||
- [Overview](#overview)
|
||||
- [Full Policy](#fully-policy)
|
||||
- [Rationale](#rationale)
|
||||
- [Front pressure and Demand control](#front-pressure-and-demand-control)
|
||||
- [Back pressure and Supply control](#back-pressure-and-supply-control)
|
||||
- [Honour System](#honour-system)
|
||||
- [Review Support](#review-support)
|
||||
- [Background](#background)
|
||||
|
||||
### Terms:
|
||||
|
||||
| Term | Definition |
|
||||
|----------------------|---------------------------------------------------------------------------------------------------------------|
|
||||
| **Requester** | The team member submitting a pull request. |
|
||||
| **Reviewer** | A team member asked by a requester to review the requester’s pull request. |
|
||||
| **Review bandwidth** | The number of reviews a team member has self-limited themselves to giving within their defined review period. |
|
||||
| **Review period** | The period of time over which a reviewer’s bandwidth is consumed |
|
||||
|
||||
### Policy:
|
||||
|
||||
#### Overview
|
||||
|
||||
- 🔀 - You are responsible for getting your PR reviewed and approved.
|
||||
- ✅ - You must give a review on a PR if you are asked to do so, unless your review limit has been reached.
|
||||
- ✨ - The honour system underpins this policy, without acting in good faith it will not work.
|
||||
|
||||
#### Fully policy
|
||||
|
||||
1) The requester has the responsibility for getting a PR reviewed and approved.
|
||||
1) The requester has the right and responsibility to pursue code reviews.
|
||||
2) The requester has the right and responsibility to make multiple requests of the same reviewer.
|
||||
3) The requester will select a limited number of reviewers to review any of the requester’s PRs.
|
||||
2) Reviewers are obligated to give a review for all PRs they are requested to review, except when their review bandwidth has been exhausted:
|
||||
1) Reviewers have the right to refuse a requester a review if the reviewer’s review bandwidth has been exhausted.
|
||||
2) Reviewers are expected to manage and track their review bandwidth.
|
||||
3) Reviewers can manage their review bandwidth via any means they feel works best for them. Examples include:
|
||||
1) Using the GitHub busy feature
|
||||
2) Declining a review on the PR
|
||||
3) Declining a review when pursued by a code reviewer
|
||||
4) Proactively declining to review a PR
|
||||
3) All team members will set a review bandwidth that is reasonable.
|
||||
4) All team members acknowledge that giving reviews is a requirement of membership of the team.
|
||||
5) All team members will manage their review bandwidth honestly.
|
||||
1) The right to refuse a PR review is only eligible if a reviewer’s review bandwidth has actually been exhausted.
|
||||
2) Breaching the team’s honour is very bad form. Do not do it (please).
|
||||
6) All team members acknowledge that without acting with honesty this review process will not work and jeopardises their own future ability to receive reviews.
|
||||
|
||||
### Rationale
|
||||
|
||||
#### Front pressure and Demand control
|
||||
|
||||
Foremost in the rationale for the above policy is that giving a PR review is a requirement. If a requester requests
|
||||
a PR review of a team member, the reviewer is now obligated to review the PR within a reasonable timeframe.
|
||||
|
||||
This principle enforces that there is a pressure and demand that PR reviews must be given.
|
||||
|
||||
#### Back pressure and Supply control
|
||||
|
||||
Front pressure alone is not enough to balance the PR review load across the team. Because of this an exception is granted
|
||||
to reviewers that have exhausted their review bandwidth, the exemption permits these reviewers to refuse a PR review.
|
||||
|
||||
This principle gives the reviewer pool back-pressure, relieving the exhausted reviewer and increasing pressure / demand on
|
||||
the other reviewers.
|
||||
|
||||
#### Honour system
|
||||
|
||||
The two principles of demand and supply control are underpinned by an honour system and are useless without honest action.
|
||||
If a team member does not honestly manage their review bandwidth this action seriously damages the collective balance of
|
||||
PR review load. Because of this potential damage a breach of the honour system is considered a deeply shameful act.
|
||||
|
||||
The honour system is the mechanism of control and enforcement, without it the policy would need to be controlled and enforced
|
||||
using less dynamic and forgiving mechanisms. An example is a GitHub review counting tools with quotas and metrics. So just
|
||||
be cool.
|
||||
|
||||
### Review Support
|
||||
|
||||
Sometimes reviewing is time-consuming or generally painful, to help make reviews as simple as possible consider the following suggestions:
|
||||
- Paired reviews: Ask an experienced reviewer to review with you.
|
||||
- If a PR is the product of multiple developers only ask 1 or 2 other developers for their review.
|
||||
|
||||
### Background
|
||||
|
||||
The contents of this policy document is the product of 2 councils of the Status Mobile team, the below documents summarise the topics and outcomes of the councils:
|
||||
|
||||
- [2023-05-15 - Council of Deadwater](https://docs.google.com/document/d/1TtUZCke2OzumjdWGu6TIECHEOUPwvaLrvQ8Re2nEGCo)
|
||||
- [2023-06-13 - Mauve Council of Deadwater](https://docs.google.com/document/d/19hfr8xXrShLk9ROdQfOwb9_vwbTah9nOCqKSLIrgoSI)
|
||||
|
||||
The aims of the council were to allow developers that are relied on heavily for reviews to better balance their time
|
||||
between reviews and other responsibilities. Equally, the council aimed to give other team members better opportunity and
|
||||
understanding that giving PR reviews is a requirement and will help the team generally if more review burden is shared.
|
||||
@@ -4,7 +4,7 @@ This document provides information on how to start developing Status App.
|
||||
|
||||
# Getting Started
|
||||
|
||||
To start developing start a shell for the platform you are interested in.
|
||||
To start developing start a shell for platform you are interested in.
|
||||
```
|
||||
make shell TARGET=android
|
||||
```
|
||||
@@ -28,34 +28,15 @@ You need to have an emulator like [AVD](https://developer.android.com/studio/run
|
||||
|
||||
### iOS
|
||||
|
||||
#### Running on a simulator
|
||||
|
||||
We highly recommend using either the `iPhone 11 Pro` or `iPhone 13` simulator as its screen dimensions match with our design.
|
||||
|
||||
If you have Xcode `v12.x` (and above) installed in your system, you need to follow the below steps to add `iPhone 13` simulator:
|
||||
|
||||
1. Open Xcode
|
||||
2. Menu `>` Window `>` Devices and Simulators
|
||||
3. Tap `+` button on bottom left
|
||||
4. Select **Device Type** as `iPhone 13`
|
||||
5. Leave the **Simulator Name** empty and tap on **Create**
|
||||
|
||||
##### NOTE ⚠️
|
||||
|
||||
Running `make run-ios` will target `iPhone 13` by default.
|
||||
|
||||
If you need to run on any other simulator, you can specify the simulator type by adding the `SIMULATOR` flag:
|
||||
You can specify the simulator type by adding the `SIMULATOR` flag:
|
||||
```sh
|
||||
make run-ios SIMULATOR="iPhone 13"
|
||||
make run-ios SIMULATOR="iPhone 11 Pro"
|
||||
```
|
||||
|
||||
#### Running on a physical device
|
||||
|
||||
Some manual steps are necessary for [developing on a physical iOS Device](#physical-ios-device).
|
||||
Some manual steps are necesary for [developing on a physical iOS Device](#physical-ios-device).
|
||||
|
||||
# Build release
|
||||
|
||||
To build the app, you can simply run on of the following:
|
||||
To build the app, your can simply run on of the following:
|
||||
```
|
||||
make release-android
|
||||
make release-ios
|
||||
@@ -88,9 +69,9 @@ https://facebook.github.io/react-native/docs/getting-started.html
|
||||
|
||||
## Configure GitHub Account
|
||||
|
||||
The optimal way of pushing to GitHub is using SSH instead of user/pass auth.
|
||||
The optimal way of pushing to GitHubis using SSH instead of user/pass auth.
|
||||
|
||||
It's recommended that you [add your public SSH key to your GitHub account](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).
|
||||
It's recommented that you [add your public SSH key to your GitHub account](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).
|
||||
|
||||
## Configure GPG Keys for signing commits
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# How to make changes to status-go
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
To make changes to status-go, the best approach is to first identify the issue/feature and the changes to be made directly in status-go.
|
||||
For any bugs we want to most likely write a failing test in status-go, and make sure that it passes, before we test on mobile.
|
||||
|
||||
Once you are quite confident that the status-go code is ready to be tested on mobile, you can test it locally by running the following command:
|
||||
|
||||
```
|
||||
env STATUS_GO_SRC_OVERRIDE={your-status-go-directory} make run-{android/ios}
|
||||
```
|
||||
|
||||
This will recompile status-go and run status-mobile on your device with that updated status-go version.
|
||||
|
||||
Once you have tested the status-go changes locally and you think it's ready for a PR:
|
||||
|
||||
1) Create a PR in status-go
|
||||
|
||||
2) Point your local status-mobile branch to that PR by running the script:
|
||||
|
||||
```
|
||||
scripts/update-status-go.sh {status-go-branch-name}
|
||||
```
|
||||
|
||||
This will update `status-go-version.json`
|
||||
|
||||
Commit updated status-go-version.json and create a status-mobile PR
|
||||
|
||||
Once both PRs have been approved and are good to merge, you can follow the [merge guidelines](./merging-pr-process.md)
|
||||
@@ -182,6 +182,17 @@ def build_ios_e2e
|
||||
)
|
||||
end
|
||||
|
||||
def upload_to_diawi(source)
|
||||
diawi(
|
||||
file: source,
|
||||
timeout: 120,
|
||||
check_status_delay: 5,
|
||||
token: ENV['DIAWI_TOKEN']
|
||||
)
|
||||
# save the URL to a file for use in CI
|
||||
File.write('diawi.out', lane_context[SharedValues::UPLOADED_FILE_LINK_TO_DIAWI])
|
||||
end
|
||||
|
||||
platform :ios do
|
||||
desc '`fastlane ios adhoc` - ad-hoc lane for iOS.'
|
||||
desc 'This lane is used for PRs, Releases, etc.'
|
||||
@@ -245,6 +256,27 @@ platform :ios do
|
||||
)
|
||||
end
|
||||
|
||||
desc '`fastlane ios clean` - remove inactive TestFlight users'
|
||||
lane :clean do
|
||||
clean_testflight_testers(
|
||||
username: ENV['FASTLANE_APPLE_ID'],
|
||||
days_of_inactivity: 30
|
||||
)
|
||||
# In the future we can try using 'oldest_build_allowed'
|
||||
end
|
||||
|
||||
desc '`fastlane ios upload-diawi` - upload .ipa to diawi'
|
||||
desc 'expects to have an .ipa prepared: `status-ios/StatusIm.ipa`'
|
||||
desc 'expects to have a diawi token as DIAWI_TOKEN env variable'
|
||||
desc 'expects to have a github token as GITHUB_TOKEN env variable'
|
||||
desc "will fails if file isn't there"
|
||||
desc '---'
|
||||
desc 'Output: writes `fastlane/diawi.out` file url of the uploded file'
|
||||
lane :upload_diawi do
|
||||
ipa = ENV['DIAWI_IPA'] || 'status-ios/StatusIm.ipa'
|
||||
upload_to_diawi(ipa)
|
||||
end
|
||||
|
||||
desc '`fastlane ios saucelabs` - upload .app to sauce labs'
|
||||
desc 'also notifies in a GitHub comments'
|
||||
desc 'expects to have an .apk prepared: `result/app.apk`'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'fastlane', '>= 2.131.0'
|
||||
|
||||
plugins_path = ENV['FASTLANE_PLUGINFILE_PATH'] ||
|
||||
File.join(__dir__, 'Pluginfile')
|
||||
eval_gemfile(plugins_path) if plugins_path
|
||||
|
||||
@@ -3,21 +3,21 @@ GEM
|
||||
specs:
|
||||
CFPropertyList (3.0.6)
|
||||
rexml
|
||||
addressable (2.8.4)
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
artifactory (3.0.15)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.768.0)
|
||||
aws-sdk-core (3.173.0)
|
||||
aws-partitions (1.728.0)
|
||||
aws-sdk-core (3.170.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.64.0)
|
||||
aws-sdk-kms (1.63.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.122.0)
|
||||
aws-sdk-s3 (1.119.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
@@ -65,8 +65,8 @@ GEM
|
||||
faraday-retry (1.0.3)
|
||||
faraday_middleware (1.2.0)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.2.7)
|
||||
fastlane (2.212.2)
|
||||
fastimage (2.2.6)
|
||||
fastlane (2.212.1)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
@@ -105,8 +105,11 @@ GEM
|
||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
xcpretty-travis-formatter (>= 0.0.3)
|
||||
fastlane-plugin-clean_testflight_testers (0.3.0)
|
||||
fastlane-plugin-diawi (2.1.0)
|
||||
rest-client (>= 2.0.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.42.0)
|
||||
google-apis-androidpublisher_v3 (0.36.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
@@ -137,7 +140,7 @@ GEM
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (1.5.2)
|
||||
googleauth (1.3.0)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
@@ -145,6 +148,7 @@ GEM
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (>= 0.16, < 2.a)
|
||||
highline (2.0.3)
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
@@ -152,12 +156,16 @@ GEM
|
||||
json (2.6.3)
|
||||
jwt (2.7.0)
|
||||
memoist (0.16.2)
|
||||
mime-types (3.4.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2023.0218.1)
|
||||
mini_magick (4.12.0)
|
||||
mini_mime (1.1.2)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.0.0)
|
||||
nanaimo (0.3.0)
|
||||
naturally (2.2.1)
|
||||
netrc (0.11.0)
|
||||
optparse (0.1.1)
|
||||
os (1.1.4)
|
||||
plist (3.7.0)
|
||||
@@ -167,6 +175,11 @@ GEM
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
rest-client (2.1.0)
|
||||
http-accept (>= 1.7.0, < 2.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
retriable (3.1.2)
|
||||
rexml (3.2.5)
|
||||
rouge (2.0.7)
|
||||
@@ -213,6 +226,8 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
fastlane (>= 2.131.0)
|
||||
fastlane-plugin-clean_testflight_testers
|
||||
fastlane-plugin-diawi
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.9
|
||||
2.4.6
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-clean_testflight_testers'
|
||||
gem 'fastlane-plugin-diawi'
|
||||