Commit graph

59 commits

Author SHA1 Message Date
Miguel Alatzar
12c29c0673
[MM-25794] Ensure state teams and members are up-to-date (#4454)
* Ensure state teams and members are up-to-date

* Remove trailing spaces
2020-06-25 20:55:44 -07: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
Elias Nahum
64173355f2
Fixes Android Share Extension (#4305)
* Fixes Android Share Extension

* Revert changes to share extension navigation
2020-05-19 17:22:40 -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
1a605891fe
MM-22401 Refactor Post Draft (#4122)
* Babel TS and Eslint config

* Channel is archived component

* Move Typing component

* Move Uploads component

* Add PostInput component

* QuickActions components

* Add PostDraft component

* Remove old PostTextbox component

* Rename post_textbox constant

* Fix Autocomplete

* Rename blur post draft event

* Fix references

* Feedback review

* Fix autocomplete for iOS
2020-05-06 06:30:51 -04: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
Elias Nahum
fda4948c8c
MM-23848 consolidate store, upgrade mmkv and fix logout (#4145)
* MM-23848 consolidate store, upgrade mmkv and fix logout

* Feedback review

* Add store.ts to modulesPath
2020-04-16 09:02:47 -04:00
Elias Nahum
aaa571db32
Upgrade to RN 0.62.2 (#4093)
* Upgrade to RN 0.62.0

* Update packager module paths

* Fix Android PasteableInput

* Fix regression on Android share extension credentials needed

* Update android/app/src/main/java/com/mattermost/rnbeta/RNPasteableEditTextOnPasteListener.java

* Reject commit if TSC check fails and Fix small eslint issues automatically

* Use super.getExportedCustomBubblingEventTypeConstants in RNPasteableTextInputManager

* Update to rn 0.62.2

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-04-14 16:39:51 -04: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
Andre Vasconcelos
a114b19ecc
MM-18455 Replace search bar component (#3998)
* Initiated basic migration to react-native-elements

- Search bar receives all right props without custom animations being necessary
- Need to test on different layouts and cases
- May be possible to unify android and iOS components. Attempt later

* Removing separated android/ios files

- Adding implementation of android searchbar 
- updating test snapshots

* WIP: Integrating leftComponent and adding focus animations

* Adding animations to left component on focus and blur events

* Removing repeated styles and useless props

* Updating snapshots

* Ensuring clearIcon renders when tapping search suggestions

- Also makes sure it prioritizes custom color attributes over default values for the search input

* Refactoring styles, removing clear icon animations

- Also removed useless ternary operations since the library itself already checks whether the search input is empty

* Replacing icon components with props whenever possible

- Removing useless styles

* memoizing styles, adding default props/values

* Memoize searchBarStyle with params

* Fixing backgroundColor

* Removing minWidth for cancel button

* Fixing styling issues on both iOS and android

* Updating snapshots post merge

* Making sure showCancel can be controlled by props

* Updating snapshots

* Fix clipped edges on iOS & cancel icon on Android

* Fixed radius, memoized styles

* Fixing styling issues found on Android

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-26 16:53:25 -03:00
Harrison Healey
f751b552b4
Add custom rule to prevent passing getState into dispatch (#4010)
* Add custom rule to prevent passing getState into dispatch

* Update package.json
2020-03-06 17:07:20 -05:00
Elias Nahum
696d6eef08
Re-enable ram-bundles (#3907) 2020-02-10 11:20:45 -07:00
Elias Nahum
7c09334dc4
Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Miguel Alatzar
7733a714de Show alert when not a member of a team (#3784) 2020-01-09 18:31:28 +08: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
Amit Uttam
0f70af7b16 MM-15469 (Android) Alert if shared text is longer than message limit (#3264)
* MM-15469 Alert if shared text is longer than message limit

One can't manually enter text into the share extension's text box past 4000 characters (the default/defined text size limit). However, this restriction can still be circumvented by sharing a large item of text. In this latter case, the textarea displays just the first 4000 characters, but the value buffer still contains the entire shared text. On hitting "Send", the oversize text can still be shared.

This commit implements [MM-15469](https://mattermost.atlassian.net/browse/MM-15469) to better align the Android sharing user experience with the iOS experience.

Since a pre-existing i18n string was used, no additional translations are required.

Fixes https://github.com/mattermost/mattermost-server/issues/11431

* Add available characters remaining counter in Android Share textarea

Shows number of available characters remaining until textarea limit (default
= 4000). Similar to iOS experience.

**iOS (normal)**

![iOS (normal)](https://user-images.githubusercontent.com/887849/65007527-d6d1f700-d8dc-11e9-9382-7e4b3c6f4f5d.png)

**Android (normal)**

![Android (normal)](https://user-images.githubusercontent.com/887849/65007570-f2d59880-d8dc-11e9-9795-ed137e4dd506.jpg)

**iOS (past limit)**

![iOS (past limit)](https://user-images.githubusercontent.com/887849/65007638-2b757200-d8dd-11e9-987d-f5e89b2aa0d3.png)

**Android (past limit)**

![Android (past limit)](https://user-images.githubusercontent.com/887849/65007720-5e1f6a80-d8dd-11e9-97ba-370fa6c8db58.jpg)

* Don't limit size of Android Share extension text input box

Pasted shared text was getting cut off after hitting the `MAX_MESSAGE_LENGTH` for shared posts. Alert validation now checks this limit before allowing content to be posted, which made the `maxLength` limit redundant.

Context: https://github.com/mattermost/mattermost-mobile/pull/3264#issuecomment-540962933
2019-10-16 09:51:06 +03:00
Harrison Healey
3e0189430b
MM-18762 Remove some usage of deprecated lifecycle methods (#3299)
* MM-18762 Remove some usage of deprecated lifecycle methods

* Only load ProgressiveImage when a URI changes
2019-09-27 09:16:21 -04: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
Amit Uttam
1f88356557 Expand text input area in Android Share extension to use available space (#3262) 2019-09-16 12:03:20 -07:00
Elias Nahum
89b96d51db MM-16430 refactor app entry point (#2924)
* MM-16430 refactor app entry point

* iOS Extensions to use session token from KeyChain

* Remove token from general credentials entity

* Fix mattermost-managed.ios to return the cachedConfig

* Migrate server based keychain for android push notifications

* remove unneeded async

* Remove unneeded android InitializationModule
2019-06-26 15:21:20 -04:00
Elias Nahum
c3c3d85248
MM-16095 Android share extension to use keychain for authentication (#2876)
* MM-16095 Android share extension to use keychain for authentication

* Remove unnecessary comment
2019-06-15 14:13:54 -04:00
Harrison Healey
6e099d6a21 MM-15643 Send user to settings when passcode is required (#2836)
* MM-15643 Send user to settings when passcode is required

* Allow access to the managed config in the iOS extensions
2019-05-27 19:38:32 -04:00
Elias Nahum
bbfd6e820f
Fix select default channel (#2800)
* Fix select default channel

* use utility with channels in team object

* feedback review

* update mattermost-redux
2019-05-16 20:02:19 -04:00
Elias Nahum
5183bc4b50 MM-15215 fix crash caused by malformed post textbox localize string 2019-04-18 18:24:36 -04:00
Jesús Espino
c769b536ae
Creating the concept of RedirectChannel and use it before the DefaultChannel when we are redirecting the user (#2674)
* Creating the concept of RedirectChannel and use it before the DefaultChannel when we are redirecting the user

* upgrading to the last mattermost-redux version
2019-04-16 23:34:02 +02: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
Sudheer
d627f96589
MM-13866 Never ending loader if app is un authenticated (#2539)
* if token or url is not present setState of loaded flag to true
2019-01-31 20:12:25 +05:30
Elias Nahum
3b1138f297
MM-13358 iOS Share extension channel list (#2429) 2018-12-10 09:15:37 -03:00
Elias Nahum
2f532182e5
Android extension channel list to display all items (#2426) 2018-12-07 01:12:18 -03:00
Elias Nahum
d5a9a058bb
Fetch team channels on extension init (#2383) 2018-11-27 19:45:44 -03:00
Elias Nahum
10e149a15d
Re-use app redux store to avoid conflicts (#2362) 2018-11-21 13:05:28 -03:00
Harrison Healey
cfb372f75a
MM-11157 Switch ESLint to use eslint-config-mattermost (#2247) 2018-10-11 13:35:25 -04:00
Elias Nahum
b20e976dff
Properly handle max file size (#2248)
* Properly handle max file size

* Feedback review
2018-10-11 14:11:05 -03:00
Elias Nahum
637ca9244a
Update RN to version 0.57.0 (#2131) 2018-09-20 19:05:41 -03:00
Saturnino Abril
0afdbdd0f9 remove backgroundColor from styles.video of Android share extension that's causing app to crash (#2119) 2018-09-14 09:10:10 -03:00
Jesús Espino
1456c7cf29 MM-11718: Show only non-archived channels on Share (#2059) 2018-08-30 14:37:36 -04:00
Elias Nahum
96e9c6c707 Update rn-fetch-blob and CBA support for iOS (#2033)
* Update rn-fetch-blob and CBA support for iOS

* remove trusty

* remove react-native-fast-image dependency
2018-08-29 14:01:37 -04:00
Elias Nahum
cf85c3c1e8 Fix Android share extension and better handle errors (#1965) 2018-08-03 13:18:21 -04:00
Harrison Healey
dee530cce7 MM-11116 Re-added updated QuickTextInput component to work around RN issue (#1859) 2018-07-02 09:09:31 -04:00
Elias Nahum
aade1f0e35
Merge branch 'release-1.9' into merge-1.9 2018-06-27 18:17:44 -04:00
Elias Nahum
ad12b11f85
Fix android extension search (#1842) 2018-06-27 13:15:06 -04:00
Martin Kraft
3bde858a64 MM-10717: Update longpress buttons when add reaction, edit post, or d… (#1779)
* MM-10717: Update longpress buttons when add reaction, edit post, or delete post permissions change.

* MM-10717: Makes tooltip actions prop required.

* MM-10717: Switches all direct access of 'config' and 'license' to use selectors.
2018-06-21 08:43:17 -04:00
Jesse Hallam
8372e95d4a add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
Elias Nahum
e3e2456ecd Fix android share extension channel switching and searching 2018-06-08 15:25:00 -04:00
Elias Nahum
8e0d167f95 Fix push notification and emm race conditions (#1691)
* Fix push notification and emm race conditions

* feedback review

* Removed unnecesary code
2018-05-22 11:02:14 -04:00
Elias Nahum
0d92c61a41
Cache team icon and set background to always be white (#1669) 2018-05-11 18:05:16 -03:00
Elias Nahum
aebe22f58d
Fix Android sharing files without extension (#1646) 2018-04-30 11:57:24 -03:00
Chris Duarte
d9f2bca9c0 Share ext error (#1587)
* Wrap iOS share extension in error boundary component

* Wrap Android share extension in error boundary component

* Review feedback
2018-04-17 15:23:37 -04:00
Chris Duarte
d6ee97c0c7 Show FlatList when searching in More DM Screen (#1546)
* Set searchbars to autoCapitalize='none'

*  Show flatlist when searching profiles for more dms

* Fix lint errors
2018-04-13 09:03:02 -03:00