Commit Graph

5747 Commits

Author SHA1 Message Date
Parvesh Monu fc591f303c
fix unable to open add-new-contact screen if hardware button is pressed while qr scanner is open (#18296) 2024-01-03 18:24:58 +05:30
Omar Basem f2c69ab9a8
Wallet: crypto max decimals (#18267)
* wallet: crypto max decimals
2024-01-03 15:48:04 +04:00
Omar Basem 006b637b1b
Quo: quiz item (#18306)
* Quo: quiz item
2024-01-03 15:36:17 +04:00
Jamie Caprani f016a9c33c
chore: clean up contexts folder to only include larger feature sets (#18286) 2024-01-03 02:25:49 -08:00
Omar Basem 1ce76a4af6
Wallet: network preferences text description (#18319)
Wallet: network preferences text description
2024-01-02 13:45:21 +04:00
Alexander 4a9ca80bc2
Share screen design review (#18148)
* Share screen design review

* Small update

* Update

* Style fix
2024-01-02 10:23:38 +01:00
Ibrahem Khalil e392608697
Fix no message preview on long press on the reaction (#18292) 2023-12-30 11:25:01 +02:00
Parvesh Monu 7af62c04eb
Keep chat screen loaded (#17839) 2023-12-29 14:55:12 +05:30
Ulises Manuel 107d1a80c9
Fix token images not being displayed (#18288)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-27 12:43:47 -03:00
Omar Basem 01e8c7e480
Wallet: about tab fixes (#18298)
* wallet: about tab fixes
2023-12-27 19:14:09 +04:00
Ajay Sivan bec51b7d0e
Add :wallet/accounts-with-customization-color subscription (#18302) 2023-12-26 08:12:20 -08:00
Icaro Motta 0b4a1545ae
Fix component tests, upgrade Jest & friends, and a few other goodies (#18276)
Fix all component tests after the latest RN upgrade.

Fixes https://github.com/status-im/status-mobile/issues/18157
Closes https://github.com/status-im/status-mobile/pull/18235

Dependency changes

- Upgraded Jest: from 26.6.3 to latest 29.7.0.
- Upgraded @testing-library/jest-native: from 5.3.0 to latest 5.4.3
- Upgraded @testing-library/react-native: from 11.5.4 to 12.4.2
- Removed explicit dependency on jest-circus, this is now the default test
  runner.
- Removed explicit dependency on jest-environment-node. This is handled by the
  package manager.
- Added jest-silent-reporter at version 0.5.0.

### Why component tests were failing?

Many tests were failing because we were using RN Testing Library (RNTL) in an
unreliable fashion. With the recent library upgrades, the unreliability was
excerbated. Other times, the tests were incorrectly arranging data.

### with-redefs does not work with async code

Generally speaking, with-redefs should not be used with async code, assume the
worst. The scope of the macro will cease to exist by the time the async code
runs. In many tests we were using with-redefs, then calling render, but for some
components that use use-effect, JS timers, animations, etc it's unreliable and
were the reason for failures.

It's easy to reproduce too:

```clojure
(defn foo []
  :foo)

(foo)
;; => :foo

(with-redefs [foo (constantly :bar)]
  (foo))
;; => :bar

(js/setTimeout
 (fn []
   (tap> [:calling-foo (foo)]))
 100)
;; Taps [:calling-foo :foo]
;; As you would expect, when running without with-redefs, it prints :foo.

;; So far so good, but whatch what happens with async code:

(with-redefs [foo (constantly :bar)]
  (js/setTimeout
   (fn []
     (tap> [:calling-foo (foo)]))
   100))
;; Taps [:calling-foo :foo]
;; ====> PROBLEM: Taps :foo, not :bar as one might expect
```

### Not waiting on wait-for

When test-helpers.component/wait-for is used, subsequent assertions/etc should
be done after the promise returned by wait-for is resolved. But remember to not
perform side-effects inside the wait-for callback (check out the docs
https://callstack.github.io/react-native-testing-library/docs/api#waitfor).
Most, if not all of our usages of wait-for were not waiting.

#### Improvement 1 - Silence Jest on demand

If you need to re-run component tests frequently, you may want to reduce the
output verbosity. By passing JEST_USE_SILENT_REPORTER=true to make
component-test or make component-test-watch you will see a lot less noise and be
able to focus on what really matters to you.

#### Improvement 2 - Selectively focus/disable tests

Because of our need to first compile CLJS to JS before running tests via Jest,
we couldn't easily skip or focus on specific tests. From this commit onwards, we
should never again have to change the list of requires in files core_spec.cljs.
Commenting out required namespaces gives a bad DX because it causes constant
rebasing issues.

#### Improvement 3 - Translations now work as in prod code (but only English)

Translations performed by *-by-translation-text can be done now without any
workaround under the hood. The query functions are now linted just like
i18n/label, which means static translation keywords must be qualified with :t/,
which is good for consistency.
2023-12-26 11:58:23 -03:00
flexsurfer 31acb8e9c4
improve profile screen performance (#18281) 2023-12-22 16:59:12 +01:00
Jamie Caprani eda8c0ccb0
fix(quo): truncation on wallet account card long name (#18259)
---------

Co-authored-by: Paul Fitzgerald <paulfitz99@gmail.com>
2023-12-22 15:48:57 +00:00
codemaster 7915ba85ab
fix: theming toast component (#17918) 2023-12-23 01:29:50 +10:00
Omar Basem 5eb0baa64d
Wallet: best route UI (#18266)
* Wallet: best route UI
2023-12-22 09:40:43 +04:00
yqrashawn a4dc268bc3
feat: spectate community before join (#18070) 2023-12-22 10:21:10 +08:00
Ulises Manuel 5fa9c0cab6
[#17964] emoji screen performance (#18213)
* Fix `->` style in emoji-picker.data

* Make `temp-empty-symbol` component code safer to avoid app crashing

* fix `->` style in `emoji-picker.utils`

* Pass sheet-animating? ratom to bottom-sheet's content component

* Improve emoji picker performance
2023-12-21 15:44:33 -06:00
Omar Basem 4f9544d20c
Wallet: receive screen (#18167)
* wallet: receive screen
2023-12-21 22:07:27 +04:00
flexsurfer ad8d537b9c
move status-im from utils (#18249) 2023-12-21 18:16:59 +01:00
Jamie Caprani 4c3d1667ca
chore: add outline for transacation-progress page (#18217) 2023-12-21 15:37:18 +00:00
Flavio Fraschetti e59e34d0da
Communities: Present the list of airdrop addresses (#18189)
Co-authored-by: Flavio Fraschetti <frasqueti@gmail.com>
Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
2023-12-21 01:27:59 -08:00
Mohamed Javid 60dfd6ce78
Added assets skeleton in wallet home and account screen (#18197)
This commit:

- Updates the "skeleton-list" component to support the "assets" type
- Adds the assets skeleton to the assets tab in the wallet home and account screen

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-21 13:28:52 +05:30
Ajay Sivan 4ca533a534
Move disabled component tests outside of require block to fix lint messup (#18265) 2023-12-20 22:18:59 -08:00
Ulises Manuel 7cf31651b3
[#18083] Implement Page top component (#18163)
* Add container style and fix `:auto-complete` parameter in address-input

* Add container style to recovery-phrase input

* Add container style and accessibility-label to search-input

* Add page-top component and tests

* Add page top preview
2023-12-20 13:17:39 -06:00
Ajay Sivan 04184b41e5
Wallet/Account Permissions Quo Component (#18224) 2023-12-20 07:54:13 -08:00
Lungu Cristian d0e624afd7
Biometrics button on login screen (#18106)
* feat: login with biometry when switching accounts

* feat: biometry button on login screen

* fix: addressed review comments

* fix: biometry button background

* ref: moved biometrics constants to main constants file

* fix: hide biometric button when not enabled

* feat: standard_auth blur prop

* fix: leftover rename
2023-12-20 17:15:51 +02:00
Volodymyr Kozieiev bf55a2a974
Activity tab on collectible page (#18220) 2023-12-20 14:53:29 +00:00
Omar Basem 8225d91ee0
Wallet: home top insets
Wallet: home top insets
2023-12-20 18:23:27 +04:00
Mohsen f631e1fe9d
[#17393] feat: add new setting ui (#18118) 2023-12-20 17:03:49 +03:00
Andrea Maria Piana 32cfd214ca
Add fetch messages behind a toggle & some advanced settings
This PR does a few things:

1) Add fetch messages implementation on any kind of chat. It's behind a
   toggle (on by default) as design is still unsure whether we want it,
   but it's very useful for debugging.
2) Allow setting light client from mobile

It also partially remove node config management from the clojure part,
as it's better if that's not explicitly managed by clients.
Some parts are still relying on it but they are not functional
(keycard), while others are still using it and will need to be updated
eventually (syncing), in order to get rid completely of node config.

Sets fleet to shards.test

90c31afe...1adcf02f
2023-12-20 13:04:29 +00:00
flexsurfer 800ca19c08
move keycard native module, removed outdated code (#18252) 2023-12-20 13:53:53 +01:00
mmilad75 b70493691c
Implement Link Card component (#18080)
* add basics

* finalize component

* add test structure

* add tests

* fix lint issues

* move color to props

* move variants to props

* change file structure

* working

* finalize loader

* fix tests

* fix lint issues

* fix style issues

* fix typos

* resolve comments

---------

Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
2023-12-20 14:07:04 +03:30
Ajay Sivan a40862c5a9
Disable component tests that use `wait-for` helper function (#18243) 2023-12-20 02:26:57 -08:00
Parvesh Monu 17c442a373
Add placeholder illustration in jump-to screen (#18229) 2023-12-20 14:56:33 +05:30
Parvesh Monu c74461db3a
remove unused react-native-intersection-observer library (#18230) 2023-12-20 14:21:07 +05:30
yqrashawn 4bc5efb855
fix: universal link regex (#18020)
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
2023-12-20 11:25:09 +08:00
flexsurfer 602b27105b
FINAL BOSS! rename status-im2 to status-im (#18241) 2023-12-19 20:59:07 +01:00
flexsurfer f89fd8ca54
move status-im under legacy (#18237) 2023-12-19 18:41:30 +01:00
flexsurfer 842203a4d0
move community code to status-im2 (#18218) 2023-12-19 15:59:50 +01:00
Brian Sztamfater a4f99de8d5
feat: implement getSuggestedRoutes in the wallet Send Flow (#18104)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-12-19 02:59:58 -08:00
Parvesh Monu d40f70dca4
Optimize chat screen navigation view (#18055) 2023-12-19 16:01:13 +05:30
Alexander 1df96ae3e0
Invite friends (#17570) (#18124)
* Invite friends (#17570)

* Small update

* Update

* Fix
2023-12-19 10:36:49 +01:00
Mohamed Javid da61233302
Wallet - Watched Account UI Updates (#18190)
This commit:

- Updates the account switcher in the "page-nav" component to use "account-avatar" instead of "dropdown"
- Updates the account avatar (on the top right corner of the account screen) to display the watched account variant correctly
- Updates the accounts list in the account switcher to display the correct background for the watched account with the eye icon

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-12-18 23:31:36 +05:30
Jamie Caprani 8a869be01c
chore(wallet): add images to select address page (#18119) 2023-12-18 03:55:42 -08:00
Parvesh Monu 8ba9f45e44
Upgrade react-native-reanimated to 3.6.1 (#18216) 2023-12-18 09:44:53 +05:30
frank e06d8cb106
fix: App gets stuck on syncing process screen when scanning QR code v… (#18140)
* fix: App gets stuck on syncing process screen when scanning QR code via recovered profile with different passwords

* update comment
2023-12-16 10:25:39 +08:00
Ibrahem Khalil f8e935c58d
Close chat when closing group chat details (#18149) 2023-12-15 20:28:30 +02:00
Ajay Sivan 5507ae4fa2
Community: Request to join - Show addresses shared (#18180) 2023-12-15 09:13:32 -08:00
Volodymyr Kozieiev 2a5c102b1c
Add collectible menu (#18185) 2023-12-15 15:37:08 +00:00