Commit graph

1226 commits

Author SHA1 Message Date
Mattermost Build
20496f5a4f
Check for undefined metadata images (#5021) (#5025)
(cherry picked from commit 7088481ac6)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-12-10 14:50:08 -07:00
Mattermost Build
37fb33c6a7
MM-31114 fix: regression for in: autocomplete modifier in search screen (#5009) (#5017)
(cherry picked from commit c3b3d0239f)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-12-10 09:13:04 -03:00
Mattermost Build
39fb6af758
[MM-29225] Define LSApplicationQueriesSchemes so Linking.canOpenURL can work (#5007) (#5013)
* Revert "[MM-29225] Linking fix (#4860)"

This reverts commit a5cb92876c.

* Define LSApplicationQueriesSchemes

(cherry picked from commit f3baaa6aa3)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-12-09 14:32:08 -07:00
Mattermost Build
8899c586ab
MM-30164 fix safe area insets (#4979) (#4984)
* 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

(cherry picked from commit dcaaaee44c)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-11-23 21:24:06 -03:00
Mattermost Build
b5b2310f33
update dependencies (#4958) (#4968)
* 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

(cherry picked from commit b226d451f3)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-11-19 13:37:43 -03:00
Joseph Baylon
4f668f0fdf
MM-30286 Detox/E2E: Add e2e test for MM-T3222 and some cleanup (#4959)
* MM-30286 Detox/E2E: Add e2e test for MM-T3222 and some cleanup

* Fix merge issues

* Fix more issues

* Fixed new line

* Remove redundant check

* Updated instance to getElement

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-17 10:52:03 -08:00
Elias Nahum
402c312f8f
MM-27354 Emit the event for visible items in the thread screen (#4961)
* Emit the event for visible items in the thread screen

* Feedback review

* fix unit test

* check for deeplink before running the animation

* Load progressive image for recent mentions, saved / pinned posts & search
2020-11-13 17:29:19 -03:00
Anurag Shivarathri
31d5f9eab6
On change, Group mentions are updated in autocomplete (#4944)
* On change, Group mentions are updated in autocomplete

* Converted getAssociatedGroupsForReference, searchAssociatedGroupsForReferenceLocal functions to reselectors

* Sending only state to getCurrentUserLocale in selector

* Added types to passed params

Co-authored-by: anurag shivarathri <anuragindianbraves@gmail.com>
2020-11-13 08:56:35 -03:00
Joseph Baylon
48dbb75471
MM-29024 Detox/E2E: Add unit and e2e tests for disabled mobile upload (#4954)
* MM-29024 Detox/E2E: Add unit and e2e tests for disabled mobile upload

* Simplified element call

* Remove extra lines

* Added e2e for mobile upload enabled - quick actions

* Fix upload item snap file

* Added check for license

* Fix lint

* Update function export

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-12 21:29:16 -03:00
Andre Vasconcelos
e319a79e42
MM-29965 Fix at_mention autocomplete selection bug (#4937)
* Adding E2E tests for at mention autocomplete

* Removing mentionComplete from at_mention autocomplete

- The component is already being hidden when there is no valid matchTerm or sections
- Setting mentionComplete to true after an autocomplete was selected prevented the autocomplete from rendering when @ is tapped a second time

* Updating E2E description

* Update detox/e2e/test/autocomplete/at_mention.e2e.js

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

* complete at-mention selection when there are no more sections

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-11-12 21:00:23 -03:00
Joseph Baylon
0dfb776290
MM-30165 Detox/E2E: Add e2e tests for channel notification preference (#4949)
* Detox/E2E: Add e2e tests for channel notification preference

* Fixed unit snap files

* Moved e2e to notifications and updated formatting

* Added basic snapshot tests

* Update app/components/radio_button/radio_button_group.test.js

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

* Update app/components/radio_button/radio_button_group.test.js

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

* Update app/components/radio_button/radio_button_group.test.js

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

* Update app/components/sidebars/settings/drawer_item.test.js

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

* Update app/screens/channel_info/edit_channel/edit_channel.tsx

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

* Update app/screens/channel_info/notification_preference/notification_preference.test.js

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

* Update app/screens/channel_info/notification_preference/notification_preference.tsx

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

* Update app/components/radio_button/radio_button_group.test.js

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

* Fix radio button group snap file

* Simplified element call

* Rename channel sidebar to main sidebar

* Rename drawer button files

* Update app/components/sidebars/settings/settings_sidebar.test.js

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

* Update app/screens/channel_info/channel_info_row.test.js

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

* Update comments

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-11-10 10:53:38 -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
Bhargav Sangani
b05b797b06
MM-27354 Progressive image loading (#4945)
* init

* Pick one from mini preview and thumnail URL in file attachment image

* Blur thumbnail mini preview & update testID's

* Set blurRadious based on Platform OS

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-11-06 18:26:45 -03:00
Anurag Shivarathri
50cc0b05be
Group mentions are not highlighted until they are posted (#4943)
* Group mentions are not highlighted until they are posted

* Disable highlight when post is pending

* Reverted unit test

Co-authored-by: anurag shivarathri <anuragindianbraves@gmail.com>
2020-11-05 11:48:16 -07:00
Saturnino Abril
a819f63d99
MM-30076 Detox/E2E: Update UI test structure for reusability (#4931)
* update UI test structure for reusability

* fix Android tests

* improve autocomplete test

* minor cleanup
2020-11-03 18:11:49 +08:00
Ashish Bhate
1914b770e5
[MM-28845]: Add storybook to mobile repo (#4870)
*Summary*
- This PR adds storybook into the mobile repo, and adds a sample story for the existing "loading" component.
- In the root of the repo run `npm run storybook`. This step automatically scans and loads all stories. A new browser tab will open with the storybook interface. You can configure the storybook host url by updating the .env file in the root of the repo. This might be required if you're using a real device. When running in an emulator, the code tries to use the default network values.
- Then run the usual `npm run android` (or `npm run ios`) and `npm run start` commands
- Storybook has been integrated into the react-native-dev-menu. When the app is running in the emulator press CTRL+M or CMD+M to open the dev menu and select "Storybook". If running on a real device, shaking the device will bring up the react-native dev menu. You can also press d in the terminal where you ran npm run start to get the app running.
- The storybook interface will open in the mobile app. The stories can be controlled either through the desktop browser storybook UI or the mobile browser storybook UI. Both will render the component on the device.

*Ticket Link*
https://mattermost.atlassian.net/browse/MM-28845

*Device Information*
This PR was tested on:
Iphone 11 emulator running ios 13.7
Pixel 3XL emulator running Android 10
2020-11-02 15:41:07 +05:30
Elias Nahum
9940aacad1
MM-29869 Replace radio button Material with Compass icons (#4928) 2020-10-29 07:38:31 -03:00
Elias Nahum
f73db6e51c
MM-29948 Display error msg when pasting files and uploads are disabled (#4927)
* MM-29948 Display error msg when pasting files and uploads are disabled

* Remove unnecessary ref and Animated.View

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-10-28 12:06:09 -03:00
Elias Nahum
2c0b67067f
MM-29252 Tapping on invalid permalink shows an error (#4926) 2020-10-28 11:54:47 -03:00
Ashish Bhate
1f6cd323f4
[MM-25349] centre failed network action component and improve responsiveness to device orientation (#4834) 2020-10-26 13:32:14 +05:30
Elias Nahum
cb4d875b13
MM-29620 Add props to post input to prevent autofill (#4916)
* MM-29620 Add props to post input to prevent autofill

* Set autoCompleteType to off instead of none
2020-10-23 15:13:59 -07:00
Elias Nahum
016a725732
MM-28105 do not crash when in-app notification shows (#4915)
* MM-28105 do not crash when in-app notification shows

* Use index.tsx to register the notification screen

* Fix notification e2e and some import cleanup

* Update iOS notification json

* e2e: Show the add reaction screen before receiving a notification

* Update snapshots

* Patch react-native-notifications to prevent iOS crash when opening

* Apply TM4J id

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-22 14:34:49 -03:00
Elias Nahum
8c8f93b589
MM-28688 Close sidebar when current channel is selected (#4897)
* MM-28688 Close sidebar when current channel is selected

* Update snapshot

* Apply suggestions from code review

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

* Fix iOS select_channel e2e and feedback review

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-19 20:32:34 -07:00
Ed Trist
cff81f168e
[MM-22366] Make user autocomplete also match on spaces (#4880)
* [MM-22366] Make user autocomplete also match on spaces

* Move template string to fullName variable

* Add Detox E2E tests for user autocomplete

* Add TM4J IDs

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

* Add test for keyword not associated with user

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-19 10:15:18 -03:00
Elias Nahum
fbe2a9e575
MM-28539 Fix wrong participant count in GM info (#4887)
* Fix e2e flaky tests

* MM-28539 Fix wrong participant count in GM info

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>

* Update detox/e2e/test/autocomplete/edit_post.e2e.js

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

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
2020-10-19 10:13:30 -03:00
Elias Nahum
30d4aa2a3e
Build Improvements (#4884)
* Use AppGroupId from Info.plists instead of hardcoded constant

* Update script, ci & Makefile

* Update Cocoapods to 1.9.3

* Split android builds using ABI filters

* Update Fastlane deps & build scripts

* Update CI to use latests scripts

* Display app version & build number in select server screen

* Make generate scripts compatible with node < 12

* Build scripts

* add build script to package.json

* Update to use bundler 2.1.4 and CI with Xcode 12

* Fix script name for build:ios-unsigned

* Fix RN iOS scripts

* Update CI pods-dependencies step

* Add pipefail to android executor

* Update Fastlane

* Fix type in postinstall script

* update android executor and set TERM

* Fix S3 bucket name variable

* Apply suggestions from code review

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

* Fix master unit tests

* use requireActual in jest setup

* Jest setup to use react instead of React

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-10-15 22:09:36 -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
Hector
eb0f511bb7
MM-T3201 create public channel e2e test (#4867)
* MM-T3201 initial test purpose with detox

* MM-T3201 spaces and more comments

* MM_T3201 update snapshot tests to include test id

* MM-T3201 edit test ID to follow naming convention, PR fix

* MM-T3201 change comments to indicate if action or expect

* MM-T3201 add more testID to create buttons

* MM-T3201 adding trailing commas and testID

* MM-T3201 fix style

* MM-T3201 fix snaps test

* MM-T3201 fix conflicts with prior PR

* MM-T3201 using test dependent on platform to test button behaviour

* Update detox/e2e/test/channels/create_public_channel.e2e.js

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

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-15 10:13:41 -07:00
Andre Vasconcelos
c6c0d33f6a
MM-29046 Add unit and e2e tests for autocomplete popover (#4855)
* WIP: Adding autocomplete E2E tests

* Fixing search.e2e tests

* Updated testIDs, added 2 test suites, added comments

* Added comments to search E2E test

* Updating testIDs & reverting changes to common.js

* Updating snapshots

* Added TM4J ticket numbers

* Adding assertion commends to search E2E

* Updated testID values
2020-10-12 09:07:23 -03:00
Clare So
361349a4d4
MM-T3187 Unread channels sort at top (#4833)
* Automate MM-T3187

* Update the snapshots. Applied channel_item_display_name suggestion. Add verification for channels_list (to prove the testID works).

* Update testID. Move test to a new file under smoke test.

* Revert message_posting.e2e.js

* Applied suggestion from code review.

* Update detox/e2e/test/smoke_test/channels.e2e.js

Apply Saturnino's suggestion

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

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
2020-10-08 10:49:24 -03:00
Miguel Alatzar
ae43ba1187
Emit PASTE_FILES event only from last subscribed input (#4872) 2020-10-05 13:09:31 -07:00
Michael Kochell
a6779f4293
[MM-29275]: Remove first char of slash cmd autocomplete suggestion text, only if it is a top-level command (#4868)
* Remove first char of suggestion text, only if it is a slash

* Check if suggestion is for a top-level command
2020-10-05 12:08:57 -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
Miguel Alatzar
85382e695a
[MM-29132] Update upload item styling (#4853)
* Update upload item styling

* Use font size 9
2020-10-01 11:19:30 -07:00
Andre Vasconcelos
59045e3bb0
MM-22968 Restyle mobile autocomplete (#4531)
* WIP: slash suggestion autocomplete

* WIP: patched styles a bit

* WIP: Adding styles

* Adding active state to autocomplete items

* Fixing style for channel mention item

* Fixing bugs + styling issues for Android

* Updating snapshot

* Fixing autocomplete to render on top of post draft

- Misc style fixes

* Renaming props, patching slash suggestion icon

* Fixing tests and lint errors

* Resolving post-merge issue with slash commands

* Fixing android positioning for autocomplete

* Fixing autocomplete not scrolling in edit_channel_info

* WIP: Fixing things according to UX Review

* UX Fixes to autocomplete

* Updating snapshots

* Updating snapshots, replacing slash-command icons

* Fixing android scrolling and positioning issues

* Fixing issues with date_suggestion not rendering

* Making use of the "ShowFullName" config in at_mention_item

* Removing top border on first autocomplete section

* Allowing autocomplete to be smaller than its maxWidth

* Fixing slash_suggestion padding

* removing "componentWillReceiveProps" from date_suggestion

* Changing edit_channel_info autocomplete offset

* Replacing toUpperCase() with textTransform: uppercase

* Fixing odd border issues + prop validation warning

* Restore section header background & add paddingBottom

* Patching up padding on channel mentions

- Reverting previous incorrect padding adjustments

* Removing inline 'completeSuggestion' function

* Removing brackets from style prop
2020-09-25 11:26:48 -07:00
Ashish Bhate
99f018faac
[MM-28706] revert ordering change for in: autosuggest search (#4818)
Summary:
Revert ordering change for in: auto-suggest search after user feedback. The ordering now is Public Channels, Private Channels, and finally DMs and GMs.
This PR only fixes ordering. Further search improvements are planned in https://mattermost.atlassian.net/browse/MM-26805

Ticket Link:
https://mattermost.atlassian.net/browse/MM-28706
The Jira ticket above reverts the changes in https://mattermost.atlassian.net/browse/MM-27540 (Parent: https://mattermost.atlassian.net/browse/MM-15477) which was implemented in #4704
2020-09-25 13:43:19 +05:30
Saturnino Abril
6e03ba8351
reintroduce @testing-library/react-native now with v7 (#4766) 2020-09-15 09:24:54 -07:00
Elias Nahum
52886e7631
MM-28602 Fix announcement banner crash if it includes a hashtag (#4808)
* MM-28602 Fix announcement banner with hashtag crash

* Fix expanded announcement banner layout

* Fix announcement banner animation
2020-09-15 10:03:40 -03:00
Elias Nahum
b55e88d0fe
Save draft when post input unmounts (#4785) 2020-09-09 12:03:07 -03:00
Farhan Munshi
b8a002683f
MM-27132 Fix groups not actually being highlighted for self on mobile (#4776) 2020-09-09 01:20:41 -03:00
Elias Nahum
05f264554e
MM-28450 Fix crash when posting at-mention that does not belong to the channel (#4778) 2020-09-08 16:52:04 -03:00
Elias Nahum
c97b2be927
MM-28296 Fix Android @mention render (#4764)
* MM-28296 Fix Android @mention render

* Simplify mention style

* Update @mention snapshot

* @mention fix lint

* Address QA feedback

* QA Review
2020-09-08 13:09:34 -03:00
Jyoti Patel
c9c22583d8
[GH-15305][MM-27677] Improve empty state for Recent Mentions. (#4715)
* Improve empty state for Recent Mentions.

* Change backgroud color of icon.

* Improve empty states for flagged and pinned posts.

* Update pinned posts' test snapshot.

* Change NoResult style as per figma specs.

* Change NoResults icons according to UX specs.

* Change style according to UX feedback.
2020-09-03 22:21:36 -04:00
Miguel Alatzar
4f4be1b319
[MM-28245] Handle upload files only for top screen (#4761)
* Handle upload files only for top screen

* Return early in handlePasteFiles too
2020-09-01 12:36:51 -07:00
Elias Nahum
dce5675f05
Add word boundaries for (all | channel | here) (#4754)
* Add word boundaries for (all | channel | here)

* do not include underscore in channel wide mention highlight

* Regex suggested in code review

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Restyle at_mention suffix

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2020-09-01 10:13:49 -07:00
Ashish Bhate
0210cc4761
[MM-15477][MM-27540][MM-27541]: fix search inconsistencies using in:@ / in: (#4704)
* [MM-15477] reorder search suggest results

* allow searching dms and gms with 'in:@'

* fix sort order for private before public

* faster than regex

* remove server minimum version prop and checks
2020-09-01 10:08:17 -07:00
Saturnino Abril
f05faaa949
E2E: Initial Detox setup for Mobile UI automation (#4535)
* initial Detox setup for mobile UI automation

* fix iOS allow permission on opening the app, add npm script to root folder, fix test when using longer site URL and add detox dependency to root for android build dependency

* remove detox proguardFile

* update packages and emulator

* change folder build on local and CI

* add test to post a message, ability to have test in isolation, server API commands, server config, dependency updates and update folder structure

* update snapshot

* update detox and do clean up

* update dependencies
2020-08-29 07:18:41 +08:00
Elias Nahum
1d0fc0510c
MM-25684 Highlight at-mention followed by a period (#4733)
* MM-25684 Highlight at-mention followed by a period

* Refactor at_mention to not highlight the period

* Do not add a link for invalid mentions

* Suggested review

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

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-08-28 12:59:01 -04:00
Elias Nahum
514ba57a8e
Show arrows in calendar (#4745)
* Show arrows in calendar

* Set calendar arrow size platform specific
2020-08-28 09:08:10 -07:00
Miguel Alatzar
288caf5e48
Store value before resetting text input (#4744) 2020-08-28 08:07:13 -04:00