Commit graph

44 commits

Author SHA1 Message Date
Mattermost Build
d4e405485b
Do not preload images with FastImage (#4315)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-05-20 16:17:49 -04:00
Elias Nahum
d3a6e166ad
MM-15758 Update dependencies including Fastlane (#4272)
* Update dependencies including Fastlane and disable Flipper on iOS

* Remove EventEmitter for previous doc-viewer

* Fix android crash when setting more channels buttons

* Downgrade fuse.js

* Upgrade deps to latest

* Update Podfile.lock

* Downgrade RNN to 6.4.0

* QA Review #2

* Upgrade fuse.js to 6.0.0
2020-05-18 11:24:47 -07:00
Elias Nahum
9af108026e
MM-24285 Use FastImage instead of Image (#4218)
* Enable ESLint no-unused-vars

* Use FastImage instead of Image

* Update fast-image patch to support multiple cookies

* Fix ESLint errors

* Have jest run timers for post_textbox tests

* Feedback review

* Update snapshots
2020-04-28 23:23:39 +08:00
Miguel Alatzar
7afa9aed01
[MM-23698] [MM-19559] Remove redux-offline and updated redux-persist (#4120)
* Remove redux-offline and configure redux-persist

* Fix typo

* Fix configure store

* Upgrade to redux-persist 6.0.0

* Add migration from redux-persist v4 to v6

* Replace AsyncStorage with MMKVStorage to boost storage speed

* Mock RNFastStorage

* Fix reactions test

* Fix clearing the store on logout

* Remove the need for LOGOUT_SUCCESS

* No need to pass persistConfig to middlewares()

* Remove unused imports

* Export connection

Accidentally removed this export.

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Fix delete post

* Fix leave channel

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-08 13:44:54 -07:00
Miguel Alatzar
ee4b85edcf
[MM-23520] Port mattermost-redux (#4088)
* Remove mattermost-redux

* Move mm-redux files into app/redux

* Add @redux path to tsconfig.json

* Fix imports

* Install missing dependencies

* Fix tsc errors

* Fix i18n_utils test

* Fix more imports

* Remove redux websocket

* Fix tests

* Rename @redux

* Apply changes from mattermost-redux PR 1103

* Remove mattermost-redux mention in template

* Add missing imports

* Rename app/redux/ to app/mm-redux/

* Remove test file

* Fix fetching Sidebar GM profiles

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-31 11:09:26 -07:00
Elias Nahum
10d433cfab
Port WebSocket from mm-redux and batch actions (#4060)
* Port WebSocket from mm-redux and batch actions

* Update mm-redux and fix tests

* Change action name

* Naming batch actions

* Fix unit tests

* Dispatch connection change only if its different

* Remove comment

* Add Lint to TypeScript and fix linting errors

* Add WebSocket Unit Tests

* Revert from unwanted RN 0.62
2020-03-26 21:23:50 -03:00
Elias Nahum
334a07aabe
Performance improvements (#3911)
* Improve sidebar performance on first load

* Initial work for switch channel

* Revert android changes

* Split Sidebar per Platform

* Fix waitForHydration executing the callback more than once

* Fix custom emoji not showing on Android

* Finalize Channel Switch

* Enable Android Ram Bundles

* Select the right team for lastChannelForTeam

* Channel loading post indicator

* Fix main sidebar base intl provider

* Update mm-redux

* No need to request configAndLicense on launch

* Load channel member roles

* Rename closeChannelDrawer to closeMainSidebar

* do not throw errors when console is called while running tests

* constant for LOADING_POSTS_HEIGHT

* Remove show more if a long post is edited and no longer long

* Update mm-redux#batch-actions branch

* Code review

* Clear notifications if channel was switched

* Import Platform

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-02-17 21:18:09 -07:00
Miguel Alatzar
d25561bb83 [MM-21888] Don't use localPath when it's the share extension cache dir (#3845)
* Don't use localPath when it's the share extension cache dir

* Move android pasted images to cache image folder

* Use Files.move instead of FileInput / FileOutput stream

* Remove commented code and not needed imports
2020-01-27 13:58:30 -03:00
Elias Nahum
7c09334dc4
Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Nick Brady
a0c5ad5c2b MM-18530 - Update Main Sidebar on iOS (#3622)
* initial working code

* minimum changes for main sidebar working

* add settings sidebar back in

* fix visual bug with sidebar showing underneath

* fix bug for android

* cleanups

* minor cleanups and update snapshot

* add basic test

* fix style errors

* review changes
2019-12-04 15:19:50 -03:00
Elias Nahum
59c8cbed55 MM-20780 MM-20782 Clear cookies on logout (#3645) 2019-12-03 08:33:09 +08:00
Miguel Alatzar
04210b8a14 [MM-19968] Ensure SELECT_CHANNEL_WITH_MEMBER is dispatched when app opened from a push notification (#3533)
* Dispatch SELECT_CHANNEL_WITH_MEMBER

* Call handleSelectChannel with true when from any push notification

* Always dispatch SELECT_CHANNEL_WITH_MEMBER with passed channelId

* Add missing comma

* Update unit tests

* Fix makrChannelViewedAndRead call
2019-11-12 17:45:11 -05:00
Miguel Alatzar
1efb01deda
[MM-16593] Upgrade to RN 0.61.2 (#3455)
* [MM-16593] [MM-17175] [MM-17164] [MM-17189] [MM-17181] Android - Upgrade to RN 0.60 (#3145)

* Upgrade to react-native 0.60

* Use @sentry/react-native

* Manually link @sentry/react-native

* Address review comments

* Jetify after install

* Call jetify from node_modules

* [MM-17785] iOS - Upgrade to RN 0.60 (#3153)

* Upgrade to react-native 0.60

* Use @sentry/react-native

* Manually link @sentry/react-native

* Address review comments

* Jetify after install

* Call jetify from node_modules

* Get app building for iOS

* Revert react-native-image-picker upgrade

* Minor version upgrade of react-native-image-picker

* [MM-17142] Convert all string refs to callbacks (#3217)

* Replace string refs

* Fix tests

* Don't use inline functions

* Fix mattermost-redux reversion from master merge

* [MM-18336] Upload Sentry debug symbols only when SENTRY_ENABLED is true (#3227)

* Upgrade @sentry/react-native

* Run Sentry gradle tasks only when enabled

* Upgrade @sentry/react-native and remove extra Sentry build phase

* [MM-17144] Use Hermes (#3226)

* Replace string refs

* Fix tests

* Don't use inline functions

* Fix mattermost-redux reversion from master merge

* Use Hermes

* bundleCommand ram-bundle no longer needed

* Require harmony-reflect only for Android

* Fix failing test

* Path react-native's splitLayoutProps (#3337)

* [MM-18867] [MM-17186] [MM-18866] [MM-19447] [MM-18967] Upgrade to RN 0.61.2 (#3423)

* Upgrade to RN 0.61.2

* Update rn-fetch-blob commit hash

* Update react-native-keyboard-tracking-view commit hash

* Use react-native-youtube with AVPlayer fix

* Fix jest mocks

* Use updated document picker API

* Remove unnecessary linking

* Revert "MM-17759 Add code highlighting (#3072)"

This reverts commit 26b999e885.

* Fix share extension

* Revert "Revert "MM-17759 Add code highlighting (#3072)""

This reverts commit 52aca776b12dee3abe8646d0c90480f8528e86c1.

* Address PR reviews

* Rename patch to match version

* Update react-native-youtube patch

* Update dependencies

* Fix RNDocViewer reference

* Update tests and revert to redux-persist 4.10.2

* Revert "Revert "Revert "MM-17759 Add code highlighting (#3072)"""

This reverts commit 5ef383be2619b1be6167c23f128ecb4b4ad25df9.

* Android fixes after dep upgrades

* Use fresco 2.0.0

* Use mattermost forks

* Use React-Core in Mattermost.scheme instead of react

* Remove packager (#3452)

* Remove Pods from source control

* Fix unit tests

* Add new line before entering the keystore in gradle.properties

* set ios as working directory for cocoapods

* Cache cocoapods on circleCI builds

* set ios as working dir

* fix cocoapods cache key

* Unify fastlane and npm dependencies command

* Use package-lock.json checksum for npm cache

* Fix package.json and use the checksum as the cache key

* Fix package.json and use the checksum as the cache key

* changes to circleci.yaml fastlane and removing pods from git

* Fix Mattermost.xcodeproj

* Update coocoapods to 1.7.5 and fix xcode header search paths

* Update package-lock.json

* Remove unused tooltip component

* Fix incorrect ref

* Disable Hermes (#3460)

* Revert "Remove packager (#3452)"

This reverts commit b2a79e184b3242124dfdb91ae095f6ce3f4eb986.

* Disable Hermes :'(

* Update preloaded modules

* Fix packages moduleNames and modulePaths, update snapshots and update mm-redux (ts version)

* remove document picker from modulePaths

* Fix package-lock.json

* Add eslint disable rules
2019-10-28 15:04:24 -07:00
Miguel Alatzar
459801d10b
[MM-17560] Await dismissAllModals and popToRoot prior to calling showSearchModal (#3298)
* Patch react-native-navigation

* Make navigation actions regular functions

* Fix unhandled promise rejection warning

* Missing semicolons

* Mock navigation actions

* Add unit tests for navigation actions

* Place all patches in patches directory

* Fix channel_info snapshot test
2019-09-25 15:23:45 -07:00
Miguel Alatzar
faf97f9945
Ensure onAppStateChange runs only after GlobalEventHandler is configured (#3268) 2019-09-18 09:59:52 -07:00
Ewe Tek Min
f6c9c950c5 MM-12879 Fix iOS photo/camera permission denied prompt (#2904)
* Update Github issues link

* Update GH issue to permalink

* Add missing comma

* Fix ios not prompting alert after denied photo or camera permission

* Rename permission var

* Update text

* Change to correct text

* Update text for attachement button

* Update text for image_preview

* Fix test

* Integrate react-native-android-open-settings for storage permission denied

* Move react-native-android-open-settings

* Change all default permission denied message

* Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit 65187f8f98de4943103bdab4b39bd7e1ebd5a220, reversing
changes made to daca425676503a57936a5539b5b5fa68a6c5427e.

* Revert "Revert "Merge remote-tracking branch 'upstream/master'""

This reverts commit c82fa628d5addc1262353539c32b76c6a1130e83.

* Add NSPhotoLibraryAddUsageDescription description

* Fix bad import

* Lazy load react-native-android-open-settings

* Fix indent
2019-09-11 01:18:53 -03:00
Elias Nahum
223bd64a43
[MM-18349] Post menu delay animation speed and haptic feedback (#3214)
* Animate backdrop opacity in slide up panel

* Set delayLongPress to 75ms for post

* Add haptic feedback on slide up of post options

* Ease in slide up animation

* Add haptic feedback to android

* reduce long press delay for post options menu

* helper function for haptic feedback

* Add haptic feedback when opening post options menu

* Patch haptic feedback RN module on Android

* Fix tests

* Move hapticFeedback call to SlideUpPanel

* Decrease long press time for reaction
2019-09-07 07:45:07 +09:00
Elias Nahum
1d37c81163 Fix tests (#3114) 2019-08-13 09:51:51 -07:00
Elias Nahum
e87858d7af Various fixes (#3078)
* MM-17588 Remove navigation component from stack

* MM-175986 Fix Clock Display Settings on iOS

* Fix markdown and team icon currentServerUrl

* Fix closing permalink logs out the user

* Fix file attachment document ref

* Fix applyTheme when changing a theme in the app

* Feedback review

* remove / when fetching the image on the markdown table on relative paths
2019-08-08 22:28:07 +08:00
Miguel Alatzar
9a894641fc
[MM-14926] Include in-app notifications in iOS badge number (#3001)
* Include in-app notifications in iOS badge number

* Make foreground notifications key a const
2019-07-24 07:58:15 -07:00
Harrison Healey
fcd9e401f5 MM-15582 Don't show forgot password link without email/username login (#2811) 2019-05-22 11:55:27 -04:00
Elias Nahum
08df256c1d MM-14921 Fix iPad layout including safeAreaInsets (#2748)
* MM-14780 and MM-14921 Fix iPad layout including safeAreaInsets

* Fix unit tests
2019-05-03 17:42:32 -04:00
Miguel Alatzar
19c493ff6e
[MM-15401] Fix setting of extension when caching files (#2762)
* Get extension from Content-Disposition first

* User ImageCacheManager.cache over getCacheFile

* Add unit tests for ImageCacheManager.getCacheFile

* Add unit tests for ImageCacheManager.cache

* Use exports and require to be able to mock isDownloading

* Chain mockReturnValueOnce calls

* Fix getExtensionFromContentDisposition and its unit tests
2019-05-03 09:24:40 -07:00
Elias Nahum
88f5848850
Dependencies update (#2576)
* Dependencies update

* Fix WebView

* Update to RN 0.58.5 and include the WebSocket fix

* Update react-native-video

* Fix RNFetchBlob
2019-02-20 17:17:04 -03:00
Elias Nahum
2184696e65
post menu and file attachments (#2414)
* post menu and file attachments

* Fix post list selector test

* Use new Gesture handler to avoid gesture conflicts in post menu and reaction list

* Allow reaction list to scroll the header on Android

* Feedback review

* Add some comments

* Fix eslint
2018-12-05 14:59:41 -03:00
Elias Nahum
9a5122c19c
Slide up panel for reaction list (#2285)
* Slide up panel for reaction list

* Feedback review

* UI Feedback review

* Feedback review

* Improve slide speed and fix end position

* Scroll to top when changing reaction view

* dismiss modal without animation so backdrop does not scroll down

* Smooth animation to show/hide

* Change animation speed
2018-11-02 13:21:43 -03:00
Sudheer
1b54e1ebe3
Fix for LHS populating you next to current user (#2263)
* Fix for LHS populating you next to current user

* Add test cases
 * Refactor to use avaiable props conditions in component
   instead of passing flags from connector
2018-10-15 21:00:11 +05:30
Saturnino Abril
dd506d4c9f
fix issue that blocks adding test for thread screen (#2221) 2018-10-05 14:46:21 +08:00
Sudheer
5aac68e785 Change rn-fetch-blob to mock globally in jest (#2124) 2018-09-14 12:14:37 -03:00
Saturnino Abril
059db1a788
fix warnings in running jest test (#2087) 2018-09-07 23:05:35 +08:00
Saturnino Abril
8a152ac1e7 convert test runner from mocha to jest (#1637) 2018-04-30 10:55:01 -04:00
Elias Nahum
80dd9366a1 Update Dependencies (#1641)
* Update dependencies including react-native

* Update react-native-circle-progress dependency

* Fix prop warnings and possible crashes
2018-04-27 17:49:09 -04:00
enahum
70c4e3e005
iOS Share Extension (#1308)
* objective-C share extension

* MattermostBucket module to share data between the main app and the extension

* middleware that shares the data between the main app and the extension

* Fix setState when safe area in unmounted

* Share extension for iOS

* Fastlane changes to include iOS share extension

* Fix unit test

* Feedback review

* define proptypes for icons
2018-01-15 16:11:42 -03:00
Chris Duarte
2e951cbfca Upgrade to RN 0.50.4 (#1303)
* Update to RN 0.50.4

* Fix intl context in post textbox
2017-12-22 19:39:51 -03:00
enahum
bc1554e1bd
Add Document and Video previews (#1170)
* Video file previewer

* Document preview support

* Fix tests

* Feedback review

* feedback review 2

* feedback review 3

* Fix video_controls copyright

* Fix mime undefined
2017-11-20 18:28:20 -03:00
Chris Duarte
e49f89d727 Add better network detection (#1054)
* Add better network detection

* Mock NetInfo for store
2017-10-24 19:43:22 -03:00
enahum
4995a76f2c Add Landscape support for both platforms (#909)
* Landscape support

* Fix image rotation on Android

* Fix landscape mode for login and login options

* Fix previewer will receive props

* Move device dimensions and others to redux

* Fix unit tests

* Include orientation and tablet in the store
2017-09-20 12:54:24 -07:00
enahum
0628cbc693 Upgrade to RN 0.48.3 (#911)
* Upgrade to RN 0.48.1

* Update deps to be exact

* Fix tests

* Remove unneeded code from setup and add socketcluster dep

* Fix drawer pan issue

* Fix bridge issues on iOS

* Upgrade to RN 0.48.3

* Search to use RN SectionList
2017-09-18 12:01:47 -04:00
Harrison Healey
3ac7b48adc RN-289 Sentry integration (#873)
* Added JS code for Sentry

* Removed leftover initializeSentry call

* Added SentryOptions config setting

* Added native components for react-native-exception-handler

* Removed default props from ErrorText

* Moved where Sentry is initialized

* Added ios/sentry.properties to .gitignore

* Added linking react-native-sentry to Fastlane

* Fixed fastlane to include newlines in sentry.properties

* Moved to manually link react-native-sentry

* Captured redux errors with Sentry

* Redid how Sentry is optionally compiled to be simpler

* Added Sentry middleware to create redux breadcrumbs

* Added Sentry tags for server version

* Initialize Sentry when testing

* Fixed string replacement for SentryEnabled in fastlane

* Added react-native-sentry to NOTICE.txt
2017-09-01 14:50:17 -03:00
Chris Duarte
2638a9c75d PLT-5517 Image file previewer (#344)
* PLT-5517 RN: Image file previewer

Add preview component and client routes
Add fade transition for modal
Add paging controls, title header, and info footer
Add drag to dismiss behavior
Fix android layout issues
Handle orientation change

* Fix tests

* Review feedback

* Review feedback
2017-03-17 09:04:35 -04:00
Chris Duarte
1e63ac2667 PLT-5599 RN: Modal options for Android (#353) 2017-03-16 15:13:36 -04:00
enahum
c13a436d18 Enable SAML authentication (#325)
* enable saml authentication

* Fix unit tests

* Fix android cookies

* Feedback review
2017-03-09 14:07:18 -03:00
enahum
51e8ee6ea2 More Direct Messages scene (#244)
* More Direct Messages scene

* Adding search_bar.js to mock tests

* Feedback review

* Address feedback review 2
2017-02-14 11:49:41 -05:00
Chris Duarte
ce58429a21 Reworking navigation (#212)
* Reworking navigation

* Fixed navigation testing and lint errors
2017-02-02 16:13:25 -05:00