Commit Graph

9047 Commits

Author SHA1 Message Date
Alex Tumanov a9a17aaae8
Implement dropdown-input based on the original dropdown component (#17927) 2023-11-28 15:21:15 +00:00
Andrea Maria Piana 6d69c278cd
Update key in tests 2023-11-28 10:57:10 +00:00
Yevheniia Berdnyk c7e230d070
e2e: changed test order 2023-11-28 12:05:47 +02:00
frank d309aa366d
chore: specify light client mode for wakuv2 (#18002) 2023-11-28 14:48:58 +08:00
Jamie Caprani f124ca4252
chore(wallet): add common page-nav component for account switcher (#17946) 2023-11-27 09:16:31 -08:00
Brian Sztamfater 1385e27cf4
feat: select asset screen ui (#17780)
feat: select asset screen ui

Signed-off-by: Brian Sztamfater <brian@status.im>
2023-11-27 11:03:02 -03:00
Volodymyr Kozieiev f82d28c6c9
Show network info on collectible info page (#17980) 2023-11-27 12:29:12 +00:00
Omar Basem a2856cf1c3
Wallet: Emoji picker performance (#17891)
Wallet: Emoji picker navigation perf
2023-11-27 09:57:29 +04:00
Yevheniia Berdnyk e6a7c420a2
e2e: APK upload time limit increased 2023-11-23 12:34:30 +02:00
alwx 671aa67002
Detect image dimensions correctly 2023-11-23 09:28:38 +00:00
Omar Basem dbc8df251a
Wallet: Keypair follow up (#17953)
* Wallet: Keypair follow up
2023-11-23 10:00:22 +04:00
Ulises Manuel 279993b658
Add channel-name component (#17903) 2023-11-22 15:54:52 -06:00
Volodymyr Kozieiev 0c1a18b444
Connect collectible overview page to backend (#17884) 2023-11-22 19:40:26 +00:00
Omar Basem 73e9f67dbd
Wallet: illustrations (#17931)
* wallet: illustrations
2023-11-21 10:55:46 +04:00
Jamie Caprani 86c5505c94
chore(wallet): hook up qr scanner on watch only flow. (#17829) 2023-11-19 16:26:00 -08:00
Icaro Motta c1dcd7a764
Introduce malli library (#17867)
This commit is the foundational step to start using malli
(https://github.com/metosin/malli) in this project.

Take in consideration we will only be able to realize malli's full power in
future iterations.

For those without context: the mobile team watched a presentation about malli
and went through a light RFC to put everyone on the same page, among other
discussions here and there in PRs.

To keep things relatively short:

1. Unit, integration and component tests will short-circuit (fail) when
   inputs/outputs don't conform to their respective function schemas (CI should
   fail too).
2. Failed schema checks will not block the app from initializing, nor throw an
   exception that would trigger the LogBox. Exceptions are only thrown in the
   scope of automated tests.
3. There's zero performance impact in production code because we only
   instrument. Instrumentation is removed from the compiled code due to the
   usage of "^boolean js.goog/DEBUG".
4. We shouldn't expect any meaningful slowdown during development.

**What are we instrumenting in this PR?**

Per our team's agreement, we're only instrumenting the bare minimum to showcase 2 examples.

- Instrument a utility function utils.money/format-amount using the macro
  approach.
- Instrument a quo component quo.components.counter.step.view/view using the
  functional approach.

Both approaches are useful, the functional approach is powerful and allow us to
instrument anonymous functions, like the ones we pass to subscriptions or event
handlers, or the higher-order function quo.theme/with-theme. The macro approach
is perfect for functions already defined with defn.

**I evaluated the schema or function in the REPL but nothing changes**

- If you evaluate the source function, you need to evaluate schema/=> or
  schema/instrument as well.
- Remember to *var quote* when using schema/instrument.
- You must call "(status-im2.setup.schema/setup!)" after any var is
  re-instrumented. It's advisable to add a keybinding in your editor to send
  this expression automatically to the CLJS REPL, or add the call at the end of
  the namespace you are working on (similar to how some devs add "(run-tests)"
  at the end of test namespaces).

**Where should schemas be defined?**

For the moment, we should focus on instrumenting quo components, so define each
function schema in the same namespace as the component's public "view" var.

To be specific:

- A schema used only to instrument a single function and not used elsewhere,
  like a quo component schema, wouldn't benefit from being defined in a separate
  namespace because that would force the developer to constantly open two files
  instead of one to check function signatures.
- A common schema reused across the repo, like ":schema.common/theme" should be
  registered in the global registry "schema.registry" so that consumers can just
  refer to it by keyword, as if it was a built-in malli schema.
- A common schema describing status-go entities like message, notification,
  community, etc can be stored either in the respective
  "src/status_im2/contexts/*" or registered globally, or even somewhere else.
  This is yet to be defined, but since I chose not to include schemas for them,
  we can postpone this guideline.
2023-11-18 11:04:48 -03:00
Icaro Motta 17ebedd6b8
Fix: resolve our Clojure source dependencies first in the classpath (#17919)
In PR https://github.com/status-im/status-mobile/pull/17867 we have a namespace
named schema.core, but this namespace is taken by library prismatic/schema
already (see https://github.com/plumatic/schema/tree/master/src/cljc/schema), a
library used by our direct dependency on bidi 2.1.6. This leads to a broken
build where the ClojureScript compiler reports undeclared vars
(https://clojurescript.org/reference/compiler-options#warnings).

We change the order Java resolves dependencies via the classpath mechanism. We
now first resolve our own Clojure sources, and then project dependencies.
2023-11-18 08:50:11 -03:00
Jamie Caprani 2e2d15adfb
chore: add floating button page component (#17737)
Co-authored-by: Ulises M <ulises.ssb@hotmail.com>
2023-11-17 09:16:55 -08:00
Yevheniia Berdnyk 1d1d586223
e2e: added back status link opening 2023-11-17 18:09:57 +02:00
John Ngei 88dd5e04bb
enable biometric when user signs in with syncing (#17627) 2023-11-17 17:58:51 +03:00
Lungu Cristian 8f8c8dede2
Composer collapsing when editing canceled/done (#17785)
* fix: composer height when entering and canceling edit

* fix: blur the composer input when canceling edit

* fix: focusing animation and composer height after blur

* fix: input height when canceling edit while unfocused

* ref: removed arbitrary keyboard check

* fix: moved edit-mentions logic to use-edit to fix unresolved mention

* fix: composer edit should put the cursor at the end

* fix: (potentially) fixing the mention not resolved during edit

* fix: emoji-kb handler changing the height when default kb appears

* Fix text content when editing and reentering chat

* prevent composer when focusing on opening chat with edit/reply

* clean

* Clauxx comments

* Apply for reply

* Lintil soup = yummy

* refactor variable name

* Extract the focusing logic from the data setting logic

* Edge case

* fix: composer mention key & edit re-enter issues

* fix: reply cancel input blur and smooth reply focus

---------

Co-authored-by: Ibrkhalil <vampirekid017@gmail.com>
2023-11-17 11:32:31 +02:00
Yevheniia Berdnyk 2e0643fabe
e2e: fixes 15.11 2023-11-16 15:54:35 +02:00
Flavio Fraschetti ec4046e543
Hide channel list at token-gated communities overview (#17901)
This commit hides the categorized channel list for token-gated communities overview.
2023-11-16 10:46:17 +00:00
yqrashawn 4a44161163
chore: lint require i18n-resources first in status-im2.core (#17905) 2023-11-16 11:10:40 +08:00
Icaro Motta b9353b1ccd
Fix: actually run integration tests (#17900)
Integration tests weren't running since https://github.com/status-im/status-mobile/pull/17762 was merged a week ago.

This commit also allows individual integration test namespaces to run if you change the :ns-regexp option in shadow-cljs. This is quite handy, since they are relatively slow.

Fixes https://github.com/status-im/status-mobile/issues/17895
2023-11-15 19:51:09 -03:00
Jakub Sokołowski 5ceb7c2215
tests/appium: use requests for fetching APK
Also add more context for the error.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-11-15 18:08:11 +01:00
Jakub Sokołowski 2043e9353b
tests/appium: refactor conftest.py to be more readable
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-11-15 18:08:10 +01:00
flexsurfer 7153e4da48
[#17854] [IOS] The tutorial video animation keeps playing after openi… (#17915) 2023-11-15 16:24:27 +01:00
Icaro Motta c7cba5b4d3
Fix: unable to join token-gated communities (#17894)
Fixes the bug by explicitly passing all available addresses to be revealed
to wakuext_requestToJoinCommunity and picking up the first available address
as the airdrop address. This is a temporary solution while we work on the
feature to allow users to choose which addresses to expose.

Fixes https://github.com/status-im/status-mobile/issues/17861

*Areas that may be impacted*: join community flows.

    ----------------------------------------------------------------------
    Community "Request to join" option is enabled.
    User holds more than X ETH.
    Anyone who holds <X> ETH is allowed to Become member in <COMMUNITY>.
    
    Expected: request to join is received by desktop client and accepted,
    mobile user joins the community.
    ----------------------------------------------------------------------
    
    ----------------------------------------------------------------------
    Community "Request to join" option is enabled.
    User holds less than X ETH.
    Anyone who holds <X> ETH is allowed to View and post in <CHANNEL>.
    
    Expected: request to join is received by desktop client and accepted, mobile
    user joins the community, but can't post in <CHANNEL>.
    ----------------------------------------------------------------------
    
    ----------------------------------------------------------------------
    Community "Request to join" option is enabled.
    No token permissions.
    
    Expected: request to join is received by desktop client and accepted,
    mobile user joins the community.
    ----------------------------------------------------------------------
2023-11-15 06:39:12 -03:00
Ulises Manuel 45df308dd0
[#17823] Refactor tokens data app-db (#17880)
* Refactor edit-account view and events:

 - Fix `(fn [])` code style.
 - Avoid overriding clojure.core/type by destructuring the `:type` key.
 - Split the toast callback to a different function.
 - `:wallet/save-account` receives `:on-success` instead of `:callback` to improve readability.

* Refactor app-db for `:wallet/tokens` & `:wallet/tokens-loading?`

- Remove the root sub `:wallet/tokens-loading?`, now it's in app-db in `[:wallet :ui :tokens-loading?]`.
- Remove the root subs `:wallet/tokens`, now the value is returned along with the account data by the sub
  `:wallet/accounts`, it's stored in app-db in `[:wallet :address "0x..." :tokens]`.
- Fix the format of the token data returned by the endpoint `"wallet_getWalletToken"` and the fn `js->clj`,
    - Addresses are no longer keywords (since keywords mustn't start with a number).
    - Keys are now kebab-case.
    - Chain-ids are no longer keywords, now they are integers.
- Update tests.

* Move logic to calculate `:wallet/balances` and change value returned

- Move logic to `status-im2.contexts.wallet.common.utils`
- The `:wallet/balances` value returned by the sub had the following structure:
  [{:address "0x1...", :balance 12345}
   {:address "0x2...", :balance 67890} ...]
  This required a helper function to get the balance for an address (`get-balance-by-address`)
  It has been changed to a map:
  {"0x1..." 12345
   "0x2..." 67890, ...}
  So now we don't need a helper function (just the hashmap itself or `clojure.core/get`).
- Because of the previous change, now the `get-balance-by-address` has been removed.
- The function `get-account-by-address` has zero uses, so it has been removed.
- The test for the sub has been updated.

* Create sub `:wallet/account-cards-data`

This sub returns a vector of maps to render the account cards in the wallet page.
This logic was previously in the `view` namespace, but it was completely calculated from
the subs `:wallet/accounts`, `:wallet/balances` and `:wallet/tokens-loading?`, so it was
clear that's a derived value.
2023-11-14 10:54:26 -06:00
Brian Sztamfater a74c934936
feat: implement summary tag component (#17858)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-11-14 11:50:58 -03:00
andrey c150070cfe
remove empty files 2023-11-13 14:50:45 +01:00
Ibrahem Khalil 1b745857e8
[17634] Start rendering syncing UI ASAP (#17755)
* Start rendering syncing UI ASAP

* Consolidating values

* fix: show syncing ui immediately

* fix: error validation

---------

Co-authored-by: balogunofafrica <balogunakanbi.k@gmail.com>
2023-11-13 12:15:53 +01:00
Omar Basem 87c9946092
Wallet: Keypair Screen (#17775)
* wallet: keypair screen
2023-11-13 14:43:43 +04:00
Omar Basem f3e47ac1a2
Wallet: watch address - select random color (#17859)
Wallet: randomize color picker
2023-11-13 14:25:44 +04:00
Yevheniia Berdnyk 83a7402210
e2e: fix for terminated session 2023-11-13 02:27:36 +02:00
Siddarth Kumar 3c297bf5b4
chore: ignore auto generated lint-fix files (#17783)
We get these 2 files auto generated locally as part of make lint-fix

`.clj-kondo/taoensso/encore/config.edn`
`.clj-kondo/taoensso/encore/taoensso/encore.clj`

We don't need them checked in its fine if they're ignored.
This commit adds these folders to `.gitIgnore`

- `.clj-kondo/taoensso/`
- `.clj-kondo/babashka/`
2023-11-10 18:12:03 +05:30
yqrashawn b4919261cb
fix: nav conflicts when return from bg from link (#17853) 2023-11-10 09:15:02 +08:00
Icaro Motta ffeb06f36c
Communities - Token gated community fixes (#17799)
- Fix: when there are only channel token permissions, don't show the text "You
  hold 0 of these:" because there are no requirements to show.
- Fix: do not show channel token permissions when the user wants to join a
  community. In other words: only "become admin", "become member", "become token
  master", and "become token owner" are taken in consideration.
- Fix: render correct channel lock icon in 3 states (no permission, with
  permissions and locked and with permissions and unlocked).
- Fix: Previously, before having joined a community, all channels had a lock
  icon closed, now the lock icon is only closed when there's a permission set,
  otherwise no icon is shown (the lock is never open before the user joins the
  community).
- Fix: small UI spacing fix, only display community tags component when there's
  at least one tag.
- Bonus fix: community Overview and Discover screens top bar had a regression,
  see the screenshots.

Fixes https://github.com/status-im/status-mobile/issues/17267

### Areas that may be impacted

- Community overview, before and after joining a community.

### Steps to test

Code tested using the Goerli network and with the testnet flag enabled in the
Desktop client. Out of scope: minted tokens.
2023-11-09 20:19:26 -03:00
flexsurfer 69f87ce8b0
[#17611] move status-im.utils.universal-links.core (#17855) 2023-11-09 21:22:15 +01:00
Andrea Maria Piana 27e27aa113
Add contribution status-go doc 2023-11-09 15:34:20 +00:00
Ajay Sivan e48a5c4e83
Quo community-stat component (#17851) 2023-11-09 04:39:42 -08:00
Mohamed Javid 595b1cfc40
[Fix] Move category selector height to emoji picker (#17844)
This commit moves the emoji categories selector height from the "showcase-nav" component to the "emoji-picker" as we should not use any "quo" ns (except "quo.core") inside the "status-im2" ns.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-11-08 23:56:56 +05:30
Volodymyr Kozieiev e573fc914a
Respect status-go API changes for collectibles request (#17857) 2023-11-08 18:01:33 +00:00
Yevheniia Berdnyk 4eda8bb6b3
e2e: temp fix for opening a link in Status 2023-11-08 18:47:56 +02:00
Volodymyr Kozieiev bd6a9e577c
Updated to status-go with fixed timeouts (#17831) 2023-11-08 15:08:52 +00:00
Mohamed Javid 6bb1779723
Implement edit account and refactor wallet accounts events & subs (#17798)
This commit updates the following:

- Allow users to create new wallet accounts without having to re-login (latest account data is fetched immediately)
- Updates the max length of the wallet account name to 20
- Updates the account cards in the wallet home screen to render the actual account colour
- Updates the (individual) account screen to show the correct color, emoji, name and address
- Allows users to edit account name, colour and emoji
- The rest of the wallet screens would see the updated account information immediately
- Fixes the color (uses profile color) of the context tag and button color in the authentication (enter password) bottom sheet
- Fixes the overflowing of the "+" card in the wallet home when there are two or more accounts.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-11-08 20:09:32 +05:30
codemaster 742c451000
fix: message content text alignment and spacing (#17606) 2023-11-08 05:40:26 -08:00
Alex Tumanov 569036c1d8
Add a button to address watch screen; (#17781)
Add account creation screen

remove icons

remove extra utility and create a new one that would use conventional way of getting an emoji

fix lint

Use button component instead of bottom-actions

Provide global customization color to buttons

Use conventional approach to extract account name

Move to another address

Move to another namespace

Refactor bottom-actions to have button props in maps

Update doc with new icon location

Add spaces between styles

Work on pr comments

Use :on-change-text instead of :on-change for input component
Subscribe to :profile/customization-color directly
Use bottom button from the create-or-edit-account wrapper

Remove extra code
Sort requires

Move ns to proper fileˆ

Fix styles
2023-11-07 16:40:24 +00:00
Brian Sztamfater 188f7f461e
feat: address (mocked) suggestions (#17579)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-11-07 12:04:37 -03:00