Commit graph

1174 commits

Author SHA1 Message Date
Mattermost Build
449d7272d2
Apply flex style only to empty results (#4728) (#4729)
(cherry picked from commit ffb5213b3a)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-25 16:12:24 -07:00
Mattermost Build
a47b2a3831
Upgrade depdendencies (#4725) (#4727)
* @react-navigation/*
* react-native-navigation
* react-native-calendars
* react-native-gesture-handler
* react-native-reanimated
* react-native-safe-area-context
* react-native-screens
* react-native-video

(cherry picked from commit 183eec0fad)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-25 17:41:54 -04:00
Mattermost Build
075b99d48d
Fix soft crash for edge emoji formatting (#4705) (#4708)
(cherry picked from commit ea4e21de93)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-20 20:01:01 -04:00
Mattermost Build
031bac9863
Allow swipe to close the sidebar after search is cancelled (#4688) (#4697)
(cherry picked from commit 033cdfc459)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-18 18:23:11 -04:00
Mattermost Build
034a9400c5
MM-27711 Play YouTube video using expanded link (#4666) (#4685)
(cherry picked from commit d1d7b7f9d6)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-08-15 11:21:43 -04:00
Mattermost Build
abb93e9b3d
[MM-27139] Use file preview URL for images in post (#4656) (#4682)
* Use file preview URL for images in post

* Use getFilePreviewUrl for gallery as well

* But use getFileUrl for GIFs in gallery

(cherry picked from commit 304e3674c8)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-15 10:46:19 -04:00
Mattermost Build
ea0b24149c
MM-23739 Empty search state for emoji picker (#4641) (#4680)
* Returning a "no results for" default message

* Added styles & i18n text

* Updating icon to Octicons

* Replacing conditional render with ListEmptyComponent

* Running mmjstool sort

* Changing fontWeight, center layout, icon style

(cherry picked from commit c57c2f4245)

Co-authored-by: Andre Vasconcelos <andre.onogoro@gmail.com>
2020-08-15 10:23:08 -04:00
Elias Nahum
1805874740
Merge branch 'release-1.35' of github.com:mattermost/mattermost-mobile into release-1.35 2020-08-14 14:06:07 -04:00
Elias Nahum
10572d17ad
MM-26817 Upgrade to RN 0.63 (#4566)
* Upgrade to RN 0.63

* Bump to RN 0.63.1

* Fix RN patch

* Use JSC Intl version

* Update android/app/build.gradle

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Fix Android external storage permission

* Fix emoji imageUrl when no server url is present

* Patch react-native-image-picker

* Allow to post attachment only messages

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-14 14:05:23 -04:00
Mattermost Build
4ded73b927
[MM-26489] No need to decode file URI on Android (#4610) (#4673)
* Encode lone % chars

* No need to decode on Android

(cherry picked from commit 7c827fe319)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-14 11:02:12 -07:00
Miguel Alatzar
d6147d289b
Check for undefined channel (#4650) 2020-08-07 10:35:50 -04:00
Mattermost Build
798bb45782
[MM-27483] Fetch channel and member when loading from push notification (#4648) (#4649)
* Fetch channel and member

* Uncancel if unreadCount increased from 0

(cherry picked from commit 1084d38ecb)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-06 14:40:29 -07:00
Elias Nahum
46d7a17d4a
Fix edit post input text selection (#4647) 2020-08-06 17:23:53 -04:00
Miguel Alatzar
4992052fb0
Set results count to 0 (#4629) 2020-07-30 21:32:07 -07:00
Mattermost Build
c8854ba51e
[MM-27294] Allow returning to Channel screen without resetting the navigation root (#4619) (#4626)
* Add popDismissToChannel

* Use popToRoot + dismissAllModals

* Just dismissAllModals and popToRoot

* Revert unnecessary changes

* Close permalink on popToRoot

* Emit after dismissAllModals and popToRoot

(cherry picked from commit 1324bfd0bf)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-07-30 12:59:42 -07:00
Mattermost Build
838a52221f
Fix autocomplete after cache delete (#4623) (#4625)
(cherry picked from commit 9f98b943e7)

Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
2020-07-30 15:51:24 -04:00
Shota Gvinepadze
be2211a8cc Add analytics to the command autocomplete (#4597)
* Add analytics to the command autocomplete

* Refactor analytics

* Refactor reset method
2020-07-23 20:40:18 +04:00
Miguel Alatzar
f19701d704 Don't set state.inputValue in constructor (#4606) 2020-07-23 09:00:42 -07:00
Mattermost Build
1326fb53f2
Allow to post attachment only messages (#4594)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-20 18:08:00 -04:00
Mattermost Build
aafc68a0e6
Automated cherry pick of #4579 (#4592)
* Implement non-cached autocomplete for mobile

* Add partial caching support

* Fix whitespace

* Implement suggestion fetching using actions

Co-authored-by: iomodo <wineson@gmail.com>
2020-07-20 16:57:28 -04:00
Mattermost Build
01c796e441
Automated cherry pick of #4551 (#4587)
* Initial Commit for Group Highlights

* Fix some stuff

* Get my groups

* update channel.js

* Address PR comments

* Address PR comments

* Update app/actions/views/channel.js

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* update selector stuff

Co-authored-by: Hossein Ahmadian-Yazdi <hyazdi1997@gmail.com>
Co-authored-by: Hossein Ahmadian-Yazdi <hahmadia@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-07-20 10:30:38 -04:00
Hossein Ahmadian-Yazdi
fc815adaeb
[MM 23785] Show confirmation dialogue when mention groups 2 (#4548) (#4583)
* Show Confirmation Dialogue WIP First Commit

Show Confirmation Dialogue WIP Second Commit

refactoring according to comments

refactor code according to comments

Fix linting problems

add i18n strings

Update regex pattern

add test and make fixes

fix message not submitting

Fix linting

fix index.js

fix conflicts

address PR comments

address PR comments

single dispatch

Address PR comments

add test

* Show Confirmation Dialogue WIP First Commit

Show Confirmation Dialogue WIP Second Commit

refactoring according to comments

refactor code according to comments

Fix linting problems

add i18n strings

Update regex pattern

add test and make fixes

fix message not submitting

Fix linting

fix index.js

fix conflicts

address PR comments

address PR comments

single dispatch

Address PR comments

add test

* make some changes

* fix test failures

* Address PR comments

* Update app/mm-redux/types/channels.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Update app/mm-redux/selectors/entities/channels.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Update app/mm-redux/selectors/entities/channels.test.js

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Update app/constants/autocomplete.js

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Address PR comments

* make group mention mapping its own function

* Address PR comments

* Update app/components/post_draft/post_draft.js

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Merge branch 'master' of https://github.com/mattermost/mattermost-mobile into MM-23785-ShowConfirmationDialogue-2

* Merge branch 'master' into MM-23785-ShowConfirmationDialogue-2

* Address MM-26987

* Retrieve group information on mount  RN: Group Mention confirmation prompt not shown on default channel load

* Update Regex to fix MM-26976

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-17 12:30:43 -04:00
Miguel Alatzar
7c41c83196
[MM-26855] Ensure More Messages button works as expected when app is launched from a push notification (#4569)
* Fix more messages button with push notif

* Don't cancel in showMoreText
2020-07-16 11:25:40 -04:00
Miguel Alatzar
81dd01ba2c
[MM-21155] Fix typing animations (#4373)
* Fix typing animations

* Remove animations on unmount

* Remove obsolete rn-placeholder mocks

* Apply thread animation for Android

* No need to call scrollToInitialIndexIfNeeded

* Fix snapshot test

* Add context
2020-07-15 14:28:02 -07:00
Elias Nahum
cf8a67a7a5
MM-26946 Handle invalid YouTube links (#4571)
* Handle invalid YouTube links

* Fallback to default thumbnail
2020-07-15 15:20:47 -04:00
Elias Nahum
7db9c76a3f
MM-22029 clear the text input as soon as possible (#4536)
* MM-22029 clear the text input as soon as possible

* Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-07-14 18:58:11 -04:00
Elias Nahum
934dbfde17
Fix unhandled exception when current user is not defined (#4567) 2020-07-14 08:43:40 -07:00
Miguel Alatzar
f79f9dc697
[MM-23761] [MM-25766] Add "More Messages" button (#4526)
* Add more messages button

* Update existing tests

* Various fixes:

* Use viewAreaCoveragePercentThreshold over itemVisiblePercentThreshold
* Remove currentUserId check when adding New Message line to postIds and
  instead update the channel last viewed time when an own post is received

* Update snapshots

* Add showMoreMessagesButton prop and default to false

* Android fixes

* Add tests

* Localize more messages text

* Use FormattedText

* i18 extract

* Style fixes

* Account for network indicator

* Fix for failing tests

* Various fixes:

* Set the unreadMessageCount when POST_UNREAD_SUCCESS is dispatched
  with a positive deltaMsgs
* Hide the more messages button when the unread count decreases or
  when the new message line is removed shortly after loading the
  channel

* No need for POST_UNREAD_SUCCESS if we manually call onViewableItemsChanged

* Reset unread count if current channel on channel mount

* Animate text opacity

* Compare indeces to determine when scrolling has ended

* Fix opacity animation trigger

* try with scrolling to the last rendered item

* Add onScrollEndIndex

* Improve animations

* Don't track moreCount in state

* Use moreText over prevNewMessageLineIndex to determine firstPage

* Update intl message format and call cancel in componentDidUpdate when needed

* Fix intl format

* Remove opacity animation and countText

* Fix pressed not being reset

* No need to separate intl func

* Return after resetting

* Fix accidental removal of setState call

* Reset pressed when newLineMessageIndex changes

* Use default windowSize and lower POST_CHUNK_SIZE and delays

* Queue a cancel timer that gets cleared only when the newMessageLineIndex changes

* Define uncancel func

* Increase cancelTimer delay

* Subtract read posts from unread count and account for retry indicator

* Add retry bar indicator tests

* Use props.unreadCount

* Fix handling of newMessageLineIndex change

* Fix handling of newMessageLineIndex change take 2

* Fix handling of newMessageLineIndex change take 3

* Use 'native' TouchableWithFeedback with dark overlay

* Fix handling of manually unread

* Update chunk and window sizes

* Fix hsl

* Update text only when newMessageLineIndex/endIndex is reached

* Don't delay cancel if when no more unreads

* Fixes for when opening the app

* No need to process viewableItems when unreadCount is 0

* Remove line

* Don't show if unreadCount is 0

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-09 13:30:30 -07:00
Andre Vasconcelos
aa9e074a4c
MM-25956 Use new mobile modal style on Other User Profile (#4507)
* Changing other user profiles to be shown as modals

- Removed unnecessary props
- Updated user_profile unit tests
- Removed useless Platform.select call on channel_base

* Changed at_mention, channel_intro, and reaction_row profiles to modal
2020-07-09 08:34:42 +09:00
Hossein Ahmadian-Yazdi
b6eb3b9349
[MM-23158] Group Mentions & Invites - Display group mentions in suggestions list in the main channel textbox (#4118)
* groups in group mention

* fix sorting issues

* address PR comments

* fix tests

* Update groups.ts

* fix nock

* fix translations

* Adding test

* fix linting

* update redux functions

* Add license check

* adddress PR comments

* remove lodash import

* fix lint problems

* revert package.json changes

* Address PR comments

* address PR comments

* fix naming

* address PR comments

* address PR comments

* Address comments found in second PR

* getAllGroups updated

* address PR comments

* Update app/mm-redux/utils/group_utils.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* revert change

* remove unneeded actions

* Use correct server version

* MM-26631: Fix order of group displaying

* MM-26633: Fix group mentions not showing up in group constrained team

* MM-26636: Group mentions not updating when role updates

* MM-26637: Group name not updating right away

* Address PR comments

* TRY AND catch

* address PR comments

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-08 07:31:58 -04:00
Elias Nahum
13da814860
Fix LHS team icon on team switch (#4534) 2020-07-07 11:38:01 -04:00
Miguel Alatzar
2ccf2dc716
[MM-26077] Emoji autocomplete fixes (#4512)
* Use 0 height over null and move fuse

* Deconstruct props

* Update app/components/autocomplete/emoji_suggestion/emoji_suggestion.js

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Update app/components/autocomplete/emoji_suggestion/emoji_suggestion.js

* Update snapshot

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-02 10:24:19 -07:00
Elias Nahum
0f72bb34c2
MM-15719 Use metadata only to render post additional content (#4386)
* MM-15719 Use metadata only to render post additional content

* Default link to empty instead of undefined

* Feedback review
2020-06-29 11:28:07 -04:00
Elias Nahum
57e4b17ade
MM-25670 perform search when hitting Enter on HW keyboard (#4432) 2020-06-17 22:13:34 -04:00
Amit Uttam
e23c9084b2
MM-25350 Hide 'Select Team' title on modal when error occurs (#4412) 2020-06-17 20:55:18 -04:00
Rahim Rahman
e0d2fba243
[MM-18766] remove deprecated lifecycle methods from post components (#4270)
* [MM-18766] removed deprecated lifecycle methods from post components

* [MM-18766] update snapshot, seems like there was a bug

* [MM-18766] refactor getBestImageUrl -> getBestImageUrlAndDimensions

- refactor getBestImageUrl to take a single argument: props
- refactor getViewPostWidth to take a single argument: props

* [MM-18766] getDerivedStateFromProps was previously returning only first prop change

- fix issue if multiple props were modified at once.

* [MM-18766] removed FastImage.preload that was supposed to be removed in the last merge.

* [MM-18766] removed getDerivedStateFromProps

* [MM-18766] fix tests based on actual component being completely re-rendered rather than prop change.

* [MM-18766] cleaning up initial changes due to no longer using getDerivedStateFromProps method

- move back getBestImageUrl and getViewPostWidth from outside of components
- keep the renaming of getBestImageUrl
- remove the use of spread operator as it is also no longer needed

* [MM-18766] one of caller to getViewPostWidth is still passing this.props

- this is no longer needed
2020-06-15 10:11:21 -07:00
Andre Vasconcelos
55acf06c6d
MM-22852 Improve mobile modal style (#4198)
* Opening screens as 'pageSheet' for iOS

* Added pagesheet on more screens

- Search
- Edit Profile
- Recent Mentions
- FlaggedPosts

* Close sidebar when tapping new channel `+` icon

* Update search modal test to expect `pageSheet`

* Fixing search screen

* Making sure padding fix only applies to iOS

* Adjusting padding & height values for searchbar

* Adjusting padding & height values for searchbar (2)

* Changed default iOS modal to be pageSheet

* Fix test that failed due to changes in modal behavior

* Removing useless params from openModal function
2020-06-10 15:34:08 -04:00
Amit Uttam
446f95ff6b
MM-21368 Notify user when editing message that's too long (#4371)
* MM-21368 Notify user when editing message that's too long

* Disable 'Save' button to prevent edits from being posted
* Display error message specific to the message size and allows max, instead of the current, default "Invalid Message" error.

* Split message length error into text (left justified) and counts (right justified)

UX guidance from PR review

* UX Review: Wrap for longer error text + spacing adjustment

* UX Review: Align split messages to top + add spacing in-between

* UX Review: Align error message box padding with content
2020-06-10 13:01:40 -03:00
Maria A Nunez
6899bb9510
MM-25809 - Fixed rendering code blocks when starting with 4 spaces (#4397) 2020-06-08 19:58:48 -04:00
Amit Uttam
99ee105e17
MM-13076 Start with store results for at-mention/search autocomplete (#4385)
Currently, at-mention and search autocomplete do not render if there is a server request or network problem/outage, because the only data used to populate autocomplete results is a server request.

Now, these autocompletes will render initially with user data currently in store, and then re-rendered in place, once the server response completes.
2020-06-08 14:13:38 -03:00
Miguel Alatzar
9b03f66e6e
[MM-24068] Animate top bar height/padding (#4370)
* Animate top bar height/padding

* Update import order
2020-06-01 10:03:58 -07:00
Amit Uttam
d869ddf8e5
MM-24029 Fix date re-selection on search bar (#4368)
Picking a new date string (tapping a date on the autocomplete calendar) to replace an already populated date string in the search bar, leaves the search text garbled. This was because of incorrect handling of the tap cursor position in the search box.
2020-05-29 13:29:25 -03:00
Miguel Alatzar
023432e2f4
Fix sidebar search bar (#4350) 2020-05-28 09:35:34 -07:00
Elias Nahum
ee05367cae
MM-25562 Fix dismiss reaction list crash (#4353) 2020-05-27 12:45:35 -04:00
Elias Nahum
d100d646f2
Bump upload timeout to 1 min (#4345) 2020-05-27 12:42:56 -04:00
Elias Nahum
43f1e5113c
MM-25510 Increase post options long press delay to 200ms (#4346)
* MM-25510 Increase post options long press delay to 250ms

* Set delay to 200ms
2020-05-26 19:45:30 -04:00
Elias Nahum
1568e08055
MM-25470 Fix emoji autocomplete results (#4344)
* Fix emoji autocomplete results

* Rename selectors with "select" prefix
2020-05-26 16:03:11 -04:00
Elias Nahum
65205258d2
MM-24932 Bold LHS active channel manually marked as unread (#4332) 2020-05-22 15:39:15 -04:00
Elias Nahum
0b3c91dd81
MM-25434 Fix switch team badge cut off (#4331) 2020-05-22 10:47:35 -07:00
Miguel Alatzar
12a913b499
Update control icon style (#4325) 2020-05-22 11:35:21 -04:00