Commit graph

1122 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
Mattermost Build
dba3278c9f
Automated cherry pick of #4304 (#4306)
* 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: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-05-19 16:08:58 -07:00
Miguel Alatzar
a819cce708
[MM-24642] Sidebar fixes (#4286)
* Fixes to height and padding

* Add underlayColor

* Rename to index

* Revert height change for overflow change

* Increase toValue

* Update Android offset
2020-05-18 16:31:11 -07: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
Andre Vasconcelos
a0841e0ef1
MM-24497 Ensuring quick reactions render within safe area (#4235)
* Ensuring quick reactions render within safe area

* Added modifier to align paddings

* Updating snapshots
2020-05-14 22:10:15 -04: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
Elias Nahum
e50fa1d85b
MM-24973 Prevent search input to take full screen on Android landscape (#4283) 2020-05-13 10:12:53 -04:00
Miguel Alatzar
94bdd8e430
Ensure currentChannel set (#4288) 2020-05-11 12:12:01 -03:00
Farhan Munshi
901f31ec4b
[MM-24891] [MM-24572] Add ability to specify default value when role not found for selector (#4277)
* MM-24891 Allow permissions to have defaults set in case where roles not in state

* MM-24891 Add tests for haveIPermission

* MM-24891 Apply the defaults to more channel permission checks
2020-05-08 14:19:33 -04:00
Amit Uttam
42f93769b1
Revert "MM-24113 Support 'leave' slash command (#4273)" (#4279)
This reverts commit fd450f9988.
2020-05-07 14:40:54 -03:00
Amit Uttam
fd450f9988
MM-24113 Support 'leave' slash command (#4273)
Fixes crash on Android when attempting to redirect back to a read-only channel (default channel) after using the `/leave` command.

Also, enables official support of `leave` slash command. Added as auto-complete suggestion.
2020-05-07 13:58:09 -03: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
Andre Vasconcelos
64a2de8243
Fixing improper padding of searchBar container (#4212)
* Fixing improper padding of searchBar container

* Ensures leftComponent is hidden after animation
2020-04-29 17:26:57 +08: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
Mario de Frutos Dieguez
3de2b29570
Fix infinite loop retrieving post files (#4192)
* Fix infinite loop retrieving post files

Right now if all the attachments of a post are removed the component
update code enters into an infinite loop because the comparison between
arrays always return false.
2020-04-22 19:25:34 +02:00
Miguel Alatzar
9a97f91735
Check canPost permissions for v5.22+ (#4193) 2020-04-22 20:10:46 +08:00
Miguel Alatzar
cd8c627dc3
Fix headers when preloading images (#4165) 2020-04-16 18:43:51 -07:00
Elias Nahum
0c7a2c6fa1
Correctly load file attachment images (#4160)
* Correctly load file attachment images

* Remove cache control from gallery
2020-04-16 16:24:28 -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
Elias Nahum
4ad4b3b103
Validate previous app version (#4151)
* Validate previous app version

* Update snapshot and fix typo in constant
2020-04-14 13:22:43 -04:00
Miguel Alatzar
8b2d9a10f5
Ensure postProps is not null/undefined (#4150) 2020-04-14 11:38:34 -04:00
Elias Nahum
6667962e1f
MM-24093 Fix crash when system message does not contain a username in post props (#4143) 2020-04-13 11:44:22 -04:00
Elias Nahum
9d0209fce6
MM-22043 Render Channel purpose message without markdown (#4131) 2020-04-09 06:08:15 -04:00
Elias Nahum
c64581ef16
MM-22683 use webhook override_username instead of webhook creator on commented on post header (#4130) 2020-04-09 06:07:46 -04:00
Elias Nahum
be6b1ff83f
MM-22198 Don't show commented on for post on the same thread after a date separator (#4129) 2020-04-09 06:07:14 -04: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
8bb43ca4c2
[MM-22632] Set vertical padding for SlashSuggestionItemi (#4125)
* Set minHeight

* Replace minHeight with paddingVertical
2020-04-08 11:08:59 -04:00
Miguel Alatzar
7bee5c368a
Always show expand button (#4121) 2020-04-07 13:52:59 -03:00
shred86
717350adc6
[MM-23755] Add nickname as searchable property (#4099)
* Add nickname search functionality

* Add username property to test

* Fix parentheses out of place

* Add nickname property to additional tests

* Added ability to truncate long names

* Minor clean up

* More minor clean up
2020-04-06 17:48:06 -04:00
RAKESH PEELA
f4d5f4dcaf
Update more unreads button to new design (#4101)
* update `more unreads` button to new design

* update More Unreads button with UI suggestions

* fix lint issues
2020-04-02 18:42:49 -03:00
Elias Nahum
8522b70851
Tweak post list numbers (#4105) 2020-04-02 14:40:02 -03:00
Miguel Alatzar
5346c574e2
Fix mm-redux imports (#4109) 2020-04-01 20:04:39 -03:00
Andre Vasconcelos
d03d504d00
MM-14038 Access recent reactions from the long press menu (#4058)
* WIP: Implementing quick reaction functionality

* Making closing animations smoother

- Added haptic feedback + timeouts for a smooth flow

* Fixing clipping of post options on android

* updating snapshots

* Refactoring code & fixing styles

- Fixed paddings element sizes to comply with design specs
- Replaced reaction image to one with a higher resolution
- Made sizes of emojis to be conditional on deviceWidth

* Apply suggestions from code review

* Adding component to avoid extra re-renders

* Refactoring function call in reaction_button

Am ashamed i didn't catch this before pushing the rest

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-01 12:56:49 -07:00
Miguel Alatzar
1079498461
[MM-23708] Send HW key pressed event only when a HW keyboard is connected (#4100)
* Check if HW keyboard is connected

* Call super

* Fix double new line insert
2020-03-31 21:43:18 -03: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
Martin Kraft
9b553d3760
MM-23636: Default 'canPost' to true. (#4085) 2020-03-30 10:40:08 -03:00
Elias Nahum
950f5863fd
Revert "Use file URL over preview URL for GIFs (#3981)" (#4084)
This reverts commit cbc6ef185c.
2020-03-27 23:04:46 -03: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
Miguel Alatzar
55cac2e062
[MM-23514] Don't use state for rowsSliced/colsSliced (#4075)
* Don't use state for rowsSliced/colsSliced

* Update snapshot

* Also show moreBelow when contentHeight > MAX_HEIGHT
2020-03-25 15:59:17 -07:00
Elias Nahum
54c6d98683
Fix Android Navbar tap events (#4074) 2020-03-24 20:24:29 -03:00
Miguel Alatzar
f404fd00b0
[MM-23483] Add backgroundColor to drawer content parent View (#4067)
* Add backgroundColor

* Revert backgroundColor and set elevation instead

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-24 12:40:04 -03:00
Miguel Alatzar
1006d52889
[MM-23506] Enable FlatList virtualization (#4062)
* Enable FlatList virtualization

* Update snapshot test
2020-03-23 22:26:05 -03:00
Elias Nahum
2452297592
Fix Message attachment actions colors on dark themes (#4061) 2020-03-23 22:05:42 -03:00
Amit Uttam
587ba38f4e
MM-23234 Prefer mobile-defined state actions (#4057)
Unify usage to one set of defined dispatch actions in codebase, instead of a mix of (almost) identical actions defined in `mattermost-mobile` and `mattermost-redux` .
2020-03-20 13:53:33 -03:00
Elias Nahum
8fbc988c90
Upgrade Dependencies (#4034)
* Upgrade Navigation library

* Fix background color on Select Server

* Upgrade Navigation library

* Apply patch to nav lib

* Upgrade RNN to 6.1.1

* Update Dependencies

* Feedback review

* Call clearNavigationComponents when reset to channel
2020-03-18 19:05:49 -03:00
Elias Nahum
ec4dfb65b2
MM-23230 Batch post actions and fine tune postlint (#4042)
* PostList optimizations on FlatList

* Stop scroll to index if there is an interaction

* Fix unit tests

* MM-23176 Fix crash due to scrollToIndex out of range

* Batch mark channel as read action

* Fine tune post list

* Batch actions for getting posts

* Update app/utils/push_notifications.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/actions/views/channel.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* Pass state as arg to markAsViewedAndReadBatch

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-03-18 16:59:45 -03:00
Hossein Ahmadian-Yazdi
e8150fa7cc
[MM-21408] Make the name displayed consistent with teammate name display (#4021)
* update redux hash and function

* fix lint issue
2020-03-17 20:47:14 -04:00
Elias Nahum
3af9af68e4
MM-22318 Fix autocomplete selection char code for native emojis (#4040) 2020-03-17 12:48:22 -07:00