Commit Graph

5759 Commits

Author SHA1 Message Date
Jamie Caprani 9c62e63035
chore: organise chats context (#18373) 2024-01-05 09:39:01 -08:00
Brian Sztamfater fc72ba6a1e
fix: fix height on account card component (#18329)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 14:11:11 -03:00
BalogunofAfrica 1919094b46
fix: community buttons (#18392) 2024-01-05 17:17:51 +01:00
Brian Sztamfater e7b92dcf25
fix: increase numbered keyboard touchable area (#18330)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 12:55:23 -03:00
Brian Sztamfater 4b3bc73239
fix: always navigate back to shell stack when closing watch account screen (#18324)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-05 12:38:58 -03:00
Jamie Caprani 947a1ef29c
feat(wallet): add ability to send a token (#18242) 2024-01-05 07:04:39 -08:00
Ajay Sivan 4edb14bb5f
Communities: Share Selective Account (#18382) 2024-01-05 05:34:43 -08:00
Omar Basem c6a7808049
Wallet: Utility Tests (#18371)
* Wallet: utility tests
2024-01-05 16:29:26 +04:00
yqrashawn be2d0feda3
fix: generate_profile_url crash when login (#18364)
* fix: generate_profile_url.cljs$core$IFn$_invoke$arity$2 crash when login

'status_im.common.universal_links.generate_profile_url.cljs$core$IFn$_invoke$arity$2' is undefined

update the function to a fixed arity function

* fix: schema/=> macro for :function schema

Signed-off-by: yqrashawn <namy.19@gmail.com>

---------

Signed-off-by: yqrashawn <namy.19@gmail.com>
2024-01-05 20:08:13 +08:00
Ajay Sivan c91b4339dc
Use text-combinations/page-top component in request to join sheet. (#18384) 2024-01-05 02:09:58 -08:00
Brian Sztamfater 205962f582
fix: error is shown when asset is selected on select assets screen (#18326)
Signed-off-by: Brian Sztamfater <brian@status.im>
2024-01-04 11:58:35 -03:00
Ulises Manuel 4ff5e4da8b
[#17938] Collectibles per account (#18277)
* Update wallet events and subs to handle collectibles per account

Additionally,
 - Move collectibles related events to a new events namespace (`status-im.contexts.wallet.events.collectibles`).
 - Update tests to consider collectibles per account.

* Update collectibles tab to handle a current viewing account
2024-01-03 18:41:12 -06:00
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