Commit graph

30 commits

Author SHA1 Message Date
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
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
Elias Nahum
e87858d7af Various fixes (#3078)
* MM-17588 Remove navigation component from stack

* MM-175986 Fix Clock Display Settings on iOS

* Fix markdown and team icon currentServerUrl

* Fix closing permalink logs out the user

* Fix file attachment document ref

* Fix applyTheme when changing a theme in the app

* Feedback review

* remove / when fetching the image on the markdown table on relative paths
2019-08-08 22:28:07 +08: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
150253d392
[MM-16012] [MM-16084] Update screens related to settings sidebar + update SearchResultPost screen and its children (#2913)
* 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

* Check-style fix

* Address review comments
2019-06-24 12:52:08 -07:00
Miguel Alatzar
7d67f1214e
[MM-16008] Update setNavigatorStyles and replace setOnNavigatorEvent (#2877)
* Update setNavigatorStyles

* Replace navigator.setOnNavigatorEvent and callbacks

* Update unit tests

* Save user notify props on componentWillUnmount

* Add TODOs about removing componentDidAppear/setNavigatorStyles

* check-styles fix

* Fix eslint errors
2019-06-14 08:14:26 -07:00
Saturnino Abril
c450c530a7 add lastPostIndex props to Thread and Permalink, and add markers for those screens (#2780) 2019-05-09 07:39:58 -07:00
Harrison Healey
9c53852128
Reorganize post state and make postsInChannel into a sparse array (#2693)
* MM-13957 Reorganize post actions (#2553)

* MM-13957 Reorganize post actions

* Update mattermost-redux

* Update mattermost-redux

* Update package-lock.json to resolve build issues

* MM-13958/MM-13959 Make postsInChannel into a sparse array (#2600)

* MM-13960 Re-add combined system messages (#2637)

* MM-13960 Re-add combined system messages

* Pass entire post to PostOptions

* Update mattermost-redux

* Update mattermost-redux

* Address feedback

* Update mattermost-redux
2019-04-15 17:20:23 -04:00
Elias Nahum
a0a1fa28ce
MM-13896 Sync channel as read between clients (including opening Push Notifications) (#2548)
* Update mattermost-redux to use latest WS changes

* Properly mark channel as read, keep the new message indicator, and fix push notification flow

* unneeded parameter in setCurrentUserStatusOffline

Co-Authored-By: enahum <nahumhbl@gmail.com>

* Feedback review

* Update mm-redux ref
2019-02-16 15:09:22 -03:00
Martin Kraft
70907d061c
MM-14055: Load the channel even if not joining. (#2567) 2019-02-13 05:35:43 -05:00
Elias Nahum
678c2599ac
Update post header to support flagged/pinned posts (#2350)
* Update post header to support flagged/pinned posts

* Fix header cutoff when commented on visible

* Update snapshots
2018-11-20 08:23:42 -03:00
Chetanya Kandhari
68eff30eda [#MM-12410] Custom Terms of Service (#2234)
* [#MM-12410] Custom Terms of Service Modal.

- Create a new screen for terms of service
- Register it in app navigation
- Open it as a modal when login succeeds or app is opened when already logged in.
- Get terms of service and render it as markdown

* Refactor service terms to terms of service

* Show terms modal when launching channel instead of componentDidMount

* Remove footer text

* Close modal before logging out

* Use dismissAllModals instead od this.close

* Update header styles

* Update the back icon

* Add left icon conditinally based on os

* Update en.json

* - Integrate Accept/Reject API
- Refactor show navigator to util
- Remove title
- Code refactoring

* Handle Accept/Reject API errors

* Update package-lock

* - Show Alert to handle API error
- Handle API error for GetTerms error, Accept/Reject error and Reject success
- Changes in en.json
- Remove error banner
- Open terms modal in sso and experimental certificate

* Enable navigator buttons after getting terms

* Rename Ok to OK in Alert

* Add retry for API error

* Fix check-style

* Fix FailedNetworkAction Error Message

* - Use Close button instead of back button
- Update en.json

* Remove unused import

* Disable hashtags and atmentions in terms modal

* Enable close button when terms text fails to load

* Minor changes

* Fix show terms on sso login

* Handle restartApp event

* Add test cases

* Revert change to app/components/formatted_markdown_text.js

* Show the terms modal on the channel page

* Remove remaining references to showTermsOfService

* Disable Hashtags, AtMentions and ChannelLinks

* Update the props to markdown component

* Pass the text as literal to renderText

* Return the generated renderTexts

* Fix lint

* Render ~, #, @ with Channel link, Hashtags and At Mentions

* Fix failing tests
Revert unwanted changes

* Hide the channel page content before the terms are accepted

* Fix lint and failing tests

* Revert changes to hide channel while terms are not accepted

* Open modal in componentDidMount instead of constructor
Code refactoring
Disable back button on android

* Remove unused import

* No need to await for showModal

* No need to await for accept and reject

* Update flag for updateTermsOfServiceStatus to updateMyTermsOfServiceStatus
- as phase 2 redux PR was mered.

* Fix check-style

* Change opacity in terms of service text

- Fix tests

* Revert package-lock.json changes
2018-11-14 11:36:45 -03:00
Harrison Healey
9727476ef6 MM-12901 Improve handling of hashtags on Recent Mentions, Flagged Posts, and Permalink screens (#2329)
* MM-12901 Create showSearchModal action and use for hashtags

* MM-12901 Improve handling of hashtags on Recent Mentions, Flagged Posts, and Permalink screens
2018-11-09 20:43:22 -03:00
Elias Nahum
85d9cd8348
Fix crash when loading the permalink view (#2258) 2018-10-11 16:52:42 -03:00
Saturnino Abril
bc54c6e0dd
[MM-12550] Fix hangup on permalink view when user deleted the post in it (#2228)
* fix hangup on permalink view when user deleted the post in it

* return null when no need to change state on getDerivedStateFromProps
2018-10-08 23:13:41 +08:00
Elias Nahum
f522df7a2e Refactor postlist to include Android Pie fixes and smoother scrolling (#2161) 2018-09-26 10:43:33 -04:00
Harrison Healey
578f204784 MM-10273 Add hashtag support (#2106)
* MM-10273 Add hashtag support

* Put hashtag search in a proper modal

* Change hashtag search style to match regular search

* Move Hashtag component and explicitly pass props

* Add unit tests for Hashtag component

* Fix merge conflict
2018-09-17 17:17:20 -03:00
Elias Nahum
ebe7317c5f Check if post.data has values bofore joining a channel (#2050) 2018-08-30 03:19:01 +08:00
Elias Nahum
80d206baf2
Do not close permalink view when post is deleted (#1987) 2018-08-09 08:29:57 -04:00
Saturnino Abril
3a70e5c43f add extra protection to those channel/object followed immediately by accessing its "channel_id" field (#1960) 2018-08-01 13:04:58 -04: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
aade1f0e35
Merge branch 'release-1.9' into merge-1.9 2018-06-27 18:17:44 -04:00
Elias Nahum
cd265fb7c2 Fix jump to recent messages (#1834)
* Fix jump to recent messages

* force scroll to bottom when jumping to recent messages
2018-06-27 08:13:21 -04:00
Jesse Hallam
8372e95d4a add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
Elias Nahum
63a6a9ee91
Replacing fetch with RNFetchBlob (#1782) 2018-06-19 14:44:10 -04:00
Saturnino Abril
0bb21f5374 close permalink on delete of focused post ID (#1757) 2018-06-11 17:26:50 -04:00
Saturnino Abril
954ffeaadf set solid background color on permalick header divider (#1752) 2018-06-08 17:25:45 -04:00
Elias Nahum
579494feab
Long post feature (#1525)
* Long post support

* Fix upload preview

* Add MaxPostSize validation

* Fix show more button container

* localization

* feedback review

* UI feedback review

* Upgrade mattermost-redux

* Fix long post attachment list
2018-03-26 14:25:42 +03:00
Elias Nahum
7ef6fe0f4a Handle permalink Android back button and use the same permalink window to avoid nesting (#1508) 2018-03-16 17:45:06 +02:00
enahum
d0d9103857 [MM-9374] Open Permalinks in app (#1449)
* [MM-9374] Open Permalinks in app

* Feedback review

* Upgrade mattermost-redux

* Fix eslint

* Navigation fixes

* Fixing style of merged lines
2018-03-07 14:48:31 +00:00