- Debounce peer stats signals by 1s because they may happen 30 times during
login and the payload conversion using js->clj is not cheap.
- Change the order of case macro checks: put more frequent signals at the top.
- Better format code
* fix: no routes found error when disabling chains and current amount exceeds new max amount
* fix: disable button on routes loading
* add no-routes-found component
---------
Co-authored-by: Brian Sztamfater <brian@status.im>
* fix: ensure the keypairs use blur for their theme
* fix: allow for container-style to be passed to standard-title component
* chore: add translations for for missing-keypair labels
* tweak: add support for missing-keypair type for drawer-top component
* tweak: add initial implementation of missing-keypair list-item component
* tweak: add initial implementation of missing-keypairs list component
* feature: add initial implementation of displaying missing key-pairs
* tweak: update missing-keypair list-item to support blur, light, and dark mode
* chore: add missing-keypair list-item preview
* chore: add missing-keypairs preview
* chore: decode :operable key in account to be keyword
* tweak: remove unneeded keyword decoding
* tweak: update drawer-top component to use keypair and stored field
* tidy: revert change for checking for not default-keypair in actions menu
* Add subscription to get preferred networks given an address
* Fix preselected networks in receive screen
* Improve subscription
* Fix preselected networks in share screen
* Update test to include oeth
While investigating why login is slow
https://github.com/status-im/status-mobile/issues/20059 and when testing with
accounts with communities, I noticed we are logging huge payloads because they
include data URLs. This makes debugging the app harder.
Therefore, we will now log the full event payload only at the trace level, and
at the debug level we only log the event type.
This problem was first described by ulisesmac.
Change the implementation of component previews to support receiving either
state/set-state from use-state or a Reagent atom, thus allowing us to gradually
change preview namespaces to use hooks instead of having to refactor all at once
in a gigantic PR.
All types of preview fields were tested, including multi-select.
Only the components counter.step and selectors.react previews were adapted
to use-state.
feat: implement wallet send flow edge case when selected token is not supported on receiver's preferred networks
Signed-off-by: Brian Sztamfater <brian@status.im>
* fix: resolve warning about using subscription inside a lazy seq
* fix: avoid schema error when we do not have a port for the media server
* chore: add feature-flag for network-settings inside wallet-settings
* chore: add testnet mode label
* chore: add testnet labels for bottom-sheets
* chore: add label for changing testnet mode
* feature: add initial network-settings screen to wallet-settings
* test: add test for sub
* tidy: rename function to hide-bottom-sheet
* tweak: add info-box for testnet mode
* tidy: testnet-mode bottom-sheet
* tidy: use reduce-kv instead of map & into
* tidy: use noun naming convention for function creating options for settings
* tweak: add support for displaying testnet-mode status on each wallet network
* chore: add translation for labels referencing testnet-mode and sepolia
Preload the user namespace (src/user.cljs and src/dev/user.cljs) for the mobile
target and for dev-only purposes. The files are git-ignored.
Just a reminder that you'll be responsible for making sure your user namespace
is correct. If it's broken in any way (e.g. calling non-existent code) the app
will crash at initialization (dev-only environment obviously).
Why? When the app initializes, it loads namespaces that were required at least
once. If you create a user namespace, it won't be automatically required for
you. And if you, like some Clojure devs, like to use the user namespace as
your safe heaven for experimentation and dev-only utilities, you'll need to
remember to evaluate the namespace at least once.
This is tedious and many times I forgot to do so and the app crashed because the
compiler didn't know where the symbols were coming from.
This commit rewrites utils.re-frame/delay-render to use hooks. The new
implementation renders significantly better than what we have today, at least on
Android.
Why not hiccup instead of a function call to delay-render? The Settings screen
is rendered slightly faster if I use delay-render as a function call instead of
hiccup. My only guess is that this is just less work to be done by Reagent,
since the wrapper function is not creating a wrapper component with its own
lifecycle.
The full analysis can be found here, but it's copied for future reference:
--------------------------------------------------------------------------------
Based on my analysis of individual frames being rendered and having investigated
3 different scenarios:
1. Scenario 1: No delay whatsoever, i.e. not using `delay-render`.
2. Scenario 2: Using `delay-render` like in `develop`, that is, a form-2
component with a local Reagent atom.
3. Scenario 3: Using `delay-render` as in this PR, using hooks.
All 3 scenarios open the Settings screen with all rendered views in the same
amount of time. In terms of raw performance, they are completely identical. The
absolute value doesn't matter, but in my recordings, on average, 10 frames of
video after the first press on the user's profile image.
So how can it be that on Android the new solution is visibly smoother? It's all
about latency and our brains are very picky about it.
Scenario 1 - Not using delay-render: the user notices a longer delay after
pressing on the profile image because all components in the Settings screen are
mounted in one go. This gives the impression to the user of being slower. In
slower Android devices, we've seen a user even press twice because the Settings
screen was taking longer to open. On newer Android devices this is not much of a
problem. There's another problem in `Scenario 1`, on Android, with too many
elements and/or too many heavy elements being mounted, the opening animation is
sometimes completely cut off or very clunky (a similar problem can happen while
opening the Activity Center).
Scenario 2 - Use delay-render with a form-2 component: The Settings items are
always rendered after the opening animation completes. Our brains perceive this
as a slight delay because we can see the empty gray background for 1-3 frames.
This is quite noticeable on my physical Android device, even with a prod build.
Scenario 3 - Use delay-render as a hook: the optimal solution from the user's
perspective, Settings items sometimes can be rendered before the animation
completes. I say sometimes because other times the items are rendered only 1
frame before or right when the animation completes, which would be almost the
same as Scenario 2.
What the hooks solution gave us is a little bit of the Scenario 1 and
Scenario 2 in one package, and because the Settings items can be sometimes
rendered before the opening animation completes, our brains see that as being
faster.
In future performance investigations, we might want to focus on manipulating
latency more aggressively to see where that leads us.
Some devs reported invalid schemas in the develop branch during app
initialization. We knew this could happen when Malli was first
introduced, but we wanted to play safe in the beginning due to the
overall inexperience of the team with Malli.
This commit removes all guardrails on instrumented vars, i.e. during app
initialization the app will crash on any invalid schema. A reminder that
instrumentation only take effect when js/goog.DEBUG is true.
* chore: add "key pairs and accounts" label
* chore: feature flag wallet-settings
* tidy: extact navigate-back function into static defn
* wip: add initial keypairs and accounts list view to wallet settings
* tweak: wire-up initial action menu for key-pairs
* tidy: extract key-pair container styles into style namespace
* tweak: fix dark background for key-pair and account settings
* tidy: refactor on-press handler for key-pair options
* fix: move feature-flag usage to settings screen instead of settings items definition
* tidy: remove unneeded key props
* tidy: clean up de-structuring and passing of props
* tidy: use keep with when expressions instead of filter and map expressions
* tidy: rename the wallet-settings feature flag
* tweak: rename and add feature-flags for mobile wallet settings
* tweak: use scrollview for feature-flags and add spacing between feature-flag groups
* tweak: adjust the way feature-flags are displayed in groups
* tidy: remove unneeded prop
* tidy: use bottom-inset for padding key-pair and accounts list
* tidy: change `filterv` to `filter`
* tidy: use subscription for building account-props
* tidy: use subscription to build the entire keypair-account
* tweak: use key-pair type to determine default key-pair
* tidy: rename component to settings-category-view
* tidy: use assoc instead of merge
* tidy: extract function from subscription
* test: add tests for formatting key-pairs and accounts for wallet settings
* tweak: use `match?` instead of `=`
* tidy: use `swap!` without anonymous functions
This commit improves in-app feature flags to persist what is currently only
stored in a Reagent atom by using RN Async Storage
https://reactnative.dev/docs/asyncstorage. This should make them more convenient
to use, which is a good thing overall for developers.
Additionally, there's now a top-right button in screen Settings > Feature Flags
that will reset the flags to the initial values obtained from environment
variables.
These in-app feature flags are exclusively available in debug builds in
Settings > Feature Flags, and only visible when flag ENABLE_QUO_PREVIEW is
enabled. There's no impact whatsoever in prod builds. A reminder that they are
not meant to be used by users (yet).
It's worth noting that RN has deprecated Async Storage and now recommends other
community solutions, but for a dev-only feature, I think it's fine.
Detailed explanation:
The schema failure is due to utils.image-server/get-initials-avatar-uri being
called with a nil profile customization color right after the user confirms
logout.
Right after logging out, the subscription :profile/profile-with-image is
recomputed. One of its signal inputs is :profile/profile. Right after logout,
the output of sub :profile/profile is always nil (this is correct, nobody is
logged in). This means that the sub :profile/profile-with-image will try to
calculate the multiaccount URI by passing a nil profile. This is wasteful
computation and is also the cause of the schema for
utils.image-server/get-initials-avatar-uri to fail, because it expects the
profile's customization-color to be present.
* tweak: refactor image-uri helpers
* fix: add `:primary` as customization color for profile images
primary is being used as the default color for accounts that were migrated without customization color to a default color
* tweak: add support for displaying channel qr codes with quo/share-qr-code component
* chore: add channel qr-code example to quo preview components
* tweak: integrate common/qr-code component for sharing community channel qr-code
* tweak: add support for showing community channel avatar in share-qr-code header
* tweak: hide wallet tabs for channel qr-code
* tweak: integrate share handler for community channel qr-code
* fix: prevent accidentally rendering the community channel qr-code with nil while closing the share-qr modal
* tidy: extract navigate-back dispatch function
* tidy: use styles namespace
* tidy: use case statement to determine which qr-code components have a header
* tweak: check for share-qr-types that support headers
* tidy: extract navigate-back into static function
* fix: prevent community qr-code from glitching when closing modal
* fix: ensure :communities/share-community-url-with-data is defined
* fix: ensure we show the share-sheet when pressing the community share-action
* fix: ensure we use the correct share-sheet title when sharing a community
* e2e: updated inviting contacts to community flow
* tweak: remove extra url message when sharing community url on android
* tweak: remove extra url message when sharing community channel url on android
* tidy: remove redundant event handler for sharing community url
---------
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
In this commit we nuke the unmaintained library `react-native-mail` and move over the logic to our native modules.
This also helps to fix `make nix-update-gradle` which would fail because of that library.
- Android
- iOS
status: ready
* 💚 Enable wallet on header navigation
- Add settings screen
- Add save address settings screen
- Need to add empty state next
* 🥡 Added empty state for saved-addresses
- Fixed the standard title quo component
- It's flex behaviour was buggy, and it's not being used anywhere
* 🧂PR fixes and lint
- Use callback everywhere
* 🗞️ Move wallet settings to wallet namespace
This PR completely removes support for editing shared addresses while a user's
request to join is pending approval.
The reason for the removal is that, in status-go, the control node that will
process the message
protobuf.ApplicationMetadataMessage_COMMUNITY_EDIT_SHARED_ADDRESSES verifies
the user is already a member of the community, but a user waiting for approval
to join is not yet a member. Removing this check doesn't sound like a good idea
and we want to avoid bugs/complications for the next release. The feature isn't
working anyway, so the purpose of this PR is also to cleanup code that doesn't
work and won't be re-done anytime soon.
We log the entire signal data when it arrives from status-go in the native
layer, where our Clojure logging mechanism is unavailable. Sometimes, the
developer may not want that much noise during development, e.g. when managing
integration or contract tests.
This commit removes the native calls to log signals and adds a timbre
(log/debug ...) call in the event handler :signals/signal-received. We know
timbre will elide log calls at compile time given the minimum log level set,
therefore, we don't need to worry about performance because we will log signals
at the debug level only.
This commit fixes the display of the correct keypair name (where the account is generated from) in the About tab.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* tweak: hide the identity verification tab inside the activity center
* tweak: hide not-implemented features by default in dev
* fix: remove nil tabs from when rendering quo tabs
* tweak: allow for env variable to configure undo-time-limit when deleting a message in chat
* tweak: add env variable undo timeout for deleting messages for everyone
* tweak: extend timeout duration for undo toast when deleting a message for a user
* tweak: extend timeout duration for undo toast when deleting a message for everyone
Sometimes an integration test was throwing "TypeError: Cannot read properties of
null (reading 'call')" because a value was nil in the app-db, but the code was
treating it as if it was always a map and could be called as a function.
The original code wasn't respecting Clojure's nil punning good practices. In
Clojure, it's often recommended to not use dynamic data as functions, because if
they're nil, in CLJS we'll get an exception and as usual in CLJS, the stacktrace
won't be very readable.
We should prefer contains? or get, which will work just fine with nil values,
and only use data as a function if it's static, e.g. a map defined in a def.
* tweak: implement the share button inside the profile settings page
* chore: define event and effect handler for opening share sheet
* tidy: refactor share buttons to use open-share event
* tidy: refactor open-share effect to use react-native-share bindings
* tidy: remove unused code for old bindings to react share sheet
* tidy: move effects.share/open definition to navigation effects
* tweak: ensure navigation effects are loaded
* tidy: use open-share dispatch in ui
* tidy: use open-share dispatch instead of calling open function directly
* tidy: refactor react-native.share/open to only receive options and return promise
* tidy: refactor open-share effect to receive map of content and handlers
* tidy: replace strings with keywords
* tweak: always handle failure case when opening share-sheet
* tweak: rename :content to :options
* fix: conditionally call on-error
* tweak: add extra information when logging error from attempting to share-sheet
* Refactor :wallet/tokens-filtered sub to filter only when `query` is provided
* Make token input logo pressable and make components more flexible
* Change asset-list's rn/scroll-view -> gesture/scroll-view to make it scrollable on bottom-sheets
* Add bottom-sheet to edit the token to send
* tweak: truncate text inside contact request notifications to be a max of two lines
* tweak: truncate text inside the activity-center contact-requests to be a max of two lines
This commit:
(UI changes)
- adds the feature to filter assets (tokens and collectibles) and balances based on networks
- fixes network color for eth not shown on the multichain address (e.g. Account Options bottom sheet)
- fixes blur type in the confirm button in the network preferences sheet
- fixes the User ability to unselect all networks in the network preferences sheet
- fixes account address and color not shown in network-preferences sheet on Shell > Share Multichain address
- added STT token image
(Non-UI changes)
- Refactors the functions used for balance calculations and network details
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* tweak: re-structure layout of quo/author component to use flex-baseline for alignment
* tweak: use top on container to balance layout while using top to offset primary-name
* tidy: remove margin-bottom: 0
* tweak: add comments and fix layout glitch
* tweak: augment bottom-sheet component to be aware of keyboard height
* tweak: augment quo input component to allow for styling of the input, the input container, and container
* tweak: augment contact request input to grow until max screen size is reached for the bottom-sheet
* tweak: handle blurring the contact request input when keyboard is dismissed on android
* tidy: refactor with the use-keyboard hook
* tweak: use on-layout for measuring sheet max-height
* tweak: remove use of input-style and flex-direction column
* tidy: remove unused requires
* tidy: use container-style prop
* tidy: fix formatting
* fix: default layout-height to window-height
* 🖇️ Connect getSavedAddresses
- The save button will not show if the address is already saved
* ⚒️ Fix PR reviews
* 🗑️ Remove code from wallet events ns
* updated community rules to display the actual rules
* updated scroll behaviours on community rules inside the bottom sheet
* added standard rules for communities without rules
* fix android scroll issues
* feat: added undo action to mute chat toast
* fix: removed trailing spaces from toast text
* test: integration test for mute-chat undo
* fix: added space before newline to toast messages text
* feat: add undo to community mute toast
* fix: integration tests
* fix: integration tests
---------
Co-authored-by: Volodymyr <52490791+VolodLytvynenko@users.noreply.github.com>
This commit
- adds the "Testnet mode enabled" banner if the User has enabled the testnet
- fixes a E2E bug
---------
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
## Summary
This PR removes all of the unused `npm` libraries and their corresponding `gradle`/`cocoapods` dependencies.
The list of npm dependencies removed are :
- `@babel/preset-typescript`
- `create-react-class`
- `react-native-haptic-feedback`
- `react-native-image-viewing`
- `react-native-languages`
- `react-native-randombytes`
- `react-syntax-highlighter`
- `rn-emoji-keyboard`
- `tdigest`
This saves us some bytes in the bundle size.
## Platforms
- Android
- iOS
## Summary
PR made to add logs to help determine why integration test hangs on logout.
## Testing notes
No need for testing since we only ever add logs in test code here.
related to: #19256
* fix: allow name-container inside message content to shrink so secondary-name can be truncated
* fix: responsively truncate contact profile secondary-name
* fix: ensure home chat-list-items use full available width in layout
* fix: adjust layout of home chat-list-item shrinking with notification counter
* fix: adjust layout of home chat-list-item when displaying notification counter
* tidy: simplify alignment
* tweak: adjust alignment of quo/author component for different text sizes
* tidy: extract styles and reformat notification-layout
* Fix key extractions in re-frame/reg-sub
* Add `:width` to share-qr-code
By adding this prop, `on-layout` can be skipped and the component can be properly rendered faster.
* Use `share-qr-code`'s `:width` prop in share profile shell
* Fix share qr code for wallet addresses
* Fix the height of the component being cropped.
* Fix the bottom dots not being accurately highlighted.
* Fix the blink when the component is mounted
fixes#18311
This PR upgrades `nixpkgs` to latest release version of 23-11
ref -> https://github.com/NixOS/nixpkgs/releases/tag/23.11
- `Gradle` from `8.0.1` -> `8.4`
- `Git` from `2.40.1` -> `2.42.0`
- `Curl` from `8.0.1` -> `8.4.0`
- `OpenSSL` from `3.0.8` -> `3.0.13`
- `NodeJS` from `18.16.0` -> `18.19.1`
- `Python` from `3.10.11` -> `3.10.13`
- `Clojure` from `1.11.1.1273` -> `1.11.1.1413`
- and some more stuff
- `xcbeautify` , this was added in 23-11 ->https://github.com/NixOS/nixpkgs/pull/289446
- `idb-companion`, this was also added in 23-11 -> https://github.com/NixOS/nixpkgs/pull/296440
* Fix linear-gradient breaking when `customization-color` is unknown
* Fix exception when scanning an address due to non-existing navigation route
* Dispatches universal QR code scanner on share address modal
This commit enables Test Networks in Dev, E2E and PR Builds by default and disables in Release/Nightly Builds.
This enables in create account or restore account flow. If you upgrade the app from the old build with an existing profile, it will use the last saved (test networks enabled) state of that profile.
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
* Remove 'Community admins will review your request' text from community overview screen
* Use the button label 'Request to join' for all communities
* e2e: updated test
---------
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
* feat: replaced old emoji component with new one
* feat: replaced old sticker component with the new one
* ref: pass only url to sticker
* fix: renamed ns and passing only needed props
* fix: destructuring instead of select-keys & assoc
* fix: formatting
* fix: ensure contact-request notifications are displayed as notifications
* fix: provide context-theme for notification sub-components
* fix: adjust font weight for notification text
* fix: adjust alignment of user-avatar inside a notification with a header and body
* tidy: rename override-theme to theme inside notifications
* fix: update notifications component to use `user` prop instead of `avatar`
* tweak: adapt notification to avatar to vertically center when only displaying header or title
* fix: use title font-size for contact-request-accepted notification
* fix: allow for custom avatar component prop in quo notification component
* fix: ensure we use the correct font-weight for contact-request-accepted notification
* tidy: fix formatting
fixes#18291
## Summary
Changes worth mentioning are :
- More hacks/patches
- Force app to use `Java 17` everywhere to compile `kotlin,java`
- `gems` were upgraded after a long time
- `aapt2` was bumped to `8.1.1`
- `metro` is now at `0.80.4`
- `xcbeautify` was bumped to `1.4.0`
- `@react-native-community/clipboard` lib was replaced with `@react-native-clipboard/clipboard`
- `react-native-dialogs` lib was upgraded to `1.1.2`
- `react-native-gesture-handler` lib was upgraded to `2.14.1`
- `react-native-navigation` was upgraded to `7.37.2`
## Platforms
- Android
- iOS