Code Monkey home page Code Monkey logo

mobile's People

Contributors

aitoralgorta avatar audreykj avatar chrismatix avatar dependabot[bot] avatar stayprodio avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

mobile's Issues

Add a CI /CD workflow

Current State

  • Right now on mobile we do not have a CI/CD workflow

To do

  • add a CI/CD workflow

Improve Attachments component

Not all the sources support all attachments so we should make this component a little more smarter and have dynamic rendering of the attachments.

We pass a prop something like [.photo, .file, .template] or [.photo] and it will render dynamically depending on what's in that array.

switch conversation state swipe bug

Changing the state of a conversation from ConversationList does not work as expected.

Steps to reproduce:

  1. Login
  2. swipe to the left on a conversation
  3. click on the button which switches the state
  4. see error

Screenshot 2021-10-25 at 15 54 07

auth crash

Current State

  • on the current version of develop, auth fails after writing the email and password in Auth0; seems to be a react-native-webview error

steps to reproduce:

  • login to an organization instance on mobile with the organization name, email, and password

Error:

e {"_dispatchInstances": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugID": 2234, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.11149900034070015, "actualStartTime": 3023365.982429, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "dependencies": null, "elementType": [Function WebView], "firstEffect": [Circular], "flags": 133, "index": 0, "key": null, "lanes": 0, "lastEffect": [FiberNode], "memoizedProps": [Object], "memoizedState": [Object], "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.06372699979692698, "sibling": [FiberNode], "stateNode": [WebView], "tag": 1, "treeBaseDuration": 0.09818800026550889, "type": [Function WebView], "updateQueue": [Object]}, "_debugSource": {"columnNumber": 24, "fileName": "/Users/audreykadjar/mobile/node_modules/react-native-webview/lib/WebView.ios.js", "lineNumber": 264}, "actualDuration": 0.009960999712347984, "actualStartTime": 3023366.0802450003, "alternate": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.013033000286668539, "actualStartTime": 3024389.5549390004, "alternate": [Circular], "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.009823000058531761, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "tag": 5, "treeBaseDuration": 0.009823000058531761, "type": "RNCWebView", "updateQueue": null}, "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": {"cacheEnabled": true, "decelerationRate": undefined, "injectedJavaScript": undefined, "injectedJavaScriptBeforeContentLoaded": undefined, "injectedJavaScriptBeforeContentLoadedForMainFrameOnly": true, "injectedJavaScriptForMainFrameOnly": true, "javaScriptEnabled": true, "messagingEnabled": true, "onContentProcessDidTerminate": [Function anonymous], "onError": [Function onError], "onFileDownload": undefined, "onHttpError": [Function anonymous], "onLoadingError": [Function anonymous], "onLoadingFinish": [Function anonymous], "onLoadingProgress": [Function anonymous], "onLoadingStart": [Function anonymous], "onMessage": [Function anonymous], "onNavigationStateChange": [Function onNavigationStateChange], "onScroll": undefined, "onShouldStartLoadWithRequest": [Function anonymous], "scalesPageToFit": true, "sharedCookiesEnabled": true, "source": [Object], "style": [Array], "useSharedProcessPool": true}, "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": {"cacheEnabled": true, "decelerationRate": undefined, "injectedJavaScript": undefined, "injectedJavaScriptBeforeContentLoaded": undefined, "injectedJavaScriptBeforeContentLoadedForMainFrameOnly": true, "injectedJavaScriptForMainFrameOnly": true, "javaScriptEnabled": true, "messagingEnabled": true, "onContentProcessDidTerminate": [Function anonymous], "onError": [Function onError], "onFileDownload": undefined, "onHttpError": [Function anonymous], "onLoadingError": [Function anonymous], "onLoadingFinish": [Function anonymous], "onLoadingProgress": [Function anonymous], "onLoadingStart": [Function anonymous], "onMessage": [Function anonymous], "onNavigationStateChange": [Function onNavigationStateChange], "onScroll": undefined, "onShouldStartLoadWithRequest": [Function anonymous], "scalesPageToFit": true, "sharedCookiesEnabled": true, "source": [Object], "style": [Array], "useSharedProcessPool": true}, "ref": {"current": [ReactNativeFiberHostComponent]}, "return": {"_debugHookTypes": null, "_debugID": 2241, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.020535999909043312, "actualStartTime": 3023366.0712, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "dependencies": null, "elementType": "RCTView", "firstEffect": [Circular], "flags": 4, "index": 0, "key": null, "lanes": 0, "lastEffect": [Circular], "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0.007612999994307756, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "tag": 5, "treeBaseDuration": 0.014136000070720911, "type": "RCTView", "updateQueue": null}, "selfBaseDuration": 0.006523000076413155, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 167, "viewConfig": [Object]}, "tag": 5, "treeBaseDuration": 0.006523000076413155, "type": "RNCWebView", "updateQueue": null}, "_dispatchListeners": [Function anonymous], "_targetInst": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": {"_debugHookTypes": null, "_debugID": 2234, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.11149900034070015, "actualStartTime": 3023365.982429, "alternate": [FiberNode], "child": [FiberNode], "childLanes": 0, "dependencies": null, "elementType": [Function WebView], "firstEffect": [Circular], "flags": 133, "index": 0, "key": null, "lanes": 0, "lastEffect": [FiberNode], "memoizedProps": [Object], "memoizedState": [Object], "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.06372699979692698, "sibling": [FiberNode], "stateNode": [WebView], "tag": 1, "treeBaseDuration": 0.09818800026550889, "type": [Function WebView], "updateQueue": [Object]}, "_debugSource": {"columnNumber": 24, "fileName": "/Users/audreykadjar/mobile/node_modules/react-native-webview/lib/WebView.ios.js", "lineNumber": 264}, "actualDuration": 0.009960999712347984, "actualStartTime": 3023366.0802450003, "alternate": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.013033000286668539, "actualStartTime": 3024389.5549390004, "alternate": [Circular], "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.009823000058531761, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "tag": 5, "treeBaseDuration": 0.009823000058531761, "type": "RNCWebView", "updateQueue": null}, "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": {"cacheEnabled": true, "decelerationRate": undefined, "injectedJavaScript": undefined, "injectedJavaScriptBeforeContentLoaded": undefined, "injectedJavaScriptBeforeContentLoadedForMainFrameOnly": true, "injectedJavaScriptForMainFrameOnly": true, "javaScriptEnabled": true, "messagingEnabled": true, "onContentProcessDidTerminate": [Function anonymous], "onError": [Function onError], "onFileDownload": undefined, "onHttpError": [Function anonymous], "onLoadingError": [Function anonymous], "onLoadingFinish": [Function anonymous], "onLoadingProgress": [Function anonymous], "onLoadingStart": [Function anonymous], "onMessage": [Function anonymous], "onNavigationStateChange": [Function onNavigationStateChange], "onScroll": undefined, "onShouldStartLoadWithRequest": [Function anonymous], "scalesPageToFit": true, "sharedCookiesEnabled": true, "source": [Object], "style": [Array], "useSharedProcessPool": true}, "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": {"cacheEnabled": true, "decelerationRate": undefined, "injectedJavaScript": undefined, "injectedJavaScriptBeforeContentLoaded": undefined, "injectedJavaScriptBeforeContentLoadedForMainFrameOnly": true, "injectedJavaScriptForMainFrameOnly": true, "javaScriptEnabled": true, "messagingEnabled": true, "onContentProcessDidTerminate": [Function anonymous], "onError": [Function onError], "onFileDownload": undefined, "onHttpError": [Function anonymous], "onLoadingError": [Function anonymous], "onLoadingFinish": [Function anonymous], "onLoadingProgress": [Function anonymous], "onLoadingStart": [Function anonymous], "onMessage": [Function anonymous], "onNavigationStateChange": [Function onNavigationStateChange], "onScroll": undefined, "onShouldStartLoadWithRequest": [Function anonymous], "scalesPageToFit": true, "sharedCookiesEnabled": true, "source": [Object], "style": [Array], "useSharedProcessPool": true}, "ref": {"current": [ReactNativeFiberHostComponent]}, "return": {"_debugHookTypes": null, "_debugID": 2241, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.020535999909043312, "actualStartTime": 3023366.0712, "alternate": [FiberNode], "child": [Circular], "childLanes": 0, "dependencies": null, "elementType": "RCTView", "firstEffect": [Circular], "flags": 4, "index": 0, "key": null, "lanes": 0, "lastEffect": [Circular], "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": null, "return": [FiberNode], "selfBaseDuration": 0.007612999994307756, "sibling": null, "stateNode": [ReactNativeFiberHostComponent], "tag": 5, "treeBaseDuration": 0.014136000070720911, "type": "RCTView", "updateQueue": null}, "selfBaseDuration": 0.006523000076413155, "sibling": null, "stateNode": {"_children": [Array], "_internalFiberInstanceHandleDEV": [Circular], "_nativeTag": 167, "viewConfig": [Object]}, "tag": 5, "treeBaseDuration": 0.006523000076413155, "type": "RNCWebView", "updateQueue": null}, "bubbles": undefined, "cancelable": undefined, "currentTarget": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.009960999712347984, "actualStartTime": 3023366.0802450003, "alternate": [FiberNode], "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.006523000076413155, "sibling": null, "stateNode": [Circular], "tag": 5, "treeBaseDuration": 0.006523000076413155, "type": "RNCWebView", "updateQueue": null}, "_nativeTag": 167, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNCWebViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNCWebView", "validAttributes": [Object]}}, "defaultPrevented": undefined, "dispatchConfig": {"registrationName": "onLoadingError"}, "eventPhase": undefined, "isDefaultPrevented": [Function functionThatReturnsFalse], "isPersistent": [Function functionThatReturnsTrue], "isPropagationStopped": [Function functionThatReturnsFalse], "isTrusted": undefined, "nativeEvent": {"canGoBack": false, "canGoForward": false, "code": -1022, "description": "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.", "didFailProvisionalNavigation": true, "domain": "NSURLErrorDomain", "loading": false, "target": 167, "title": "Log in to Airy Core Auth0 integration", "url": "https://airyhq.us.auth0.com/u/login?state=hqFo2SBaMFl5Y3lsRmNvVnZpRXF4SjBTZ0g0QXpnTHA3ampTYaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFFWZExhV2EzR0RldFoxOFpXWGRJVjlZY2tOenA3R25Jo2NpZNkgVGtIbVp6U3lrNnhvcWc1UWNoNWpORU1NTVFWa0lnVHmlb3JnaWS0b3JnX0xRNXZxbEV2cGdSbjIwRHWnb3JnbmFtZa5qdXN0LXRoZS10b25pYw"}, "target": {"_children": [], "_internalFiberInstanceHandleDEV": {"_debugHookTypes": null, "_debugID": 2243, "_debugNeedsRemount": false, "_debugOwner": [FiberNode], "_debugSource": [Object], "actualDuration": 0.009960999712347984, "actualStartTime": 3023366.0802450003, "alternate": [FiberNode], "child": null, "childLanes": 0, "dependencies": null, "elementType": "RNCWebView", "firstEffect": null, "flags": 4, "index": 0, "key": "webViewKey", "lanes": 0, "lastEffect": null, "memoizedProps": [Object], "memoizedState": null, "mode": 8, "nextEffect": null, "pendingProps": [Object], "ref": [Object], "return": [FiberNode], "selfBaseDuration": 0.006523000076413155, "sibling": null, "stateNode": [Circular], "tag": 5, "treeBaseDuration": 0.006523000076413155, "type": "RNCWebView", "updateQueue": null}, "_nativeTag": 167, "viewConfig": {"Commands": [Object], "Constants": [Object], "Manager": "RNCWebViewManager", "NativeProps": [Object], "baseModuleName": "RCTView", "bubblingEventTypes": [Object], "directEventTypes": [Object], "uiViewClassName": "RNCWebView", "validAttributes": [Object]}}, "timeStamp": 1633533965081, "type": undefined}

