Commit Graph

21 Commits

Author SHA1 Message Date
Elias Nahum
8287e620d8 Upgrade to rn 0.66.1 (#5727)
* Upgrade to rn 0.66.0

* Add keys to re-render post list and channel list

* Finish dep updates and rn to 0.66.1

* upgrade more dependencies

* Fix select_server tests
2021-10-31 13:57:07 -03:00
Elias Nahum
a28a3826fa update dependencies (#5706) 2021-10-01 11:45:53 -03:00
Elias Nahum
ada6be9b7a Update dependencies (#5686)
* Update dependencies

* Fix unsigned builds
2021-09-22 13:54:12 -03:00
Elias Nahum
558c90c8da Upgrade iOS minimum version to 12.1 and ESR to 5.37 (#5660) 2021-09-02 09:01:04 -04:00
Manoj Malik
14d377e713 MM-36917 Custom status expiry (#5434)
* Started with the custom status feature
Added custom status actions and API integration
Added custom status selectors and types
Added custom status emoji component
Added EnableCustomStatuses flag in config
Added Set a status option in the settings sidebar

* Fixed emoji and added clear button
Fixed the default emoji in the set a status in the settings sidebar
Made a custom status label component to match the styling of rest of the drawer items
Fixed the bug in the selectors
Added localization id in en.json

* Added icon for clear button
Fixed the custom status label issue
Added styling and icon for the clear button
Fixed order of the localization ids

* Made custom status modal with suggestions
Fixed the long custom status overflowing in the sidebar with ellipses
Added the functionality to open custom status modal from sidebar
Made the constants for custom status
Made the custom status suggestion functional component
Made the custom status modal functional component
Made the selector for the recent custom statuses
Added some localization ids

* Changed the custom status modal to class component
Added recent custom statuses in the modal
Fixed the styling of titles
Fixed lint errors except one

* Fix types and use i18n translations

* Update types

* Refactored some code and made clear button component
Refactored the code of the custom status label to a different file and used it everywhere
Made a separate component for clear button and added it in recents and sidebar
Fixed the styling of the custom status text according to the new figma designs

* Added emojipicker in custom status modal
Fixed the Done button in custom status modal
Added the functionality to clear status from inside the modal

* Added custom status in user profile and post header and review fixes
Added custom status in user profile page
Added custom status emoji in post header
Added functionality to preventDoubleTap everywhere
Added localization ids
Review fixes

* Fixed several issues
Increased touch area of clear button everywhere
Fixed the event propagation issue in clearing suggestions
Fixed the center alignment issue of title in custom status modal
Added clear button in user profile page
Review fixes

* Fix types for custom status modal

* Fix tsc

* Fixed types and separated functions for Recent and suggestions in custom status modal

* Update app/components/sidebars/settings/settings_sidebar_base.js

* Updated localization id in settings sidebar

* Changed the method in removeRecentCustomStatus API call
Changed names of some variables

* Fixed the input height issue in ios and modalContext issue in ios

* Fixed various issues
Fixed clear button border radius issue in ios
Changed the method to post in removeRecentCustomStatus API call
Made the custom status modal input single line and fixed the height
Changed the height of iconContainer in custom status suggestion

* Fixed the event propagation issue without use of PanResponder

* Unit tests

Added unit tests for custom status emoji component
Added unit tests for custom status text component
Added unit tests for clear button component
Added unit tests for custom status suggestion component
Added unit tests for custom status modal component
Added tests and updated snapshtots in user profile screen

* Added custom status in several new locations
Added custom status emoji in LHS channel list
Added custom status emoji in channel header
Added custom status in channel info header
Modified the styles of some components

* Fixed width issue in LHS channel list and channel title (#8)

Added one check in channel info header

* E2E tests for custom status (#6)

* Completed MM-T3890, MM-T3891, MM-T3892, MM-T3893 e2e tests

Added EnableCustomUserStatuses in default config of detox
Added several testIDs in custom status modal and clear button components
Modified settings_sidebar ui component in detox support
Made custom status screen ui screen in detox support
Added testIDs in custom status suggestion and clear buttons
Modified custom status ui screen component in detox support
Added appropriate comments in the tests
Modified custom status emoji component to accept styling and added testID
Modified the custom status emoji styling in post header, user profile, LHS channel list, channel info header, channel title
Made user profile screen in detox support
Added testID prop in custom status emoji component
Added testIDs in channel info header and user profile and user profile row components

* Added unit tests for new components and updated tests for custom status emoji

Updated snapshots for existing components
Added new tests for channel title and LHS channel item
Added new tests for channel info and channel info header
Updated snapshots

* Fixed styles and emoji opacity in custom status input in modal

* Fixed the color of text and emoji in custom status suggestions
* Fixed the color of emoji and font size in the custom status input in modal

* Updated snapshots

* Fix the MM-T3893 E2E test case

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

* Apply suggestions from code review

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

* Updated snapshots and moved the custom status e2e test to different location

* Fix styles

* Fix ios styles

* Update snapshots

* Updated styles and localization ids

* Changed the API call for the remove recent custom status action (#12)

* Fix styles for ios

* Fixed styles in Android
Fixed the styling of clear button everywhere
Fixed the separator not showing issue in custom status suggestion
Fixed the emoji positioning issue in custom status suggestion

* Fixed tests and updated snapshots

* Fix stylessss for ios

* Updated snapshots

* Added close button and title in emojipicker screen opened from custom status modal

* Fixed the delay issue in clearing and setting the custom status in settings sidebar (#13)

* Fixed the delay issue in clearing the custom status in settings sidebar
Modified the unsetCustomStatus action to use request statuses
Modified the settings sidebar to use the request status to show or hide custom status
Made proper types and reducers for the unset custom status request

* Added the Retry message for setting and clearing the custom status
Made set custom status request action types and reducers
Modified the setCustomStatus action to dispatch request status actions
Made the retryMessage component
Added the logic for when to show the retry message

* Modified set custom status action to dispatch Update me action with the new custom status

* Modified the settings sidebar to use componentDidUpdate for the delay issue in custom status clearing and setting

* Modified componentDidUpdate and made a new function for handling request status change

* Modified handleRequestStatusChange function to two separate functions

* Code refactoring

* Updated tests

* Fixed the issue for custom status not updating in settings sidebar when changed from another client

* Fixed the issue for custom status not updating in settings sidebar when changed from another client
* Fixed the IOS UI issues
    - Fixed the font-weight of the channel header custom status
    - Fixed the extra space added on typing in input issue
* Fix custom status e2e tests

* Fixed the custom status input click area issue

* Fix custom status input touchable area

* added expiry time to custom status

* removed spaces from en.json

* Updated snapshots

* Updated snapshots

* added some ui changes to expiry stuff in custom status

* Apply suggestions from code review

Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>

* Review fixes (#15)

* Review fixes
Sorted the import order in all files
Modified removeRecentCustomStatus action not to use bindClientFunction
Added types for custom status client functions
Added containerSize prop in clear button component
Removed the check for custom status enabled from custom status emoji and added it in post_header, channel_title, channel_item
Modified getCustomStatusSelector to return undefined if custom status does not exist
Modified settings_sidebar, channel_info, channel_info_header, custom_status_modal, user_profile to handle undefined custom status
Removed the text wrapper from the custom status emoji in channel_info_header
Added check for identifying the navigation button pressed in custom status modal

* Added server version check in isCustomStatusEnabled selector

* Refactored some code and added types in style in custom status modal
Added type in custom status suggestion functions in custom status modal
Refactored some code

* Fixed failing tests and updated snapshots

* Expiry Time functionality added

* Updated snapshot for clear button component

* ran npm run fix

* Added timezone functionality to custom status expiry

* Merged custom status into test-1230

* Review fixes

Removed logic for tracking requests for setting and unsetting custom status
Added logic for clearing status without delay in settings sidebar
Added event for set custom status failure and attached listener in settings sidebar
Added feature in custom status text component to accept string or FormattedText as prop and ellipsizeMode and numberOfLines as well
Removed labelSibling and failureText props from drawer item
Passed clearButton and retryMessage in labelComponent from settings sidebar to drawer item
Replaced Text with CustomStatusText in channel info header
Added localization in the custom status suggestions
Added exception handling in the getRecentCustomStatuses selector

* Fixed drawer item unit tests and updated snapshots

* Fixed UI issues for IOS in settings sidebar and main sidebar

* Updated snapshots

* Refactored duration code in custom status suggestion

* Review fixes
Removed check for user null or undefined from setCustomStatus action
Refactored some code in custom status emoji and post header
Memoized handleClear in custom status suggestion
Made stylesheet in settings_sidebar and added all styles there
Consolidated openCustomStatusModal function inside goToCustomStatusScreen

* Refactored some code
Refactored some code in set custom status action
Updated name of a unit test in drawer item and updated snapshot

* added ui fixes to date time picker component and displayExpiryTime
component

* Removed server version check for testing

* bug fix with timezone and statusSame

* Review UI fixes (#18)

Changed the padding for custom status both in settings sidebar and custom status suggestions
Changed the position of clear button in the settings sidebar

* UI fix in user profile screen
Fixed the call to apiGetChannelByName in custom status e2e test

* Added server version check for custom status feature

* Updated snapshots

* modified testIDs, output rendering logic

* Review fixes
Converted mapStateToProps to makeMapStateToProps and moved makeGetCustomStatus call inside them in several components

* Removed the server version check and fixed showing custom status in user profile bug

* Updated datetime picker version and fixed timezone issue
Fixed the memoization issue in getCurrentUserTimezone selector
Refactored the getCurrentDateTimeForTimezone to getCurrentMomentForTimezone
Added the timezoneOffsetInMinutes prop to the datetime picker

* Fixed ios UI issues
Fixed the positioning of Clear after in custom status modal in ios
Fixed the positioning of spinner date time picker in ios

* expiry time now showing in custom status,clear after modals

* Fixed the custom status not showing in user profile of other users if own status is not set

* Changed the emoji size in the channel title

* Updated snapshots

* Added custom status emoji in post header
Fixed the lint errors and type check errors

* Updated snapshots
Fixed the prop type isMilitaryTime for user_profile screen

* UI fixes and code refactoring (#19)

* added date time picker, fixed spacing in some components

* UI fixes, added isCustomStatusExpired selector

* removed extra spaces from package-lock.json

* Review Fixes, upgraded datetimepicker version

* Refactored some code

* Refactored some code

* Added server version check for the custom status feature

* Merge master into custom-status-expiry

* Review fixes and corrected import order

* Resolved tsc errors, corrected intl usage

* Code refactoring and minor bug fixes
Fixed the default value of isCustomStatusExpired in mapStateToProps from false to true in all components
Changed the ids of various expiry dropdown texts
Fixed the order of ids in en.json

* Changed date time format in front of Custom option in Clear after modal (#20)

* Corrected 'check' usage in front of 'Custom' in clear-after-modal

* Renamed clear_after_suggestions to clear_after_menu_item. removed unused
code

* Added unit tests and e2e tests

* Review fixes
Removed custom status clear after modal as a connected component

* Updated failing snapshot

* Review UI fixes
Changed the size of expiry time in channel header and fixed the width of custom status text along with the position of the emoji
Fixed the divider between custom status input and Clear after in the custom status modal
Changed the size of expiry time in custom status suggestions
Fixed the position of the tick in the clear after modal

* Updated snapshots

* Review fixes: Code refactoring

* Updated snapshots

* Code refactoring and fixed several issues
Updated and added unit tests for custom_status_expiry component
Refactored some code in custom_status_modal and clear_after_modal
Increased the size of the back icon in the Clear after modal
Added the logic for showing Clear after option only when the status is set
Added 30 minute intervals in the timepicker

* Custom status expiry review fixes (#24)

* Added server version check for custom status expiry and review fixes
Made an isCustomStatusExpirySupported selector for checking server version
Modified custom status modal not to show clear after row if expiry not supported
Fixed the bug of status not setting if expiry not supported
Added the logic for hiding the duratiion from suggestions if expiry not supported
Changed the transitioning of opening Clear After modal to open in the same stack level
Added the expiry supported check in settings sidebar and channel info screen and fixed the UI issues
Code refactoring

* Fixed the Back icon in the Clear after modal

* Fixed the Clear after flow and e2e tests
Fixed the Set status modal closing issue on closing Clear after modal
Added the feature to show Today in the custom status expiry component
Refactored and fixed the e2e tests for custom status expiry
Refactored some code in the Clear After modal

* Fixed unit tests and updated snapshots

* Fixed the bug showing invalid date in the Clear after field in the Set status modal

* Updated package-lock.json

* Code refactoring

* UI fixes in the user profile page
Added isExpirySupported check in the user profile page

* Fixed unit test and updated snapshot

* Updated snapshot for user_profile

* Review fixes: Code refactoring

* Fixed failing snapshots

* Fixed the MM-T4092 e2e test for ios (#25)

* Review fixes: Code refactoring
Deleted app/screens/custom_status_clear_after/index.ts file and changed import paths

* Code refactoring in e2e tests and updated eslint no shadow rule

* Disallowed the selection of past time in custom status date time picker

Co-authored-by: Chetanya Kandhari <chetanya.kandhari@brightscout.com>
Co-authored-by: Manoj <77336594+manojosh@users.noreply.github.com>
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Chetanya Kandhari <availchet@gmail.com>
Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
2021-07-23 04:02:19 +08:00
Elias Nahum
47d081b216 Content safety (#5486)
* add content safety check to avoid potential crashes

* Fixes iOS YouTube video playback
2021-06-25 14:23:23 -04:00
Elias Nahum
9f238d5ef4 Post List & post components refactored (#5409)
* Update transform to make Android's post list scroll smooth

* set start since metric when appStarted is false

* Refactor Formatted components

* Downgrade RNN to 7.13.0 & patch XCDYouTube to allow video playback

* Refactor Post list and all related components

* review suggestion rename hour12 to isMilitaryTime

* feedback review use aliases

* feedback review deconstruct actions in markdown_link

* feedback review simplify if/else statement in combined_used_activity

* Simplify if statement for consecutive posts

* Specify npm version to build iOS on CI

* Refactor network_indicator

* render Icon in file gallery with transparent background

* Increase timeout to scroll to bottom when posting a new message

* fix: scroll when tapping on the new messages bar

* fix: dismiss all modals

* fix navigation tests

* Handle dismissAllModals for iOS to prevent blank screens

* Prevent modal from dismissing when showing the thread screen in the stack

* Update app/components/image_viewport.tsx

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

* Update app/utils/post.ts

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

* Apply suggestions from code review

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

* fix: rename selector and prop

* Fix XCDYouTube patch

* Fix posting from a thread in the right channel

* do not render reply bar on the thread screen

* close previous permalink before showing a new one

* move XCDYouTube patch to ios/patches folder

* closePermalink directly instead of using an onClose prop

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2021-06-03 11:12:15 -07:00
Elias Nahum
f8a0f29237 Update dependencies (#5266)
* Update dependencies

* Fix lint, use npm@6

* Fix unit tests

* Dowgrade Fastlane

* Fix Fastlane script

* use android:api-29-node ci image

* Infer gradle json file from apk output folder

* Fastlane to Parse new version of gradle output-metadata.json
2021-04-06 11:12:31 -04:00
Elias Nahum
a8a4d72075 Upgrade Dependencies (#5103)
* Update fastlane

* Update detox & deps

* Upgrade cocoapods

* Upgrade dependencies
2021-01-13 12:36:31 -07:00
Elias Nahum
b226d451f3 update dependencies (#4958)
* 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
2020-11-18 19:45:07 -07:00
Elias Nahum
a99e938e9c MM-26817 Upgrade to RN 0.63 (#4566)
* Upgrade to RN 0.63

* Bump to RN 0.63.1

* Fix RN patch

* Use JSC Intl version

* Update android/app/build.gradle

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

* Fix Android external storage permission

* Fix emoji imageUrl when no server url is present

* Patch react-native-image-picker

* Allow to post attachment only messages

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-07-20 18:08:11 -04: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
Elias Nahum
7c09334dc4 Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Elias Nahum
16c9349490 MM-20729 & MM-20731 Fix YouTube playback and rotation (#3621) 2019-11-28 00:19:12 -05: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 52aca776b1.

* 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 5ef383be26.

* 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 b2a79e184b.

* 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
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
Miguel Alatzar
2cfb6f1136 [MM-18656] Update third party libraries to use WKWebView over UIWebView (#3353)
* Use updated react-native-keyboard-tracking-view

* Use updated react-native-device-info

* Use updated react-native-device-info and add new pod dependency
2019-10-02 11:02:06 -04:00
Elias Nahum
68a3825d95 Update dependencies (#2316) 2018-11-18 17:54:06 -03:00
enahum
9910e3438d Upgrade RN (#1102) 2017-11-07 13:34:39 -03:00
enahum
7aebcbd52e Link Previews (#890)
* Link previews, Image previews and YouTube

* Install cocoapods dependencies
2017-09-12 15:06:19 -03:00