Commit graph

284 commits

Author SHA1 Message Date
Guillermo Vayá
ec417cfd56
MM-36900 Fix mm emoji (#5526)
* wip

* fix typo

* fix snapshots

* move inside emojis

Co-authored-by: = <=>
2021-07-09 18:32:29 +02:00
Guillermo Vayá
1f843ddb4f
[MM-35909] Support for emoji 13 (#5497)
* support for emoji 13

* fix some tests

* more test fixed

* fix typo

* rename system to standard

* remove unused functions

* fix +1 emojis
2021-06-30 00:41:11 +02:00
Elias Nahum
f4f8379796
Update dependencies and setup project with node 16 / npm 7 (#5474) 2021-06-21 18:36:38 -04:00
Elias Nahum
298067ab65
Update react-native-cookies & react-native-webview + always use defaultDataStore (#5452)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-06-15 18:40:35 -04:00
Elias Nahum
9f238d5ef4
Post List & post components refactored (#5409)
* Update transform to make Android's post list scroll smooth

* set start since metric when appStarted is false

* Refactor Formatted components

* Downgrade RNN to 7.13.0 & patch XCDYouTube to allow video playback

* Refactor Post list and all related components

* review suggestion rename hour12 to isMilitaryTime

* feedback review use aliases

* feedback review deconstruct actions in markdown_link

* feedback review simplify if/else statement in combined_used_activity

* Simplify if statement for consecutive posts

* Specify npm version to build iOS on CI

* Refactor network_indicator

* render Icon in file gallery with transparent background

* Increase timeout to scroll to bottom when posting a new message

* fix: scroll when tapping on the new messages bar

* fix: dismiss all modals

* fix navigation tests

* Handle dismissAllModals for iOS to prevent blank screens

* Prevent modal from dismissing when showing the thread screen in the stack

* Update app/components/image_viewport.tsx

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

* Update app/utils/post.ts

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

* Apply suggestions from code review

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

* fix: rename selector and prop

* Fix XCDYouTube patch

* Fix posting from a thread in the right channel

* do not render reply bar on the thread screen

* close previous permalink before showing a new one

* move XCDYouTube patch to ios/patches folder

* closePermalink directly instead of using an onClose prop

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2021-06-03 11:12:15 -07:00
Elias Nahum
288c847518
Add Perf metrics, some cleanup & dep updates (#5378) 2021-05-12 08:48:20 -04:00
Daniel Espino García
f8e67c04ad
Migrate message attachments to typescript (#5127)
* Migrate attachment_image

* Migrate action_menu

* Migrate action_button

* migrate message_attachments

* Remove unintended commited file

* Fix tsc

* Fix tsc

* Fix lint

* Update references

* Make emoji functional component and fix imports

* Use ReactNode instead of JSXElement

* Convert action menu to FC

* Remove unneeded fragments

* Remove unneded undefined check

* Use undefined instead of nil in calculateDimensions

* Make sure height is always defined

* Use is valid URL

* Add missing types

* Lint fixes and remove lodash

* Revert package.json changes

* Put back fragments since they are actually needed

* Fix test

* Fix lint

* Address feedback
2021-04-22 18:21:44 -04:00
Elias Nahum
0a2a490e81
Fixes for release 1.42 (#5339)
* Downgrade MMKV to 0.4.4

* Handle undefined in getMyTeams selector

* Set minimum server version to 5.31.3 and update unsupported URL
2021-04-19 08:41:27 -07:00
Elias Nahum
9131b25310
MM-27849 render emojis with appended skin tone (#5297) 2021-04-15 11:26:03 -04:00
Elias Nahum
13eab98143
Refactor rest client class to use mixin and a bit of cleanup (#5318) 2021-04-15 10:04:36 -04:00
Elias Nahum
9c043f1b9f
MM-34585 Use removeClippedSubviews from Lists to improve scroll perf (#5199) 2021-04-08 16:52:23 -04:00
Anurag Shivarathri
66ebe3683b
MM-34508 in-app browser emm configuration (#5274) 2021-04-07 14:15:19 -04:00
Elias Nahum
f8a0f29237
Update dependencies (#5266)
* Update dependencies

* Fix lint, use npm@6

* Fix unit tests

* Dowgrade Fastlane

* Fix Fastlane script

* use android:api-29-node ci image

* Infer gradle json file from apk output folder

* Fastlane to Parse new version of gradle output-metadata.json
2021-04-06 11:12:31 -04:00
Daniel Espino García
11c8454ee2
Feature - Cloud Apps (#5226)
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2021-03-22 18:02:06 -04:00
Elias Nahum
89c23f4f91
MM-31341 Use first metadata info for inline md images (#5219)
* MM-31341 Use first metadata info for inline md images

* Revert back opening an inline image link
2021-03-15 14:28:46 -03:00
Matthew Birtch
65d703c282
Updates to animations for new gallery (#5119)
* tweaks to durations and animation settings for gallery

* fixed style issues from code linting

* added duration change for android that got missed
2021-02-24 11:37:14 -08:00
Anurag Shivarathri
3c51b39bf4
Added "Join prompt" when sys admin clicks on perma links of private channels (#4988)
* Added join prompt when sys admin clicks on private channel perma links

* Moved isChannelMember to utils

* Update app/actions/views/permalink.ts

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

* Added error messages

* Added error messages

* Moved checks to screen components

* Removed unused Alert import

* Removed unused translations and showing channel 'display' name

* fixed eslint error

* Moved private channel check logic from component to handleSelectChannelByName to avoid issues while pressing on url from different team

* Detox test WIP

* Test link fixes

* Added e2e test

* Hiding <Loading component on RN Alert as detox is unable to press on the Join button

* Updated message

* Added team membership check and auto-joining teams before viewing posts

* Fixed testcases

* Leaves newly joined team on any error while joining the channel

* Leaves the team if newly joined if cancelled the prompt

* Moved code to tapping_channel_url_link_joins_channel and refactored code

* Removed unwanted optional chaining operator

Co-authored-by: anurag shivarathri <anuragindianbraves@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-02-12 09:09:34 +05:30
Joseph Baylon
f495e1e48d
MM-30289 Detox/E2E - Add e2e tests for MM-T3184 and MM-T3186 (#5133)
* MM-30289 Detox/E2E - Add e2e tests for MM-T3184 and MM-T3186

* Update detox/e2e/support/server_api/preference.js

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>

* MM-31322: redirect permalink handler (#5136)

* invert loadTeam.error test

* MM-31322: handle _redirect permalinks

In the webapp, [there is support](7c5a2e3bfd/components/root/root.jsx (L345-L352)) for a special `_redirect` team name in certain contexts that simply means, "the current team". It's used in the context of redirecting to the integrations backstage (not relevant for mobile), for also for resolving post permalinks.

This simplifies certain kinds of integrations which no longer have to know a team name to render a permanent link to a post. An example link looks like:

    http://localhost:8065/_redirect/pl/e3sxrxtwh78jmxawsaqfemxoew

This PR adds support for same in mobile, unintentionally missed on the first round of implementation.

Fixes: https://mattermost.atlassian.net/browse/MM-31322

* Apply suggestions from code review

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>

* linting issues

* Apply suggestions from code review

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>

* revert showPermalink changes

* Revert "invert loadTeam.error test"

This reverts commit accf6c8fb7c56009a393a6e85084d4702deec9ed.

* support _redirect deeplinks

* Apply suggestions from code review

* Update app/components/post_list/index.js

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2021-02-10 13:55:00 -08:00
Elias Nahum
2e790212f9
MM-31705 allow file local path to use multiple dots (#5109)
* MM-31705 allow file local path to use multiple dots

* Add unit test
2021-01-11 12:53:06 -07:00
Miguel Alatzar
7702c050bf
Revert "[MM-29225] Define LSApplicationQueriesSchemes so Linking.canO… (#5067)
* Revert "[MM-29225] Define LSApplicationQueriesSchemes so Linking.canOpenURL can work (#5007)"

This reverts commit f3baaa6aa3.

* Create and use tryOpenURL

* Add missing onError functions

* Update app/components/markdown/markdown_link/markdown_link.js

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

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-01-06 09:11:27 -07:00
Daniel Espino García
7bb777f4b3
Handle go to location from CommandResponse (#4620)
* First draft to handle go to location on mobile

* Fix lint

* Fix test

* Remove unnecessary change

* Add not handled cases

* Add i18n missing string

* Fix typo

* Extract handleGotoLocation into an action

* Fix minor issues and extract showPermalinkView to an action

* Fix minor issues and extract showPermalinkView to an action

* Add missing change

* Fix this reference

* Remove unneeded event handlers, sort imports, early handle errors, make group channel visible, remove duplications and move functions to the right place

* Fix tests

* Handle error when opening permalink
2021-01-04 15:06:37 -07:00
Ed Trist
c106e9f973
[MM-23391] Sort sidebar teams order by user preference (#4911)
* [MM-23391] Sort sidebar teams order by user preference

* Update imports

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

* Small changes to selector from review

* Select first ordered team in user preference on login

* Check teams length instead

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

* Return early if teamsOrder is empty

* Return sorted copy of teams instead of mutating original array

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-10 17:35:05 -03:00
Miguel Alatzar
f3baaa6aa3
[MM-29225] Define LSApplicationQueriesSchemes so Linking.canOpenURL can work (#5007)
* Revert "[MM-29225] Linking fix (#4860)"

This reverts commit a5cb92876c.

* Define LSApplicationQueriesSchemes
2020-12-09 13:42:21 -07:00
Joseph Baylon
67398d83cb
Add eslint eol-last to require newline at end of files (#4985) 2020-11-30 21:46:05 -07:00
Elias Nahum
dcaaaee44c
MM-30164 fix safe area insets (#4979)
* MM-30164 fix safe area insets

* Fix unit test setup mock for react-native-device-info

* Add insets for edit profile screen

* Fix about screen

* Fix theme screen

* Lock phone screen to portrait

* fix unit tests

* Fix autocomplete layout
2020-11-23 20:10:09 -03:00
Elias Nahum
b226d451f3
update dependencies (#4958)
* update dependencies

* revert keychain update

* Update dependencies & Fastlane

* set path agnostic for bash in scrips

* Fix open from push notification race

* patch react-native-localize
2020-11-18 19:45:07 -07:00
Elias Nahum
dbd7bc8a51
Gallery Improvements (#4837)
* Open/Close Gallery transitions

* Include postId in file info & disable opening the gallery in some cases

* Add progress bar component

* Transition to gallery based on platform

* Improve getting the filename for non attachments

* Patch RNFetchBlob TS definition

* Add gallery types

* fix unit tests for message and post attachment

* add getLocalPath method

* Add react-native-share dependency

* Re-style gallery footer

* Refactor Gallery screen

* Double tap zoom in/out and translate

* Make android activity "transparent"

* Do not animate to height on dismissing gallery

* Open gallery for file uploads

* Fix borderRadius for gallery action button

* Use progress bar for file uploads

* Replace progress bar for file attachment document

* Upgrade RNN to 7.1.0 to fix share elements transitions

* Fix Gallery unit tests

* translate down when popping screen on iOS

* Swipe, Pan & Tap fixes

* fix gallery footer avatar eslint

* Fix gallery snapshot tests

* Use CompassIcon in Gallery

* Feedback from UX review

* Fix gallery UI for other file types

* Set other file type gallery button to 48pt
2020-11-06 21:17:27 -03:00
Elias Nahum
2c0b67067f
MM-29252 Tapping on invalid permalink shows an error (#4926) 2020-10-28 11:54:47 -03:00
Elias Nahum
043b3a0e8e
Refactor Android Share extension (js) (#4893)
* Refactor Android Share extension (js)

* Feedback review
2020-10-19 21:39:59 -03:00
Miguel Alatzar
57d60649f8
[MM-22959] Use Compass icons (#4847)
* Use Compass icons

* Update ChannelInfo and AdvancedSettings

* Fix search modifiers

* Fix Autocomplete item

* Remove VectorIcon component

* Unlink react-native-vector-icons

* Revert ProgressiveImage changes

* Update Mark as Unread icon

* Apply review suggestion

* Replace extension icons

* Update video control button style

* Replace (un)flag with (un)save

* Replace (un)flag with (un)save - take 2

* Use bookmark-outline icon

Co-authored-by: Miguel Alatzar <miguel@Miguels-MacBook-Pro.local>
2020-10-15 15:34:24 -07:00
Miguel Alatzar
a5cb92876c
[MM-29225] Linking fix (#4860)
* Catch openURL over checking canOpenURL

* Update en.json
2020-10-02 10:01:44 -07:00
Elias Nahum
ea4e21de93
Fix soft crash for edge emoji formatting (#4705) 2020-08-20 14:48:48 -04:00
Elias Nahum
48f1875cf1
MM-23090 MM-26078 && MM-26876 Refactor post draft component (#4621)
* Refactor post draft component
Re-styled ReadOnly channels
Remove filename from upload error

* Update canSubmit based on file attachment changes

* Fix error message for max file size

* Fix select autocomplete values on iOS

* Style readonly and refactor accessory view for iOS

* Make PostDraft scrollViewNativeID prop not required

* Update ReadOnly to have a background with 0.40 opacity

* Update max file size error message

* Fix shift+enter with HW keyboard
2020-08-06 19:39:25 -04:00
Miguel Alatzar
7c827fe319
[MM-26489] No need to decode file URI on Android (#4610)
* Encode lone % chars

* No need to decode on Android
2020-07-24 11:42:00 -07:00
Elias Nahum
0ad62ced40
MM-26744 in-prompt for end users if server is unsupported (#4565) 2020-07-15 11:17:55 -04: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
Elias Nahum
320ec7029c
MM-26722 check for switchKeyboardForCodeBlocks only on iOS 12+ (#4537) 2020-07-07 13:01:48 -04:00
Elias Nahum
30cd64b38b
Revert updated dependecies for SSO (#4499)
* Revert updated dependecies for SSO

* Fix test setup
2020-06-26 21:50:53 -04:00
Miguel Alatzar
363810f708
Various fixes: (#4474)
* Fix map call on Set
* Ensure we don't destructure non-iterable values
* Include error message and stack in Alert
2020-06-23 16:39:49 -07:00
Miguel Alatzar
73f5bc20eb
Various fixes: (#4465)
* Dispatch REHYDRATED if already hydrated after getStoredState call
* Empty/null prev version is valid
* Update iOS target to 11.0
2020-06-22 15:24:54 -07:00
Elias Nahum
b85766ec31
MM-25931 Handle incoming session expired push notification (#4417) 2020-06-17 21:30:19 -04:00
Elias Nahum
ee05367cae
MM-25562 Fix dismiss reaction list crash (#4353) 2020-05-27 12:45:35 -04:00
Elias Nahum
547ac860b7
Invalidate versions for iOS (#4349) 2020-05-27 10:49:33 -04:00
Miguel Alatzar
93f519c8fc
Handle MFA error in MFA screen (#4308) 2020-05-20 08:28:14 -07:00
Harrison Healey
c7ef3fe1d3
MM-22155 ESLint configuration updates part 1 (#4311)
* MM-22155 Disable no-undefined

* MM-22155 Disable react-jsx-filename-extension

* MM-22155 Disable no-magic-numbers

* MM-22155 Re-enable camelcase

* MM-22155 Re-enable no-nested-ternary

* Update no-unused-vars to match other repos
2020-05-20 08:27:27 -07:00
Elias Nahum
012eb08fde
Fix infinite skeleton in different use cases and do not scroll to messages already seen (#4304)
* Fix infinite skeleton in different use cases

* Apply suggestions from code review

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

* Update app/utils/teams.js

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-05-19 18:54:34 -04:00
Elias Nahum
c04c1f26f7
Do not schedule session expiry notification for 5.24+ (#4291) 2020-05-19 12:15:45 -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
1ae5584cb1
MM-24115 Use Native + BuiltIn emojis instead of systemEmojis (#4274)
* MM-24115 Use BuiltInEmojis instead of systemEmojis

* Address QA found issues
2020-05-13 18:23:47 -04:00
Elias Nahum
36e55c95a2
MM-23570 Migrate from Segment to Rudder (#4293)
* Replace Segment with Rudder (ios not working)

* Update @assets reference and fix tests
2020-05-13 16:54:07 -04:00