Commit graph

219 commits

Author SHA1 Message Date
Elias Nahum
0504a962a1
MM-22379 & MM-22598 Boost perf by using FastImage cache in favor of ImageCacheManager (#3971)
* MM-22379 & MM-22598 Boost perf by using FastImage cache in favor of ImageCacheManager

* Code review
2020-02-27 16:29:51 -03:00
ami9000
30594cec5d
MM-12148: Prevent emdash convert in a Code Block on ios (#3885)
* Add fix to prevent emdash autocorrect in a Code Block on ios

* Add fix to prevent emdash autocorrect in a Code Block on ios

* code clean up

* separate to new switchKeyboardForCodeBlocks function

* added emdash prevention to edit_post and also code cleanup

* moved keyboardType logic to its own utils function and added unit tests

* clean up - align event argument names

* removed unnecessary event check
2020-02-26 20:51:53 -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
Elias Nahum
696d6eef08
Re-enable ram-bundles (#3907) 2020-02-10 11:20:45 -07:00
Miguel Alatzar
e62c9b7a6d
[MM-21074] Handle iOS reply action on native side (#3884)
* Handle iOS reply action on native side

* Make linter happy

* Revert rn vector changes to .pbxproj
2020-02-04 08:49:26 -07:00
Miguel Alatzar
a8f0314067
[MM-22078] [MM-22083] Sort emojis in EmojiPicker (#3865)
* Sort emojis in EmojiPicker

* Pass search term to compareEmojis

* Sort emojis that include search term first

* Fix sorting

* Handle compareEmojis without search term

* Return doDefaultComparison

* Check includes only if needed

* Make linter happy

* Use doDefaultComparison
2020-01-28 15:04:59 -07:00
Amit Uttam
99a551df6d
Handle links with no server URL provided (#3862)
Default to current server or site URL.

Example case: `<jump to convo>` links generated from autolink plugin have their server/site URL stripped, and it is assumed that generated links are relative to the current server.

Conversation: https://community.mattermost.com/core/pl/78j4a7ozupbci8qxwx1sczc1ua
2020-01-28 09:14:57 -03:00
Amit Uttam
331cfcc372 Set default app scheme to mattermost (#3827)
Was originally set to `mattermost-beta` as per #3767 .
2020-01-20 16:14:19 -03:00
Elias Nahum
7c09334dc4
Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Amit Uttam
a5330bc08f
MM-21369 Require server/site URL for deep links (#3770)
**Old (only worked without serverURL or siteURL)**

Beta
* `mattermost-beta://<teamname>/channels/<channelname>`
* `mattermost-beta://<teamname>/pl/<permalinkID>`

Release
* `mattermost-mobile://<teamname>/channels/<channelname>`
* `mattermost-mobile://<teamname>/pl/<permalinkID>`

**New working deep link patterns**

Beta
* `mattermost-beta://<server-or-site-URL><teamname>/channels/<channelname>`
* `mattermost-beta://<server-or-site-URL><teamname>/pl/<permalinkID>`
* `mattermost-beta://https://<server-or-site-URL><teamname>/channels/<channelname>`
* `mattermost-beta://https://<server-or-site-URL><teamname>/pl/<permalinkID>`

Note: Transport protocol (http, https, etc.) is optional.

Release
* `mattermost-mobile://<server-or-site-URL><teamname>/channels/<channelname>`
* `mattermost-mobile://<server-or-site-URL><teamname>/pl/<permalinkID>`
* `mattermost-mobile://https://<server-or-site-URL><teamname>/channels/<channelname>`
* `mattermost-mobile://https://<server-or-site-URL><teamname>/pl/<permalinkID>`

Note: Transport protocol (http, https, etc.) is optional.
2020-01-13 16:28:14 -03:00
Amit Uttam
a17983c1e4
MM-12215 Make deep link URL prefix configurable for Release/Debug (#3767)
Default deep link URL prefix: `mattermost-beta`

To set to `mattermost-mobile` (or anything else, for that matter) in production releases, set fastlane ENV var `DEEPLINK_PREFIX` to `mattermost-mobile`
2020-01-09 16:00:20 -03:00
Elias Nahum
a8e3b608ad Fix headers for ESR 5.9 (#3738)
* Fix headers for ESR 5.9

* check if reactions is defined to avoid a crash with servers without metadata
2019-12-19 21:33:28 -07:00
Nev Angelova
f6addb491b [GH-11437] Fix thumbs emoji sorting logic for mobile (#3633)
* [GH-11437] Fix thumbs emoji sorting logic for mobile

* Add unit tests

* Sort emojis in selector and handle string emojis

* Remove redundant serverVersion logic

* Fix typo in app/utils/emoji_utils.test.js

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>
2019-12-08 10:10:56 -03:00
Elias Nahum
59c8cbed55 MM-20780 MM-20782 Clear cookies on logout (#3645) 2019-12-03 08:33:09 +08:00
Elias Nahum
9096818003 MM-20778 Remove caption as part of the file path (#3646) 2019-12-03 08:12:53 +08:00
Elias Nahum
75e0854411 MM-20694 Fix race condition when the store has not rehydrated (#3610)
* MM-20694 Fix race condition when the store has not rehydrated

* Making waitForHydration re-usable
2019-11-27 08:03:50 -07:00
Harrison Healey
725e9a6985 Merge branch 'master' into mark-as-unread 2019-11-18 17:21:42 -05:00
CJ
0204722627
MM-19037 Updated Progressive Image Loader (#3414)
* MM-19037 Updated Progressive Image Loader

Set the return for the listener to return a null for hte loader images, stopping the component from thinking it had a loaded image on a failure.

Also enabled the thumbnail to make an additional attempt to load when it receives the null response.

* MM-19037 Updated Eslint

Eslint issue resolved

* MM-19037 Add Unit Tests

Added Unit tests

* empty commit
2019-11-17 23:35:44 -05:00
Harrison Healey
ef162ce403 Merge branch 'master' into mark-as-unread 2019-11-13 19:34:06 -05: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
Harrison Healey
1593c62750 Merge branch 'master' into mark-as-unread 2019-11-12 15:51:41 -05:00
Harrison Healey
ddea1dedbe MM-19812 Properly handle in-app update_badge notifications (#3531) 2019-11-11 12:46:24 -07:00
Miguel Alatzar
5360989336 [MM-19927] Fix launching app from push notification on iOS (#3527)
* Call getInitialNotification on configure

* Mock getInitialNotification
2019-11-07 14:47:52 -05:00
Maria A Nunez
8f4d5ad260 Reverted mention color to user linkColor (#3472) 2019-10-31 08:27:16 -07: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
Elias Nahum
64d22fd0f2 MM-18313 Fix update timezone automatically (#3462)
* MM-18313 Fix update timezone automatically

* add unit tests
2019-10-25 08:01:32 -07:00
Miguel Alatzar
5e5d3abd79 [MM-17145] [MM-18947] [MM-17110] [MM-14926] [MM-18646] Use patched v2.0.6 of react-native-notifications and fix Android badge number (#3382)
* Refactor custom push notification code

* Use react-native-notifications 2.0.6 and patch for scheduled notifs

* Fix patch

* iOS changes

* Fix delete

* Fix setting of badge number on Android

* Undo Reflect removal

* Undo removal of didReceiveRemoteNotification

* Use min importance for push notifs received while app is active

* Correctly set badge number after push notificaiton reply

* Fix tests

* Localize reply action text

* Add getDeliveredNotifications

* Fix identifier check and failing test

* Fix local push notif test for Android > 9
2019-10-22 21:18:59 +03:00
CJ
ca75e2407b MM-19286 Disable Haptic Feedback (#3402)
* MM-19286 Disable Haptic Feedback

Added a check for iOS version <=9 and for iPhones 5/6/SE versions that don't support haptic feedback.

* MM-19286 Fixed the Fix

Misread the repo for the haptic feedback so fixing the fix.

* MM-19286 Removed line in device.js

Removed line in device.js
2019-10-15 10:32:10 +03:00
Andre Vasconcelos
2f18a0b961 Fixing mention text color (#3372)
* Fixing mention text color

* Updating snapshots

* Update package-lock.json

* Adding highlight link color to other highlight types
2019-10-09 12:44:02 -07:00
Matheus Cardoso
26b999e885 MM-17759 Add code highlighting (#3072)
* Add code highlighting

* Fix code style

* Add unit tests

* Some layout adjustments and code style fixes

* Fix failing test

* Fix typo

* Fixed import style

* Update snapshot

* Fix test

* Remove comment

* Add react-native-syntax-highlighter to NOTICE.txt

* Remove duplicated key

* Fix color issue on Android

* Remove unnecessary style

* Fix top spacing on Android

* Add missing trailing comma

* Revert highlighting in Android full-screen code

* Fix margins on android full-screen code

* Fix top padding on Android full-screen code

* Fix font size on Android full-screen code

* Improve top spacing on iOS full-screen code

* Update package-lock.json

* Update package-lock.json

* Update react-native-syntax-highlighter

* Revert away code highlighting on Android code block
2019-09-30 22:52:45 +08: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
Elias Nahum
ecb9bde1fd MM-18740 Sync app badge number when opening a push notification (#3322) 2019-09-25 10:31:44 -07:00
Elias Nahum
114a18c16d
MM-18453 Use native emojis (#3260)
* MM-18453 Use native emojis

* Remove unnecessary else statement

* Add support for builtIn emojis

* Fix Native emojis snapshot tests

* Set emoji text style from StyleSheet

* Remove unneded version check and try/catch

* Add builtIn emojis as custom emojis in emojiPicker

* Simplify emojiPicker lists and fix jumping section headers

* Update snapshots
2019-09-25 12:27:47 +03:00
Andre Vasconcelos
7bd000d794 GH-11952 Adding option to convert public channel to private (#3230)
* Adding option to convert public channel to private

* Added unit tests, feedback alert with error handling, and new alert text

* Ensuring baseProps is never changed between channel_info tests

* Trimming the display_name on alerts

- Preventing extra empty spaces from being displayed on the alerts by trimming the variable
2019-09-23 18:39:15 -07:00
Eric Sethna
2c4764bc88 Update session expiry push notification text (#3211)
* Update session expiry text

* Calculate the session expires in days to be displayed in the local notification

* Feedback review
2019-09-16 12:01:10 -07:00
Devin Binnie
54acc584c3
[MM-18178] Removing caching of failed image loading attempts (#3231) 2019-09-10 12:45:41 -04: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
63066f4365
do not dispatch navigation actions when opening the app from a push notification (#3183) 2019-08-23 22:17:32 -04:00
Elias Nahum
405d3d4677
Update sentry (#3179) 2019-08-23 15:59:20 -04:00
Matheus Cardoso
73518da91e Make keyboard dark on dark themes (iOS only) (#3102)
* Support keyboardAppearance theme parameter

* Change approach of keyboardAppearance to auto-detect

* Fix style

* Update snapshots

* Add unit test for getKeyboardAppearanceFromTheme

* Update snapshot

* Fix failing test
2019-08-23 13:18:05 -04:00
Miguel Alatzar
ffbae7589f Apply setNavigatorStyles to all navigation components (#3121) 2019-08-15 02:00:21 +08: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
71e56120eb
[MM-17431] Remove flex for horizontalRule (#3079)
* Remove flex for horizontalRule

* Fix snapshot tests
2019-08-08 07:05:16 -07:00
Elias Nahum
f1ef6920f3
MM-17100 setCSRFFromCookie with subpath support (#3035) 2019-07-25 07:16:37 -04:00
Miguel Alatzar
ebe8d45711
[MM-16816] Parse source URI (#3026)
* Parse source URI

* Revert "Parse source URI"

This reverts commit 1cf421c9b9897e46881685aabebb793ad6ff4c07.

* Pass imageUri instead of defaultSource to ProgressiveImage

* Parse source URI in ImageCacheManager
2019-07-24 07:59:06 -07:00
Miguel Alatzar
76b4bf8262
[MM-14923] Add channel_id to failed push notification reply (#3014)
* Add channel_id to failed push notification reply

* Fix typo
2019-07-22 14:57:40 -07:00
Jesús Espino
ee93e4fa59
Adding guest accounts feature (#2990)
* MM-15059: Restict the permissions for guests (#2791)

* MM-15057: Adding guest badge to identify guest users (#2774)

* MM-15057: Adding guest badge to identify guest users

* Adding Guest tags in the channel title

* Adding i18n translations

* Adding DM and GM guest warnings

* Fixing check-style

* Adding and fixing tests

* Adding i18n text

* Only showing the subtitle when there is enough space

* Addressing new design changes

* Fixing eslint

* Addressing PR comments

* Moving getChannelStats to the handleSelectChannel action

* Adding the guest info in android landscape channel headers

* simplified the guest warning text generation

* Fixing i18n

* Fixing leaving channel behavior for guests (#2989)

* Fixing leaving channel behavior for guests

* Fixing tests and adding a new one

* fixing typo

* Addressing PR comments

* Addressing PR comments

* Fixing tests
2019-07-22 22:14:39 +02:00
Elias Nahum
b8af8a3860
Lazy android native modules (#2973)
* Lazy loading Android modules

* Remove react-native-bottom-sheet

* Remove comments

* npm audit fix

* Update rnn-v2 modals

* audit fix

* Fix tests
2019-07-17 11:06:21 -04:00
Miguel Alatzar
5eee2b7652
[MM-16139] [MM-16140] [MM-16141] Update the remaining screens/components (#2920)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Upate NotificationSettings

* Update NotificationSettingsAutoResponder

* Update NotificationSettingsMentions

* Update NotificationSettingsMobile

* Update CreateChannel and children

* Update MoreChannels

* Update ChannelPeek and children

* Update ChannelNavBar and children

* Update ChannelPostList and children

* Update ChannelInfo and children

* Update ChannelAddMembers

* Update ChannelMembers

* Update EditChannel

* Fix setting of top bar buttons

* Update Channel screen and children

* Update PinnedPosts

* Update LongPost

* Update PostOptions

* Update PostTextboxBase

* Update EditPost

* Check-styles fix

* Update DisplaySettings

* Update Timezone

* Update SelectTimezone

* Update IntlWrapper and Notification

* Update InteractiveDialog and children

* Update ExpandedAnnouncementBanner

* Update ClientUpgradeListener

* Update MoreDirectMessages

* Update SelectorScreen

* Update UserProfile

* Update Thread

* Update About

* Update ImagePreview

* Update TextPreview

* Update AddReaction

* Update ReactionList and children

* Update Code

* Update TermsOfService

* Update Permalink

* Update Permalink

* Update ErrorTeamsList

* Update Search

* Remove navigator prop

* Fix setButtons calls

* Remove navigationComponentId

* Fix test

* Handle in-app notifs in global event handler

* Fix in-app notification handling

* Fix typo

* Fix tests

* Auto dismiss in-app notif after 5 seconds

* Fix typo

* Update overlay dismissal

* Animate in-app notif dismissal and allow gesture dismissal
2019-07-08 10:03:31 -07:00
Miguel Alatzar
1b9b1e3f39 Merge branch 'master' into rnn-v2 2019-07-05 15:56:56 -07:00