Commit Graph

63 Commits

Author SHA1 Message Date
Gerzon Z 691bf1ef17
Chore: Migrate react-navigation to TypeScript (#3480)
Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
2021-12-03 16:27:57 -03:00
Gerzon Z 8e4d47cf7b
Chore: Migrate ProfileView to TypeScript
* Initial commit

* Fix module import

* Improve TextInput and KeyboardView interfaces and migrate scrollPersistTaps to TS

* update interfaces

* add new interfaces and extract them to their own file

* chore: migrate style.js to ts

Co-authored-by: AlexAlexandre <alexalexandrejr@gmail.com>
2021-11-10 12:10:34 -03:00
Alex Junior 69a67ea998
Chore: Start Typescript migration (#3279) 2021-09-13 17:41:05 -03:00
Gerzon Z d6da8665c6
[IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual

* Update ReplyPreview.js

* Remove react-fast-compare

* Removed deep-equal and upgrade babel-eslint dev dependency

* Fix avatar

* Fix Messagebox

* Fix CreateDiscussionView

* ModalBlockView

* NewMessageView

* ProfileView

* RoomInfoEditView

* ServerDropdown

* Return local search as object instead of observable

* SelectedUsersView

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-02-26 13:01:45 -03:00
Gung Wah 3264746400
[FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding

* fix.breadcrumbs-exceeding-change-events

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-02-11 18:44:50 -03:00
Arkadyuti Bandyopadhyay bdc495dd6d
[FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS

* Removing callToAction and replacing with confirmationText

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-02-01 14:23:21 -03:00
Diego Mello acd5f04314
[FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop

* Stop rendering servers when there's only one

* Map and alloc only necessary columns from query

* Fetch servers count instead of all servers records

* Fetch only needed servers

* Separators

* Remove renderContent

* Minor fix

* Refactor query

* Smaller avatars in memory

* Fix getItemLayout

* Add topic

* Load less pods

* tests

* Import only used functions from lodash

* Fix pods

* Import only used functions from semver

* Fix media sharing

* Update pods

* Disables preview and thumb on iOS

* Update expo-video-thumbnail

* Unnecessary change
2021-02-01 14:18:55 -03:00
Diego Mello 81bb89da6c
[IMPROVEMENT] Support badge number on header buttons (#2566)
* Beginning header buttons refactor

* Add HeaderButtons

* item with title

* Refactor

* Remove lib

* Refactor

* Update snapshot

* Refactor

* Update tests

* Lint
2020-10-30 13:15:58 -03:00
Djorkaeff Alexandre f7e2388017
[FIX] iOS uploads always cropping as squares (#2516)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-10-30 12:54:44 -03:00
Diego Mello 52850cbccc
[IMPROVEMENT] List Component (#2506)
* List.Item

* section

* Start removing theme as prop

* Remove StatusBar theme prop

* SafeAreaView theme prop

* Minor fixes

* List.Container

* Add translateTitle and translateSubtitle props

* Storybook

* Show action indicator

* Header

* Info

* Theme stories

* FlatList

* DisplayName

* Fix settings

* FlatList tweaks

* ThemeView

* Screen Lock Config

* DefaultBrowserView

* PickerView and User Prefs

* Notification Prefs

* StatusView

* Auto Translate

* InviteUsersEdit

* Visitor

* Minor fixes

* Remove Separator

* Remove iteminfo

* Font scale

* Legal

* Jitsi and e2e

* Block

* search, star, etc

* auto translate and notifications

* RoomInfo

* Refactor RoomActions

* lint

* Remove DisclosureIndicator

* padding horizontal 12

* Detox

* Tests

* Address review comments

* Fix vertical scroll

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
2020-10-30 10:59:44 -03:00
Djorkaeff Alexandre 734039191f
[FIX] Avatar cache invalidation (#2311)
* [WIP] Avatar cache invalidation

* [WIP] Avatar container

* [IMPROVEMENT] Avatar container

* [CHORE] Improve code

* Allow static image on Avatar

* Fix avatar changing while change username (#1583)

Co-authored-by: Prateek93a <prateek93a@gmail.com>

* Add default props to properly update on Sidebar and ProfileView

* Fix subscribing on the wrong moment

* Storyshots update

* RoomItem using Avatar Component

* use iife to unsubscribe from user

* Use component on avatar container

* RoomItem as a React.Component

* Move servers models to servers folder

* Avatar -> AvatarContainer

* Users indexed fields

* Initialize author and check if u is present

* Not was found -> User not found (turn comments more relevant)

* RoomItemInner -> Wrapper

* Revert Avatar Touchable logic

* Revert responsability of LeftButton on Tablet Mode

* Prevent setState on constructor

* Run avatarURL only when its not static

* Add streams RC Version

* Move entire add user logic to result.success

* Reorder init on RoomItem

* onPress as a class function

* Fix roomItem using same username

* Add avatar Stories

* Fix pick an image from gallery on ProfileView

* get avatar etag on select users of create discussion

* invalidate ci cache

* Fix migration

* Fix sidebar avatar not updating

Co-authored-by: Prateek93a <prateek93a@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-10-30 10:12:02 -03:00
Youssef Muhamad 67ecab7169
[NEW] Logout from other logged in locations (#2386)
* Logout from other logged in locations

* Add UI feedback for the request result

* Refactor request to use the proper REST API

* Change backgroundColor

* I18n

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-08-25 13:51:49 -03:00
Djorkaeff Alexandre 7813ed3b28
[FIX] User Preferences (#2418)
* [FIX] User Preferences

* PreferencesView -> UserPreferencesView

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-08-21 15:14:06 -03:00
Ezequiel de Oliveira 54c4614e2e
[NEW] User notification preferences (#2403)
* Button to preferences view

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Create screen to preferences and listItem to notifications

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Refactoring NotificationPreferencesView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* List notification preferences

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Adding translations to labels

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* SetUserPreferences api call

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Saving new user preference in API

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix lint

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Add in-app notification test

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix in app mentions preference

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Improve object in testInAppNotification

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Removing improper options for NotificationpreferencesView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Adding API version

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Use redux in UserNotificationPrefView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove in app test

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Use components from another view

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Removing verification for testing in-app notifications

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Move to ProfileView

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-08-21 10:30:11 -03:00
Youssef Muhamad e05aa1eb52
[NEW] Log events from RoomsList, SideDrawer and Profile (#2190)
* Create method to track user event to isolate the logic to improve future refactoring

* Track Onboarding view

* Track NewServer view

* Refactor track method due to firebase already send the current screen

* Track default login and all the oAuth options

* Track default sign up in RegisterView

* Change trackUserEvent signature and update all the files

* Track the remaining login services

* track add server, change server and search

* Track SidebarView and refactor to use react-navigation

* Track profile events and handle exceptions

* Track create channel flux

* Track send message to user via NewMessageView

* Track create direct message flux

* Handle failure of create channel and group in the saga

* Track create discussion flux

* Track navigate to directory and its actions

* Track read, favorite and hide a channel, handling its errors

* Track all channels sorting and grouping

* Resolve requests to improve the importing logs and events

* Remove unused events file

* Leave a bugsnag breadcrumb when logging an event

* Move all logEvent to the top of code block and log remaining fail events

* Move all the non-logic-dependent logEvent to the top of code block

* Improve the logging of sidebar events

* Improve events from onboarding and newserver

* Improve events from login and register view, and log enter with apple

* Improve NewMessageView events

* Improve CreateChannel events

* Improve CreateDiscussion and SelectedUsers create group events

* Improve RoomsList events and log trivial events

* Improve ProfileView events

* Remove single line function body for the sidebarNavigate

* Navigate to Status and AdminPanel View using the defined sidebarNavigate method

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-07-30 10:26:17 -03:00
Diego Mello 98ed84ba5c
[CHORE] Update react-navigation to v5 (#2154)
* react-navigation v5 installed

* compiling

* Outside working

* InsideStack compiling

* Switch stack

* Starting room

* RoomView header

* SafeAreaView

* Slide from right stack animation

* stash

* Fix params

* Create channel

* inapp notification

* Custom status

* Add server working

* Refactor appStart

* Attachment

* in-app notification

* AuthLoadingView

* Remove compat

* Navigation

* Outside animations

* Fix new server icon

* block modal

* AttachmentView header

* Remove unnecessary code

* SelectedUsersView header

* StatusView

* CreateDiscussionView

* RoomInfoView

* RoomInfoEditView style

* RoomMembersView

* RoomsListView header

* RoomView header

* Share extension

* getParam

* Focus/blur

* Trying to fix inapp

* Lint

* Simpler app container

* Update libs

* Revert "Simpler app container"

This reverts commit 1e49d80bb49481c34f415831b9da5e9d53e66057.

* Load messages faster

* Fix safearea on ReactionsModal

* Update safe area to v3

* lint

* Fix transition

* stash - drawer replace working

* stash - modal nav

* RoomActionsView as tablet modal

* RoomStack

* Stop showing RoomView header when there's no room

* Custom Header and different navigation based on stack

* Refactor setHeader

* MasterDetailContext

* RoomView header

* Fix isMasterDetail rule

* KeyCommands kind of working

* Create channel on tablet

* RoomView sCU

* Remove withSplit

* Settings opening as modal

* Settings

* StatusView headerLeft

* Admin panel

* TwoFactor style

* DirectoryView

* ServerDropdown and SortDropdown animations

* ThreadMessagesView

* Navigate to empty RoomView on server switch when in master detail

* ProfileView header

* Fix navigation issues

* Nav to any room info on tablet

* Room info

* Refactoring

* Fix rooms search

* Roomslist commands

* SearchMessagesView close modal

* Key commands

* Fix undefined subscription

* Disallow navigate to focused room

* isFocused state on RoomsListView

* Blur text inputs when focus is lost

* Replace animation

* Default nav theme

* Refactoring

* Always open Attachment with close modal button

* ModalContainer backdrop following themes

* Screen tracking

* Refactor get active route for in-app notification

* Only mark room as focused when in master detail layout

* Lint

* Open modals as fade from bottom on Android

* typo

* Fixing tests

* Fix in-app update

* Fixing goRoom issues

* Refactor stack names

* Fix unreadsCount

* Fix stack

* Fix header animation

* Refactor ShareNavigation

* Refactor navigation theme

* Make sure title is set

* Fix create discussion navigation

* Remove unused variable

* Create discussions from actions fixed

* Layout animation

* Screen lock on share extension

* Unnecessary change

* Admin border

* Set header after state callback

* Fix key commands on outside stack

* Fix back button pressed

* Remove layout animations from Android

* Tweak animations on Android

* Disable swipe gesture to open drawer

* Fix current item on RoomsListView

* Fix add server

* Fix drawer

* Fix broadcast

* LayoutAnimation instead of Transitions

* Fix onboarding back press

* Fix assorted tests

* Create discussion fix

* RoomInfoView header

* Drawer active item
2020-06-15 11:00:46 -03:00
Djorkaeff Alexandre c0c4affd80
[IMPROVEMENT] Refactor icon package (#2146)
* [IMPROVEMENT] Refactor Icon Package

* some size fixes
2020-06-05 10:28:58 -03:00
Diego Mello ce51982bb0
Update all dependencies (#2008)
* Android RN 62

* First steps iOS

* Second step iOS

* iOS compiling

* "New" build system

* Finish iOS

* Flipper

* Update to RN 0.62.1

* expo libs

* Hermes working

* Fix lint

* Fix android build

* Patches

* Dev patches

* Patch WatermelonDB: https://github.com/Nozbe/WatermelonDB/pull/660

* Fix jitsi

* Update several minors

* Update dev minors and lint

* react-native-keyboard-input

* Few updates

* device info

* react-native-fast-image

* Navigation bar color

* react-native-picker-select

* webview

* reactotron-react-native

* Watermelondb

* RN 0.62.2

* Few updates

* Fix selection

* update gems

* remove lib

* finishing

* tests

* Use node 10

* Re-enable app bundle

* iOS build

* Update jitsi ios
2020-05-08 13:37:49 -03:00
Diego Mello 6982d7676a
[NEW] Two Factor authentication via email (#1961)
* First api call working

* [NEW] REST API Post wrapper 2FA

* [NEW] Send 2FA on Email

* [I18n] Add translations

* [NEW] Translations & Cancel totp

* [CHORE] Totp -> TwoFactor

* [NEW] Two Factor by email

* [NEW] Tablet Support

* [FIX] Text colors

* [NEW] Password 2fa

* [FIX] Encrypt password on 2FA

* [NEW] MethodCall2FA

* [FIX] Password fallback

* [FIX] Wrap all post/methodCall with 2fa

* [FIX] Wrap missed function

* few fixes

* [FIX] Use new TOTP on Login

* [improvement] 2fa methodCall

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
2020-04-01 17:32:24 -03:00
Sarthak Pranesh 779cacbe3e
[FIX] Show proper error message on profile (#1768)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-03-17 13:26:32 -03:00
Diego Mello 005e1ac46b
[FIX] Detox tests (#1790) 2020-03-03 17:27:38 -03:00
Tanmoy Bhowmik d271e56b2b
[IMPROVEMENT] Honor profile fields edit settings (#1687)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-02-20 15:26:42 -03:00
Diego Mello 3683b8936a
[IMPROVEMENT] Use reselect (#1696) 2020-02-11 11:09:14 -03:00
Bernard Seow 71bcef1510 [FIX] Profile fields automatically reset (#1502) 2020-01-28 10:40:22 -03:00
Diego Mello 7b51df377d
[NEW] Themes (#1298) 2019-12-04 13:39:53 -03:00
Djorkaeff Alexandre a0dc2bad4a [NEW] Tablet support (#1300) 2019-11-25 17:01:17 -03:00
Diego Mello 447b48360f
[FIX] ProfileView input navigation error when custom fields aren't set (#1383) 2019-11-13 16:53:20 -03:00
Diego Mello 121ff45f90
Revert react-native-safe-area-view (#1265) 2019-10-02 09:18:08 -03:00
Djorkaeff Alexandre 1c22cc2f9f [CHORE] Update react-native-safe-area-view (#1219) 2019-09-26 13:52:22 -03:00
IlarionHalushka 59a71ffaef [CHORE] Bugsnag logging setup (#1145)
* initial bugsnag setup

* upload sourcemaps to bugsnag during ios-build job

* fix: spacing in config.yml

* add yarn global add react-native

* add separate step: Upload sourcemaps to Bugsnag

* add brew install watchman

* install react-native-cli, remove install watchman

* upload source maps for android build

* add yarn add global react-native react-native-cli for android-build ci job

* add working_directory to android-build

* install npm i -g react-native react-native-cli

* add Install Node step to android-build job

* export path to node to bash_profile

* add step Install React Native CLI to android build job

* use yarn generate-source-maps in ci; exchange firebase log -> bugsnag log

* implement send(toggle) crash reports button

* move BUGSNAG_API_KEY to config file; remove generated source maps files

* unlink bugsnag

* add ios/Pods files connected to Bugsnag; fix ci android build job

* export firebase analytics also from /utils/log

* use `log(e)` instead of `log(error)`

* API Key changes

* pod install

* Fix iOS build

* Simulate error

* lint

* Add navigation

* Use projectRoot

* Revert project root

* - Don't run on forks
- Upload dSYMs

* Remove error sim

* Remove automatic dSYMs upload

* Remove fastlane-plugin-bugsnag
2019-08-23 10:18:47 -03:00
Diego Mello ba232547f1
[CHORE] Update to react-native 0.60.4 (#1095)
* Update to 0.59.10

* stash

* stash

* patch RN

* Try to fix openURL

* Fix compile Share Extension

* Minor fixes

* build ios

* tracking view working and added postinstall

* SafeAreaView vertical never

* tracking view patch

* Android build working

* Android notifications working

* Lint and tests

* Fix android build

* Add tools:replace="android:appComponentFactory"

* Android build

* Update vector icons

* Update webview

* Remove jsc

* Update document picker

* Firebase

* jetify on postinstall

* Patch expo-haptics

* CI

* Migrate packages manually

* Disable ci cache

* Revert "Disable ci cache"

This reverts commit 4740d861021f667f0223d7351a1da6f90cc2e417.

* CI

* audio

* adapter

* notifications

* Try RN directly

* Fix gradle

* Revert patches

* Restore cache

* update redux and lodash

* eslint-config-airbnb@17.1.1 eslint-plugin-jsx-a11y@6.2.3

* ejson@2.2.0 react-native-webview@6.7.0 semver@6.3.0 snyk@1.210.0

* codecov@3.5.0 eslint-plugin-react@7.14.3 eslint-plugin-react-native@3.7.0 react-dom@16.8.6

* Update react-redux and remove decorators

* Update redux-saga and reactotron libs

* Husky

* Storybook libs

* react-native-webview@6.8.0 markdown-it-flowdock@0.3.8 react-native-unimodules@0.5.3

* Removed regenerator-runtime

* react-native-picker-select

* react-navigation-header-buttons

* Remove comments

* react-native-notifications

* Fix rnn android build
2019-08-07 10:51:34 -03:00
pranavpandey1998official aac6da34af [IMPROVEMENT] Reusable toast (#1065) 2019-07-23 11:02:57 -03:00
IlarionHalushka dad18219dd [BUG] Profile screen gets frozen when submitting invalid current password (#974)
* fix 968: [BUG] Profile screen gets frozen when submitting invalid current password

* revert changes to yarn.lock

* remove unnecessary line

* revert changes to yarn.lock

* revert changes to yarn.lock
2019-06-21 13:38:26 -03:00
IlarionHalushka 109a247c8d [FIX] Profile update (#955) 2019-06-05 13:29:07 -03:00
Diego Mello a148e6d15d
[FIX] Analytics error events (#930) 2019-05-28 13:18:46 -03:00
Diego Mello 9e4a4d2454
[CHORE] Use react-native-firebase (#928)
We need to migrate from deprecated react-native-fabric to react-native-firebase.
This PR enables following Firebase features:
* Analytics
* Crashlytics
* Performance

It also tracks screen view without the necessity of HOC.

Future work:
I won't do it in this PR because it's large enough, but we need to log more app events, like 'sent_message', 'open_admin', 'media_upload', etc.
2019-05-28 10:03:08 -03:00
Diego Mello 28628b4dba
Switch toast lib (#898)
* removed toast from ios

* changed showToast to showAlert

* removed from android

* fix lint

* conflict resolved

* fixed lint

* Fix toast position

* Change toast style

* Use followMessage from rest

* Temporary disable some visual toast tests

* Unnecessary lib version change
2019-05-15 16:33:30 -03:00
Diego Mello 0266cc2e01
Room item layout (#835) 2019-04-18 17:57:35 -03:00
Diego Mello 9e107bfdf6
Room item layout (#771) 2019-03-29 16:36:07 -03:00
Diego Mello 38dabfc9ff
Switch to react-navigation (#687) 2019-03-12 13:23:06 -03:00
Diego Mello a139cc83e5
New icons (#643)
* New Icons

* Remove unused assets

* Change send icon

* Layout tweaks

* Refactor Status

* Styles changed

* User layout fix

* Separator layout changes

* Sidebar status layout fix

* Fix Message.onLongPress issue

* Fix code markdown
Closes https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/625

* Status lint

* Fix tests

* Navigation debounce

* RoomActions icons

* Space between components

* Group text

* Update tests
2019-03-01 13:49:11 -03:00
Diego Mello f3ddf60a57
Remove drawer (#653)
* Remove drawer (layout needs to be changed in future releases, though)
* Don't navigate outside on logout if there's other logged server
* Update react-native-navigation
2019-02-27 11:26:40 -03:00
David Lougheed e5930cc0fe [FIX] Load avatar on servers that prevent unauthenticated avatar access (#604)
App would show an empty space on servers that require authentication on avatar access
2019-02-07 17:58:20 -02:00
Diego Mello 0f516083f4
Add Icons class (#611)
Creates Icons class to manage when to load icons from native side or react-native-vector-icons.
It also fixes `react-native run-android` #517
2019-02-07 14:04:41 -02:00
Diego Mello d5a285f85e
Create class to manage navigation (#594)
* Add Navigation class

* Place Drawer.js logic inside of Navigation

* Load less views at startup
2019-01-31 14:08:38 -02:00
Diego Mello 754508c2d9
Update dependencies (#587) 2019-01-29 17:52:56 -02:00
Diego Mello d23c055584
Unnecessary re-renders removed (#570)
* shouldComponentUpdate

* Rooms list shouldcomponentupdate

* RoomView shouldComponentUpdate

* Messagebox and Message shouldComponentUpdate

* EmojiPicker shouldComponentUpdate

* RoomActions shouldComponentUpdate

* Room info shouldComponentUpdate

* Update RNN

* Use only one Flatlist if none group filter is selected

* Update fix

* shouldComponentUpdate

* Bug fixes

* ListView changes

* Bug fix

* render list bug fix

* Changes on public channels

* - RoomView saga leak removed
- Join room e2e tests added

* Rest versions

* Method call versions

* Min RocketChat version alert
2018-12-21 08:55:35 -02:00
Diego Mello ad37586065
Use Rest API pt 2 (#568)
* Room files

* Pinned messages

* Starred messages

* Mentioned messages

* Search messages

* Bug fixes

* Profile

* Livechat

* Block/unblock user

* Erase room

* Archive room

* Remove unused method

* Bug fix
2018-12-12 13:15:10 -02:00
Diego Mello e66dbd8ca3
[FIX] Android stuck on splash screen after hardware back button is pressed (#550)
* [FIX] Android stuck on splash screen after hardware button is pressed

* Fix empty user at asyncstorage

* Remove unused subscribe
2018-11-27 17:40:53 -02:00
Diego Mello c6fcfb63fd
[WIP] New Authentication layout (#536)
New Authentication layout
2018-11-14 19:42:03 -02:00