Reset Button does not disappear for no reason

Steps to reproduce:

  1. Login to mobile app
  2. Go the filters (top right corner)
  3. set any filter
  4. close filters
  5. re-open filters
  6. notice "Reset" button top right corner
  7. click on the button to reset all filters
  8. button should disappear as no filters set

Screenshot 2021-10-25 at 15 36 19

fix ConversationList rendering

Current State

  • we currently get a warning about ConversationList's + MessageList's rendering:

VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc. {“contentLength”: 5000, “dt”: 607, “prevDt”: 1151}

Conversation View

Once a system user selects a certain conversation within the conversation list on the app, they should be directed to that conversation view.

The conversation view can look something like this:

Conversation

Each conversation, when selected, should show:

  • Name
  • Avatar (if applicable; if not - we will assign a generic one)
  • Conversation State (open or closed)
  • Connected source that the contact is communicating through
  • Date and Time of each message
  • All tags assigned to that specific conversation

Instead of photos, attachments and templates available next to the input bar -- we should include emojis, attachments, and templates.

Templates will not be able to be created via the app, system users will only be able to send available/previously created templates.

Template Preview

Currently in the web version on the Inbox, we show a large preview of the templates.
Screenshot 2021-06-23 at 12 20 25

However: In the react native app, we should include the title and a brief preview of the templates, scalable to the screen size. We should include a vertical scroll bar for system users to scroll through their available templates and choose the correct one.

