a free (libre) open source, mobile OS for Ethereum https://status.im
Go to file
Icaro Motta 1806cb792a
Allow users to swipe to delete or swipe to toggle unread notification status (#15106)
Adds support for swiping left/right on some types of notifications. Swiping left
(from left to right) shows a blue button allowing the user to mark the
notification as read/unread. Swiping right (from right to left) shows a red
button, allowing the user to delete the notification for good.

Related PR in status-go https://github.com/status-im/status-go/pull/3201.

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

Technical notes
===============

How's the performance? It feels near native performance in a production release
in a mid-range smartphone. So I'd say it's pretty good, but let me know if you
find any issue.

- I refrained from trying to eliminate all code duplication in this PR. Some
  notifications will behave differently, especially the ones with call to
  action, so I ask you to please take that in consideration when reviewing. See
  https://github.com/status-im/status-mobile/issues/15118
- React Native Gesture Handler has a component named
  [Swipeable](https://docs.swmansion.com/react-native-gesture-handler/docs/api/components/swipeable/).
  I used it instead of writing a monstrosity 👹 of code in
  Reanimated to achieve the same results.
- RN Gesture Handler touchables are the only ones that work with the Swipeable
  component, so I used them and added vars to `react-native.gesture`.
- I had to manually interpolate the translation X of the buttons behind
  notifications because notifications are transparent. To make interpolation
  work with `Swipeable` it's mandatory to use RN `Animated.View` and not
  `Reanimated.View` (see next point).
- `Swipeable` expects us to pass functions that will receive RN
  `AnimatedInterpolation` instances and the rendering lifecycle does not work as
  usual. Hooks didn't trigger as expected, functional Reagent components didn't
  behave as expected, etc. This means `Reanimated.View` and its interpolation
  function is out of question. I did try for almost two days, nothing works.

Testing notes
=============

These are some of the manual tests I ran. There are more scenarios to cover
obviously. Assuming no unread notifications before each flow:

Contact request notification
============================

From the perspective of an user A:

1. Receive a contact request from a non-mutual contact B.
2. Verify the unread count is displayed over the bell icon.
3. Verify the unread count is displayed on the `Messages > Contacts` tab, as
   well as on the AC `Contact requests` tab.
4. Open the AC and before accepting/declining the contact request, check that
   you CAN'T swipe left or right.
5. Accept or decline the contact request.
6. Check the unread indicator disappears in all necessary places.
7. Press on the notification and see if you're redirected to the chat.
8. Go back to the AC and swipe left to mark as `Unread`. Notice that opening the
   chat marks the notification as `Read`. Also very important, notice that the
   `Messages > Contacts` tab will NOT show the *pending contact requests*
   section at the top. This is on purpose, given the notification is unread, but
   the user has already accepted/declined the contact request, hence it's not
   pending.
9. Swipe left againg to mark as `Read`. Check all unread indicators are updated.
10. Swipe right to delete the notification (it won't be displayed ever again).

Admin notification
==================

1. Generate an admin notification, e.g. a community owner receiving a request
   notification to join.
2. Verify the unread count is displayed over the bell icon, as well as the AC
   Admin tab.
3. Verify the community unread indicator is correctly displayed.
4. As an admin, open the AC and before accepting/declining the request, check
   that you CAN'T swipe left or right.
5. Accept or decline the membership request.
6. Check the unread indicator disappears accordingly.
7. Swipe left to mark as `Read`.
8. Swipe left to mark as `Unread`.
9. Swipe right to delete the notification (it won't be displayed ever again).

Mentions & replies
==================

Similar steps outlined for `Admin` notifications, but there's one important
difference. Mention and reply notifications don't require a call to action from
the user, so the user can swipe left/right **without** first having to do
anything on the notification (such as pressing on it). See issue
https://github.com/status-im/status-mobile/issues/15118

What about other types of notifications?
========================================

Swipe gestures for other notification types will be implemented in a separate
PR.
2023-02-24 21:22:31 -03:00
.clj-kondo Move unit test helper namespace to `src/test_helpers/` (#14716) 2023-01-05 11:58:37 -03:00
.dependabot
.github drop unused zenhub github actions workflows 2022-08-01 16:11:38 +02:00
android Add blur overlay for bottom tabs and shell top nav (#14783) 2023-01-25 20:08:11 +05:30
ci ci: add Xcode cleanup Jenkinsfile 2023-02-22 09:21:59 +01:00
doc ci: add component test (#15071) 2023-02-21 13:42:33 +08:00
fastlane ci: drop uploading e2e builds to SauceLabs 2023-02-06 15:15:51 +01:00
ios ios: use sh in shellPath instead of absolute path 2023-02-24 13:30:28 +01:00
modules/react-native-status feat: pass node config/kdf to status-go when local pairing (#15072) 2023-02-17 21:40:27 +08:00
nix update keycard native module 2023-02-23 11:11:20 +01:00
resources [#15019] small option card component (#15077) 2023-02-14 16:06:13 -06:00
scripts new structure continue, move utils, move fx macro to re-frame utils n… (#14373) 2022-11-16 09:09:25 +01:00
src Allow users to swipe to delete or swipe to toggle unread notification status (#15106) 2023-02-24 21:22:31 -03:00
test e2e: 1-1 chat, communities 2023-02-24 20:05:30 +01:00
test-resources make sure nodejs uses a fixed timezone (#14793) 2023-01-16 16:34:15 +05:30
translations Allow users to swipe to delete or swipe to toggle unread notification status (#15106) 2023-02-24 21:22:31 -03:00
visual-test feat: add component tests using react-testing-library and jest (#14331) 2022-11-23 05:59:18 -08:00
.buckconfig
.carve_ignore move constants/config to status-im2 root and remove old constants/config (#14821) 2023-01-18 15:43:58 +01:00
.detoxrc.js Visual tests setup (#14329) 2022-11-20 15:46:04 -08:00
.dockerignore
.env UI for mobile to mobile local pairing - updated (#14514) 2022-12-16 18:40:56 +05:30
.env.e2e UI for mobile to mobile local pairing - updated (#14514) 2022-12-16 18:40:56 +05:30
.env.jenkins UI for mobile to mobile local pairing - updated (#14514) 2022-12-16 18:40:56 +05:30
.env.nightly Enable waku2 by default 2022-12-15 12:39:49 +00:00
.env.release Enable waku2 by default 2022-12-15 12:39:49 +00:00
.envrc Add login integration test 2022-06-08 13:43:32 +01:00
.eslintrc.js
.flowconfig RN 63 and xcode12 2021-01-14 09:41:38 +01:00
.gitattributes
.gitignore chore: add some component tests (#14511) 2022-12-13 14:19:20 -08:00
.mailmap
.nycrc
.prettierrc.js feat: add messages gap component (#13860) 2022-09-05 15:58:35 +08:00
.watchmanconfig
.zprintrc Nix/upgrade zprint 1.2.5 (#15113) 2023-02-17 20:10:00 +08:00
LICENSE.md
Makefile ci: add component test (#15071) 2023-02-21 13:42:33 +08:00
README.md Document new guidelines (#14309) 2022-11-14 07:15:49 -03:00
RELEASES.md notes: updated release notes 2022-08-29 13:54:45 +02:00
VERSION Bump version to 1.21.0 2023-02-08 17:50:26 +00:00
app.json
babel.config.js feat: add component tests using react-testing-library and jest (#14331) 2022-11-23 05:59:18 -08:00
binding.gyp Add status-go tests 2022-05-25 17:59:02 +01:00
default.nix
index.js Implement Wallet Connect 2.0 2022-03-17 03:46:38 -03:00
metro.config.js Implement Wallet Connect 2.0 2022-03-17 03:46:38 -03:00
package.json update keycard native module 2023-02-23 11:11:20 +01:00
react-native.config.js Implement Wallet Connect 2.0 2022-03-17 03:46:38 -03:00
shadow-cljs.edn Nix/upgrade zprint 1.2.5 (#15113) 2023-02-17 20:10:00 +08:00
shell.nix
status-go-version.json Allow users to swipe to delete or swipe to toggle unread notification status (#15106) 2023-02-24 21:22:31 -03:00
supervisord.conf
yarn.lock update keycard native module 2023-02-23 11:11:20 +01:00

README.md

Status - a Mobile Ethereum Operating System

Get it on Google Play Get it on F-Droid Get it on Github

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 technologies. That's right, no middle men and go-ethereum running directly on your device.

Getting started with Status

Why?

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, 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 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 or join our chat 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 which guides you through the technology stack and start browsing beginner issues. Then you can read how to Build Status, which talks about managing project dependencies, coding guidelines and testing procedures. The 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 long lasting relationships you form will be well worth it, check out our Mission and Community Principles

  • Specification / Documentation 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 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. Jump into our chat 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 or if an android user check out our nightly builds. You can shake your phone to submit bug reports, or start browsing our Github 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

Status API

View our API Docs and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status here.

Give me Binaries!

You can get our Beta builds for both Android and iOS on our website, through our nightly builds or by building it yourself.

Core Contributors

Core Team Members

Special thanks to @adrian-tiberius. Without the dedication of these outstanding individuals, Status would not exist.

Contact us

Feel free to email us at support@status.im or better yet, join our chat.

License

Licensed under the Mozilla Public License v2.0

Testing Supported by

BrowserStack Status