Commit graph

40 commits

Author SHA1 Message Date
Joseph Baylon
04bb204191
Fix eol-last lint issues (#4996) 2020-12-01 14:18:32 -03:00
Joseph Baylon
67398d83cb
Add eslint eol-last to require newline at end of files (#4985) 2020-11-30 21:46:05 -07:00
Joseph Baylon
5f6fd6df7a
MM-30286 Detox/E2E: Add e2e test for MM-T3236 and added basic unit tests (#4969)
* MM-30286 Detox/E2E: Add e2e test for MM-T3236

* Fix more testID hierarchies

* Fix typo

* Fix failing test

* Remove extra lines

* Updated to use string interpolation

* Update channels list element query

* Updated channel item unit test to be more consistent

* Fix error text testID hierarchies; fix edit channel info testIDs

* Fix snap file

* Fix line return
2020-11-24 16:58:09 +08: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
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
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
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
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
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
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
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
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
Saturnino Abril
6e03ba8351
reintroduce @testing-library/react-native now with v7 (#4766) 2020-09-15 09:24:54 -07:00
Elias Nahum
b55e88d0fe
Save draft when post input unmounts (#4785) 2020-09-09 12:03:07 -03: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
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
Miguel Alatzar
288caf5e48
Store value before resetting text input (#4744) 2020-08-28 08:07:13 -04:00
Farhan Munshi
c21b61bef2
[MM-27132] Handle group mention keys for group synced channels and teams (#4726)
* Handle group synced channel highlighting better

* Add tests

* Dont check if teamRoleFound if no teamId given for haveIChannelPermission

* Pass team id for channel mentions and group mentions checks

* Actually make a selector

* Check for falsey teamId instead of undefined

* Remove true &&

* Iterate over object values instead of for in
2020-08-26 10:00:32 -07:00
Miguel Alatzar
6305fd597d
Check for undefined channel (#4650) 2020-08-07 10:28:19 -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
Shota Gvinepadze
5465133c87
Add analytics to the command autocomplete (#4597)
* Add analytics to the command autocomplete

* Refactor analytics

* Refactor reset method
2020-07-23 19:57:42 +04:00
Miguel Alatzar
a5319eb74c
Don't set state.inputValue in constructor (#4606) 2020-07-23 08:54:58 -07:00
Elias Nahum
26fa5a5e8f
Allow to post attachment only messages (#4590) 2020-07-20 17:53:54 -04:00
Shota Gvinepadze
c1eff885e7
[MM-25749] Implement non-cached autocomplete for mobile (#4579)
* Implement non-cached autocomplete for mobile

* Add partial caching support

* Fix whitespace

* Implement suggestion fetching using actions
2020-07-20 16:32:47 -04:00
Hossein Ahmadian-Yazdi
22d77689f7
[MM 23785] Show confirmation dialogue when mention groups 2 (#4548)
* 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>
2020-07-17 12:15:01 -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
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
Elias Nahum
57e4b17ade
MM-25670 perform search when hitting Enter on HW keyboard (#4432) 2020-06-17 22:13:34 -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
Elias Nahum
d100d646f2
Bump upload timeout to 1 min (#4345) 2020-05-27 12:42:56 -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
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
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
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