We do not need a minimized preview of the selected template in the input bar, but rather we will send the template automatically once it is selected from the available templates.

Render Facebook Templates

To do
--> add the rendering of Facebook-specific templates

  • buttonTemplate
  • generic templates
  • media templates

Note: Facebook supports images and videos attached to templates

Add the necessary components for the rendering of templates

To do
We first need to add components that are used for the rendering of templates.

For example, some sources (eg. Facebook) support images and videos attached to templates so we have to add those components before adding the rendering of source-specific templates.

  • add the components library: we need some of these components for the templates (eg. Carousel)
  • add the necessary components inrender/components (eg. Video, Image...)

image (1)

Log In Process

As a system user with an Airy Cloud instance, I want to be able to log into my instance on the react native app.

The log in process will also be via Auth0 and will look like the webapp version:

Login

This will be the first page that users will see when they open the app.

If the user enters the wrong email and password, the page will also reflect the webapp response:

Screenshot 2021-06-22 at 13 08 05

Bug: open/closed only works in conversation view

Currently, you can only switch conversations from open <> closed when you're within a specific conversation. You can't switch the state from the conversation list.

open.closed.mov

Ideally, users should be able to easily switch from open <> closed regardless of whether they are in conversation view or on the conversation list.

Render Chat Plugin Templates

