Commit graph

131 commits

Author SHA1 Message Date
Elias Nahum
ee2a25df84
Fix iOS crash when pasting large images and included other file types (#3424)
* Fix iOS crash when pasting large images and included other file types

* Rename pasteImages to pasteFiles and fix copying heic images

* remove comment

* Feedback review
2019-10-24 20:41:38 +03:00
Joram Wilander
3f3a7630cc
MM-18832 Update message count string (#3349)
* Update message count string

* Update defaultMessage
2019-09-30 08:45:45 -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
Elias Nahum
218e104010 Fix paste files with multiple instances of post textbox (#3302) 2019-09-25 17:03:14 +08:00
Ewe Tek Min
0d1fd78263 MM-9599 Paste image from clipboard (#3084)
* Show image paste menu

* Get pasted image

* Add more info for file

* Add custom text input and add extension

* Dismiss contextual menu after paste image

* Group image info together

* Add max file check

* Fix max file size text

* Add PropTypes

* Add support for gif and tiff

* add onchange null check

* Use onPaste event

* Move get image info logic

* Clean up listener when no observer

* Add android upload

* Copy file from google docs

* Clean up file after upload

* Prevent text pasted in textbox if it's content uri

* Rename paste file thread

* Move on paste listener logic

* Remove the redundant data in ios

* Get realpath of item

* Clean up

* Only download for image

* Rename to custom text input

* Update RNPasteableEditTextOnPasteListener.java

* Handle for download image failed

* Fix eslint

* Fix test

* Allow multiple images to be pasted

* Remove additional null check

* Add managed control for Android

* Disable only copy, cut and paste

* Accept image in Android edit text

* Add comment for custom text input

* Do not upload when more than max file

* Stop uplaod when exceed file size

* Fix crash when clip data is null

* Return error to JS

* Move download file logic

* Remove console

* Add some tests

* Add test for handleUploadImages

* Add test for file_upload_item

* Use ImageCacheManager to cache remote images

* Fix crashes from one note

* Remove commented code

* Update test
2019-09-16 20:10:14 -03:00
Miguel Alatzar
b795a0bba4 [MM-18361] Style text inputs and post options with theme (#3213)
* Style text inputs with theme

* Add snapshot test

* Use theme for post options background and text colors

* Use theme for post options icon color

* Use theme for reaction list

* Use theme for slide up indicator

* Fix post options localization

* PM Feedback review

* Slideup PM changes and channel edit

* fix tests

* Fix i18n
2019-09-13 10:24:36 -03:00
Asaad Mahmood
d8adb25640 MM-17966 - Updating background for archive wrapper (#3206) 2019-09-05 22:43:52 +09:00
Devin Binnie
e2031de0ab
[MM-18172] Added state for message length such that alerts for long length aren't fired too often (#3218)
* [MM-18172] Added state for message length such that alerts for long length aren't fired too often

* Added a test

* Naming change
2019-09-05 09:12:21 -04:00
Matheus Cardoso
73518da91e Make keyboard dark on dark themes (iOS only) (#3102)
* Support keyboardAppearance theme parameter

* Change approach of keyboardAppearance to auto-detect

* Fix style

* Update snapshots

* Add unit test for getKeyboardAppearanceFromTheme

* Update snapshot

* Fix failing test
2019-08-23 13:18:05 -04:00
Harrison Healey
0faeb535b9 MM-17425/MM-17683 Disable Send button when sending post (#3099)
* MM-17425/MM-17683 Disable Send button when sending post

* Update snapshot and add tests
2019-08-14 08:29:55 -07:00
Elias Nahum
06e333dc52
MM-10193 Apply SafeAreaView to Landscape views (#3003) (#3081)
* MM-10193 for landscape Feature

Commit for MM-10193 to the landscape feature with latest pull.
This is the initial commit with SafeAreaView in place, but should not be merged into master as this is step one and not suitable for production.
Another commit will be following with adjustments to allow SafeAreaView to display correctly for users.

* MM-10193 for landscape Feature

Commit for MM-10193 to the landscape feature with latest pull.
This is the initial commit with SafeAreaView in place, but should not be merged into master as this is step one and not suitable for production.
Another commit will be following with adjustments to allow SafeAreaView to display correctly for users.

* MM-10193 Extend design elements for iPhoneX SafeAreaViews

This is the second portion of the MM-10193 changes for the landscape feature. This item was to extend the design elements for the application into the SafeAreaView so the application looks uniform on the iPhoneX.

* MM-10193 Patch for Snapshot tests and eslint

* MM-10193 Re-Patch

These chanbes mistakenly got reverted from last Patch

* MM-10193 Updates for PR

Fixed the 4 screens from the text box that were missed.
Updated the padding to run from a method.

* Revert "MM-10193 Updates for PR"

This reverts commit fe8d650ce3ca2828d8c94e4af470649aa2582ec1.

* MM-10193 Updates for PR

This reverts commit 4966d83d5401720d26ca22a55cf8f92f1657b7e2.
Applied Updated Snapshots

* MM-10193 Updated Modifier for iphone_x_spacing

Updated Modifier for iphone_x_spacing

* MM-10193 Updates for Review

Review changes for Post Textbox and a few states that were unavailable.

* MM-10193 Fix Longpress padding

Fixed longpress padding for Channel Info and Edit Post views.

* MM-10193 Update isLandscape

Updated isLandscape to pull directly from dimensions.
Updated padding for Recent Mentions and Flagged Posts.

* MM-10193 Updates for review longpost

Updated for longpost padding.
Fixed issue with notifications not padding right correctly.

* MM-10193 Update with Cleanup

Reverted Cocoapods back to 1.5.3.
Cleaned up spacing in two files.

* MM-10193 Merge Conflict Updates

Updates to resolve merge conflicts
2019-08-09 11:14:38 -04:00
Hossein Ahmadian-Yazdi
55bd6a2f7e [MM-13849] Display confirmation box for [at]all and [at]channel (#3028)
* [MM-13849] Display confirmation box for @all and @channel

* [MM-13849] Fetch Channel stats when user changes channel

* [MM-13849] Address PR comments

* [MM-13849] Addressed PR comments

* [MM-13849] Made getChannelStats into it's own statement
2019-08-08 16:21:52 -04:00
Miguel Alatzar
55964d2fda
Add placeholderTextColor when using placeholders (#2976) 2019-07-17 12:56:25 -07:00
Miguel Alatzar
5eee2b7652
[MM-16139] [MM-16140] [MM-16141] Update the remaining screens/components (#2920)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Upate NotificationSettings

* Update NotificationSettingsAutoResponder

* Update NotificationSettingsMentions

* Update NotificationSettingsMobile

* Update CreateChannel and children

* Update MoreChannels

* Update ChannelPeek and children

* Update ChannelNavBar and children

* Update ChannelPostList and children

* Update ChannelInfo and children

* Update ChannelAddMembers

* Update ChannelMembers

* Update EditChannel

* Fix setting of top bar buttons

* Update Channel screen and children

* Update PinnedPosts

* Update LongPost

* Update PostOptions

* Update PostTextboxBase

* Update EditPost

* Check-styles fix

* Update DisplaySettings

* Update Timezone

* Update SelectTimezone

* Update IntlWrapper and Notification

* Update InteractiveDialog and children

* Update ExpandedAnnouncementBanner

* Update ClientUpgradeListener

* Update MoreDirectMessages

* Update SelectorScreen

* Update UserProfile

* Update Thread

* Update About

* Update ImagePreview

* Update TextPreview

* Update AddReaction

* Update ReactionList and children

* Update Code

* Update TermsOfService

* Update Permalink

* Update Permalink

* Update ErrorTeamsList

* Update Search

* Remove navigator prop

* Fix setButtons calls

* Remove navigationComponentId

* Fix test

* Handle in-app notifs in global event handler

* Fix in-app notification handling

* Fix typo

* Fix tests

* Auto dismiss in-app notif after 5 seconds

* Fix typo

* Update overlay dismissal

* Animate in-app notif dismissal and allow gesture dismissal
2019-07-08 10:03:31 -07:00
Miguel Alatzar
51aac1e6e7 Merge branch 'master' into rnn-v2 2019-07-02 18:15:19 -07:00
Miguel Alatzar
c278614ca1 [MM-16137] Update post related screens (#2916)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Upate NotificationSettings

* Update NotificationSettingsAutoResponder

* Update NotificationSettingsMentions

* Update NotificationSettingsMobile

* Update CreateChannel and children

* Update MoreChannels

* Update ChannelPeek and children

* Update ChannelNavBar and children

* Update ChannelPostList and children

* Update ChannelInfo and children

* Update ChannelAddMembers

* Update ChannelMembers

* Update EditChannel

* Fix setting of top bar buttons

* Update Channel screen and children

* Update PinnedPosts

* Update LongPost

* Update PostOptions

* Update PostTextboxBase

* Update EditPost

* Check-styles fix

* Remove navigationComponentId
2019-06-26 18:10:41 -04:00
Elias Nahum
e6fdef3451 MM-16397 save draft when app state changes (#2899)
* MM-16397 save draft when app state changes

* Unit tests
2019-06-22 11:21:57 -07:00
Elias Nahum
4d664f6654
Fix file upload not completing (#2866)
* Fix file upload not completing

* Update snapshots
2019-06-06 08:39:06 -04:00
Elias Nahum
de37a2aa7a
Fix autocomplete showing behind the keyboard on iOS and not working on Android (#2830)
* Fix autocomplete showing behind the keyboard on iOS and not working on Android

* Unbundle config for Android

* Dismiss keyboard on post long press, fix scroll to bottom on new message and update tests

* Add a timeout before scrolling to give time to render the last post

* Fix crash on Android
2019-05-27 19:18:43 -04:00
Elias Nahum
f7f56e958b
MM-9494 & MM-13888 Tapping execute actions & interactive keyboard dismissal (#2799)
* MM-9494 & MM-13888 Tapping with the keyboard opened executes the action & iOS iteractive keyboard

* Fix tests

* feedback review

* add new line at the end of file

* feedback review and added todo list

* Track interactive dismiss keyboard and set scrollview bounds natively

* Fix snapshots

* Fastlane default to current branch when no BRANCH_TO_BUILD is set

* Set NODE_OPTIONS in ios build script

* Rebind scrollview when channel gets first set of posts

* Keep scrolling momentum on keyboard close

* Update react-native-keyboard-tracking-view

* Fix ScrollView offset with keyboard-tracking

* Fix offset while dragging the keyboard

* Allow action on channel drawer on tablets

* Fix typo

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>

* Fix indentation
2019-05-20 12:02:00 -04:00
Elias Nahum
d0071c21b0 MM-15282 Fix cutoff placeholder on Android (#2798)
* MM-15282 Fix cutoff placeholder on Android

* Feedback review
2019-05-16 17:35:09 -07:00
Elias Nahum
f36ee37402
Upgrade to RN 0.59.6 and dependencies (#2777)
* Upgrade to RN 0.59.6 and dependencies

* Remove channel loader unused style

* Update to the latest netInfo that fixes a crash

* Do not set default timezone with moment

* Use RN 0.59.8
2019-05-13 13:33:18 -04:00
Miguel Alatzar
45e5bae8da
Avoid possible reading of length property on undefined (#2783) 2019-05-10 09:34:23 -07:00
Elias Nahum
5ce9208d32 MM-14958 Scroll to bottom when posting a new message (#2761) 2019-05-07 13:28:16 +05:30
Joram Wilander
df2ecf3409
Add native module to reset TextInput to fix bad cursors in some Android keyboards (#2753) 2019-05-01 09:27:21 -04:00
Courtney Pattison
ce5c30e9ca [MM-9454] Added fade to send button (#2677)
* [MM-9454] Added jest-enzyme to devDependencies

* [MM-9454] Refactored SendButton as component

* [MM-9454] Added fade to SendButton

* [MM-9454] Changed Fade to PureComponent
2019-04-29 07:54:00 -07:00
Miguel Alatzar
dc554bdfa7
Delay PostTextbox animation on iOS when clearing text (#2739) 2019-04-25 07:51:47 -07:00
Miguel Alatzar
89c0d1b5f9
Increase Typing animation duration and remove handleScrollToRecentPost (#2730) 2019-04-23 14:49:15 -07:00
Elias Nahum
5183bc4b50 MM-15215 fix crash caused by malformed post textbox localize string 2019-04-18 18:24:36 -04:00
Elias Nahum
9ecec88603
MM-13419 Fix leaving private channel from another client (#2442) 2018-12-10 10:55:01 -03:00
Harrison Healey
883de604d8 Fix comma splice typo (#2343) 2018-11-19 14:51:37 -03: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
Harrison Healey
4e251d392a
MM-12189 Set autocomplete max height based off available space (#2218)
* MM-12189 Set autocomplete max height based off available space

* Have each autocomplete type determine its own max height since DateSuggestion needs more space

* Remove unused props and ref
2018-10-05 09:58:05 -04:00
Jesús Espino
2a75ee022c
MM-11606: Back to prev channel on close archived channel (#2183) 2018-09-27 19:02:02 +02:00
Jesús Espino
8884293b18 Add t() translation mark to i18nable strings and update translations (#2026)
* Add t() translation mark to i18nable strings and update translations

* Small fixes

* Adding  to the packager

* Rebase fixes

* Added missed texts
2018-09-21 11:25:38 -03:00
Elias Nahum
637ca9244a
Update RN to version 0.57.0 (#2131) 2018-09-20 19:05:41 -03:00
Martin Kraft
0d0dfb1057 MM-11070: Adds ability to view archived channels. (#1927)
* MM-11070: Adds ability to view archived channels.

* MM-11070: Switches to existing selector.

* MM-11070: Uses boolean prop instead of object.

* MM-11070: Reuses web translations.

* MM-11070: Adds archived message to thread view. Switches to selector for postIDs of archived channels.

* MM-11070: Removed unused import.

* MM-11070: Removes edit and delete options from longpress of archived posts.

* MM-11070: Moves closure variable.

* MM-11070: Switch from hard-coded to theme color.

* MM-11070: Hides actions in header of archived channels.

* MM-11070: Updates Redux.

* MM-11070: Re-adds the 'Leave Channel' option for archived channels.
2018-07-31 15:27:38 -04:00
Elias Nahum
26389994d7
If slash command fails leave the command in the textbox 2018-07-12 19:21:53 -04:00
Elias Nahum
ca4d08fc7e
Use TextInput instead of QuickTextInput on Android (#1904) 2018-07-09 18:33:31 -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
375c41dc3c
Merge branch 'release-1.9' 2018-06-25 15:31:46 -04:00
Harrison Healey
f30d278cf1 Revert "MM-10822 Change post textbox to only be partially connected" (#1820)
This reverts commit 3703309fad.
2018-06-25 11:39:17 -04:00
Chris Duarte
1a3558bc5e Auto responder feature (#1500)
* Add Auto Responder support

Add Auto Responder message support for <Post/>

Add Out Of Office support

Add Confirmation dialog for Out Of Office status reset

Fixing styling issues

Ensure AutoResponder is enabled in settings with ooo status

Save AutoResponder according to Out Of Office status

Fix copy for AutoResponder hint

Fix eslint errors

* Add constants from Redux

* Small refactor

* Add name consistency with the feature "auto responder"

* Add minimum server version of 4.9 for AutoResponder support

* Add ViewTypes.PROFILE_PICTURE_SIZE in post_profile_picture

* Add ExperimentalEnableAutomaticReplies flag

* Update copy and auto responder styles

* Remove unwanted imports

* AutoResponder feauture in 4.9

* Add AutoResponder Thread support

* Fix OOF copy from review

* Change copy for Auto Responder

* Address feedback

* Fix license headers

* Status name translated in Alert

* Add umbrella icon for AutoResponder

* Fix minor issues with rebase

* Fix License headers
2018-06-22 13:09:37 -04:00
Harrison Healey
92b992d204
MM-10822 Change post textbox to only be partially connected 2018-06-21 18:13:02 -04:00
Jesse Hallam
8372e95d4a add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
Harrison Healey
3703309fad MM-10822 Change post textbox to only be partially connected 2018-06-18 16:05:42 -04:00
Elias Nahum
19729db610
Fix user is typing cut off on iOS (#1744) 2018-06-08 17:35:33 -04:00
Elias Nahum
c171ae4809
Enable Android Unbundle strategy (perf part 2) (#1700)
* Enable Android Unbundle strategy

* feedback review

* Update modulePaths

* Add npm start and use it in the Makefile

* feedback review #2
2018-05-23 13:23:38 -04:00
Elias Nahum
80dd9366a1 Update Dependencies (#1641)
* Update dependencies including react-native

* Update react-native-circle-progress dependency

* Fix prop warnings and possible crashes
2018-04-27 17:49:09 -04:00
Chris Duarte
676a180067 Fix press username to mention (#1547)
* Fix press username press to mention

* Add cursorPosition to post_textbx state

* Remove unneeded draftSelectionChanged actions and events
2018-04-13 11:15:19 -04:00