To do
--> add the rendering of Chat Plugin-specific templates

  • RichCard
  • Carousel
  • add template icon for the last message preview

Nothing found (filters) is behind the keyboard

If the user is using "Predictive" on the keyboard, the nothing found message is hidden behind it.

Steps to reproduce

  1. enable "Predictive" in settings/general/keyboard/predictive
  2. search for a name which is not in your conversationList (e.g. 'sjqidosjdi')
  3. see error

Screenshot 2021-10-25 at 16 12 16

Change CI/CD to check just when PR is open against main branch

We are consuming a lot of minutes of building and each branch takes a long time to be checked because the steps we have are really heavy. Let's change it to just check when we open a branch against main, which is when we are gonna release to AppStore and PlayStore.

Optimization

fix warnings

WARN  Require cycle: src/storage/realm.ts -> src/model/Conversation.ts -> src/storage/realm.ts

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 WARN  Require cycle: src/components/CurrentState.tsx -> src/views/inbox/MessageList/MessageListHeader.tsx -> src/components/CurrentState.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

Did not receive response to shouldStartLoad in time, defaulting to YES

Changing State Conversation doesn't work when the conversations first load

[bug observed on testFlight v4, Tedi and Just the tonic]

  • Changing State Conversation doesn't work when the conversations first load.
  • Changing state works when the conversations are filtered and after we reset.

To reproduce:

  • log in to an instance (eg. Just the Tonic / Tedi) on testFlight v4
  • change the state with swipe on one conversation, after all the conversations have loaded (doesn't work)
  • filter conversations and change the state (it works)
  • reset the filter and change the state (it works)

Conversation List view

Once the system user successfully logs into their Airy react native app, they will directed to the Inbox, which will consist of the conversation list.

The conversation list will look something like this:

Conversation list

We need to include a vertical scroll bar for users to be able to scroll through their conversations.

Each individual conversation listed should show:

  • Name
  • Avatar (if applicable; if not - we will assign a generic one)
  • One line preview of most recent message
  • Conversation State (open or closed)
  • Connected source that the contact is communicating through
  • Date and Time of most recent message

The buttons at the bottom should include:

  • Inbox
  • Settings

Within settings, we should include:

Bug: last message sent doesn't always render in ConvList

Currently, the last message sent does not always appear as the preview of the conversation in the conversation list.

rendering.last.message.mov

We need to find a way that the last message - whether sent or received - is the preview of the conversation.

fix typing

Current State

  • we have a lot of TypeScript any in our code

To do

  • fix Typescript types

fix CI/CD

  • our current CI/CD is too heavy, find a way to make it lighter/run only on request or pull requests.

ConversationList optimization

  • - add getItemLayout on ConversationList
  • - fixed setTimeout conversation load bug
  • - investigate conversations bug with filtering
  • - fix padding of carousel template

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.