Commit Graph

194 Commits

Author SHA1 Message Date
Elias Nahum
49506c1b6c Fixes a race condition and deleting only teams that you no longer belong to (#6028)
* Fixes a race condition and deleting only teams that you no longer belong to

* common action teamsToRemove
2022-03-07 19:20:47 -03:00
Elias Nahum
3829e43731 [Gekidou] combined system message (#6027)
* fix system message last users alignment

* Align based on platform

* alignment android attempt 3

* alignment android attempt 4

* alignment android attempt 5

* Fix post options for combined system messages and properly execute delete

* Fix not-observable prop

* Properly delete combined system messages post

* Prepare and batch remove post for combined system messages

* batch delete post
2022-03-07 11:22:12 -03:00
Avinash Lingaloo
1e1992e979 MM-41391 Gekidou - Update Info.plist (#6000)
* update instance to workspace

* reviews from @carrie

Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>

* replaced Mattermost with $(PRODUCT_NAME)

except the 'Beta' under CFBundleDisplayName

* Update ios/Mattermost/Info.plist

Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-07 09:57:37 +04:00
Daniel Espino García
d5ece8a4a7 Handle test notifications on iOS (#6002)
* Handle test notifications on iOS

* Update ios/Mattermost/AppDelegate.m

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

* Update ios/Mattermost/AppDelegate.m

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

* Fix indent

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-04 10:10:56 +01:00
Anurag Shivarathri
9dbdae22fd [Gekidou MM-39707] CRT DB (#5948)
* Database init

* Naming fix

* naming misc

* Fix test

* Added Thread Tab columns, Team Threads Count table and other changes

* Test case fix

* Test cases fix ...... AGAIN

* TS fix

* Removed loaded_in_all_threads_tab, loaded_in_unreads_tab

* Removed TeamThreadsCount table, mention & message root counts & added loadedInGlobalThreads flag

* Type changes, added delete thread with post

* Removed unused type

* Reverted relationshio of post with thread

* Calling thread destroyPermanently from post

* Removed unused table name variables

* added THREAD constant table in post model and fixed a few comments

* Misc typo fix and code clean up

* Added test case and related to participant in user model

* test cases fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-03 22:47:29 +05:30
Elias Nahum
e93c570562 Renaming flagged to saved (#6021)
* Renaming flagged to saved

* post isSaved property
2022-03-03 13:10:18 -03:00
Elias Nahum
162bc6cc3f [Gekidou] various fixes (#6022)
* remove empty roles before fetching

* Fix prepare delete teams, channels and posts so they don't throw

* Fix reaction operator and moved some handlers to their correct file

* include delete categories when teams or channels are deleted

* Remove unused array in fetchRoles

* fix param comment for reactions handler

* don't sync preferences when getting the WS event
2022-03-03 12:11:47 -03:00
Elias Nahum
e4ed5fe936 Fix categories WS action (#6017) 2022-03-03 12:11:31 -03:00
Daniel Espino García
8e026c20ac [Gekidou] [MM-39682] Add channel autocomplete (#5998)
* Add channel autocomplete

* Fix autocomplete position and shadow effect

* Fix feedback issues

* Fix autocomplete on iOS and piggyback removal of section borders

* Fixes the channel autocomplete showing up after completion

* Address feedback

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-03 11:01:12 +01:00
Daniel Espino García
684d9421a7 Add sample test for local actions (#5945)
* Add sample test for local actions

* Fix the tests and add all missing tests

* Address feedback

* Sort imports

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-02 09:36:10 -03:00
Elias Nahum
eaf4f3166e [Gekidou] update dependencies (#6019)
* Dependency updates

* npm audit fixes
2022-03-01 18:52:01 -03:00
Elias Nahum
5de54471b7 [Gekidou] Gallery (#6008)
* Gallery screen (ground work)

* Open the gallery from posts

* Open the gallery from post draft

* feedback review

* Feedback review 2

* do not remove dm channel names and localization fix

* update to the latest network-client

* do not override file width, height and imageThumbail if received file does not have it set

* bring back ScrollView wrapper for message component

* Remove Text wrapper for markdown paragraph

* Fix YouTube play icon placeholder

* Make video file play button container round

* Add gif image placeholder

* Save images & videos to camera roll

* Feedback review 3

* load video thumbnail when post is in viewport

* simplify prefix
2022-03-01 13:55:44 -03:00
Jason Frerich
efd2fd0c02 [Gekidou MM-39729] Websocket Events - Groups (#5930)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-01 10:13:45 -06:00
Joseph Baylon
b87cf8358b MM-41854 Detox/E2E: Setup detox infrastructure in Gekidou (#5979)
* MM-41854 Detox/E2E: Setup detox infrastructure in Gekidou

* Fix lint issues

* Fix lint issues

* Update API to include baseUrl for multiple servers

* Update init.js to have default siteUrl as baseUrl

* Update init.js to have default siteUrl as baseUrl

* Update import of testConfig

* Update import of testConfig

* Update postMessageAs signature

* Update detox/webhook_server.js

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-03-01 07:20:59 -08:00
Shaz Amjad
066775ca82 Gekidou - Sidebar UI components (#5955)
* Squash, rebase, test fixes

* PR Feedback addressed

* fix snapshot tests with SafeAreaProvider

* Addresses feedback

* Adds Category & Channel error

* Tests fixed

* MyChannel count

* finalize DM and GM avatars and icon as well as other small fixes

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-28 18:25:00 -03:00
Elias Nahum
bd7ce77197 Fixes WS reconnection (#6009) 2022-02-28 16:40:01 -03:00
Elias Nahum
c5b8d613f9 Batch categories and channels in fetchMyChannelsForTeam action (#6010) 2022-02-28 16:39:26 -03:00
Avinash Lingaloo
860ae2ab75 MM-41940 Gekidou Post Options menu - mark as unread (#5987)
* added marksAsUnread

* code fix

* correction

* added some correction

* modified markChannelAsUnread to accomodate isUnread field

* Update app/actions/remote/post.ts

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

* code clean up

* code fix

* minor edit

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-23 11:12:13 +04:00
Avinash Lingaloo
b2b7a724de MM-41963 Gekidou Post Options Delete and Edit (#5997) 2022-02-22 12:55:58 -03:00
Daniel Espino García
bcb78c499c [Gekidou] [MM-39682] Add autocomplete and emoji suggestion (#5931)
* Add autocomplete and emoji suggestion

* Address feedback and minor fixes

* Remove unneeded constants and fix max height to be aware of the header.

* Address feedback

* Refactor PostDraft and correctly position Autocomplete

* Set min char for emoji search at 2

* Replace searchCustomEmojis from setTimeout to debounce

* Remove comments

* simplify prop

* Change naming of certain variables

* remove unnecesary fragment

* Improve Autocomplete height calculation

* Address feedback

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-22 11:30:22 +01:00
Avinash Lingaloo
39e5c2c07a MM-41941 Gekidou Long Press Menu Post options - Reply (#5986)
* implementing reply option

* update reply option

* corrections
2022-02-21 09:29:58 -03:00
Elias Nahum
a14dd4928f [Gekidou] Post removal (#5985)
* Fix post onPress handler to remove a deleted post

* Fix operator handlePost to remove fetched existing deleted posts and filter the ones that do not exist
2022-02-21 09:25:52 -03:00
Avinash Lingaloo
256b1ec005 added pin post option (#5982) 2022-02-17 13:14:57 -03:00
Elias Nahum
2a2f103813 Fix edit server condition 2022-02-17 11:20:28 -03:00
Avinash Lingaloo
a83f40b41a MM-41889 Gekidou Post Options menu - save/unsave option (#5980)
* Added save/unsave option

* code clean up

* code correction

* removed await
2022-02-17 10:43:59 -03:00
Elias Nahum
5b9492356b Gekidou MultiServers second part (#5963)
* Edit Server display name

* Lock iPhone to portrait and iPad to landscape

* Create actions for app global to store device token and multi server tutorial

* Add MutliServer tutorial on first use

* WebSocket reconnection priority

* have isRecordGlobalEqualToRaw to not check for value

* Return early on edit server if error is found

* Prepopulate server screen with last logged out server address and name

* Add CompassIcon to circleCI asset generation
2022-02-17 10:42:06 -03:00
Avinash Lingaloo
0158b088da MM-41890 Gekidou Long press post option - Reaction (#5978)
* added reaction option

* restructure files & folders

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-17 11:25:10 +04:00
Shaz Amjad
826c6683f8 Gekidou - Sidebar websocket handling (#5954)
* Adds actions, queries, db models and rest client

* Adds Websocket handling for categories

* fix merge

* small refactor for categories websocket events

* fix bad merge

* Category delete handled

* Handles deletion (prune on store)

* Resolves feedback, adds team handling for prune

* Minor fixes; param order and return, imports, type naming

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-17 08:07:31 +11:00
Avinash Lingaloo
b256f7fcce MM-41886 Gekidou Long Press Menu - Copy text and Copy Permalink options (#5977) 2022-02-16 10:40:14 -03:00
Suneet Srivastava
03d5ac083c MM-39716: Added + button bottomsheet layout (#5957)
* [gekidou] feat: MM-39716 Added + Button Bottom sheet layout

* feat: Added on click to the channel header listener

* chore: Ran i18n command and did the requested changes

* chore: updated test snapshot

* Refactor PlusMenu & fix Browse Channels

* Fix snapshot tests

* feedback review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-16 14:17:57 +01:00
Avinash Lingaloo
ea54a8dff3 MM-41748 Gekidou Post Options Queries (#5972)
* skeleton in place

* fix ts error

* creating base option component

* Added all options except reaction

* moved options under /component/options

* added destructive styling

* skeleton - need polishing now

* default emojis for quick reaction

* rename files and small refactor

* Properly close bottom sheet

* redid reaction component

* canSave, isSaved

* canAddReaction condition

* fix aligment

* code clean up

* fix opening on tablet

* undo comment on local reaction action

* undo needless formatting

* clean up comment

* shows selected reaction

* fix marginTop and added title for Tablet

* code clean up

* investigating navigation

* fixed navigation

* Post options bottomSheet and renamed DrawerItem to MenuItem

* renamed optionType to testID

* update navigation_close_modal to close_bottom

* removed context in favor of Pressable

* Apply suggestions from code review

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

* removed theme prop from PickReaction

* en.json and code fixes

* removed post_options from screen/index

* removed post_options from screens constant

* Revert "removed post_options from screen/index"

This reverts commit 24caa9773f.

* Revert "removed post_options from screens constant"

This reverts commit 863e2faaf7.

* fix theme import

* remove useless margin

* disabled post_options

* queries - work in progress

* queries - work in progress

* queries - work in progress

* minor fix

* queries - work in progress

* queries - work in progress

* queries - work in progress

* queries - work in progress

* queries - work in progress

* fix query

* queries - work in progress

* reaction query fixed

* queries - work in progress

* queries - canReaction option

* queries - canDelete option

* queries - canReply option

* queries - canPin, canSave, canCopyPermalink option

* queries - options - wip

* queries - options - wip

* queries - options - wip

* fix location

* removed logs

* undo post_draft changes

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-16 14:21:27 +04:00
Elias Nahum
df5c780337 Use dismissBottomSheet helper function instead of emitting an event (#5965) 2022-02-15 08:44:26 -03:00
Elias Nahum
e9c2e9a669 Prevent the app from crashing when a screen has not been registered (#5964) 2022-02-15 08:44:02 -03:00
Elias Nahum
fa5d283715 Properly dimiss for PostOptions to be dismissed 2022-02-14 17:40:16 -03:00
Avinash Lingaloo
091bd8301b MM-41602 Gekidou long press menu UI only (#5950)
* skeleton in place

* fix ts error

* creating base option component

* Added all options except reaction

* moved options under /component/options

* added destructive styling

* skeleton - need polishing now

* default emojis for quick reaction

* rename files and small refactor

* Properly close bottom sheet

* redid reaction component

* canSave, isSaved

* canAddReaction condition

* fix aligment

* code clean up

* fix opening on tablet

* undo comment on local reaction action

* undo needless formatting

* clean up comment

* shows selected reaction

* fix marginTop and added title for Tablet

* code clean up

* investigating navigation

* fixed navigation

* Post options bottomSheet and renamed DrawerItem to MenuItem

* renamed optionType to testID

* update navigation_close_modal to close_bottom

* removed context in favor of Pressable

* Apply suggestions from code review

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

* removed theme prop from PickReaction

* en.json and code fixes

* removed post_options from screen/index

* removed post_options from screens constant

* Revert "removed post_options from screen/index"

This reverts commit 24caa9773f.

* Revert "removed post_options from screens constant"

This reverts commit 863e2faaf7.

* fix theme import

* remove useless margin

* disabled post_options

* refactored render method for post_options

* fixing issue on iOS

* corrections from PR review

* fix for background on mobile

* Fix stack navigation styles

* i18n-extract output

* Feedback review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-14 17:26:16 -03:00
Elias Nahum
d35eac8bd3 Gekidou servers (#5960)
* Servers logout and websocket state

* addNewServer uility and rename file

* add LaunchType for add new server

* added time to LaunchProps type

* Remove unnecessary props for launchToHome

* Fix local action updateLastPostAt

* Batch fetchProfilesPerChannels requests in chunks of 50

* WS handleUserAddedToChannelEvent to return early if no channelId is set

* WS handleNewPostEvent to batch update last_post_at

* add common actions to sync other servers

* Entry actions to sync other servers data

* Do not attempt to fetch notification data if payload does not contain a channelId

* Set database as default at the end of the login flow

* Handle logout when other servers remain

* Handle Server options

* Show alert when logging out from the account screen

* Add workaround to have Lottie animate the loading component

* Fix badge position in ServerIcon component

* Server screen to support adding new server

* Fix login screen to display error when credentials do not match

* add localization strings

* fix DatabaseProvider to update on server switch

* Fix home icon and server icon subscriptions and badge display

* Add dependencies to onLogout callback

* feedback

* Only updateLastPostAt if needed
2022-02-14 16:39:29 -03:00
Shaz Amjad
9f5f73b264 Gekidou - Sidebar - Adds actions, queries, db models and rest client (#5953)
* Adds actions, queries, db models and rest client

* move fetching categories inside fetchMyChannelsForTeam

* code cleanup

* deconstruct categoriesWithOrder

* DMs fetching for changing teams

* Fix bad merge and address feedback

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-11 18:40:44 -03:00
Elias Nahum
0a45fd9e13 WS handle new post to be able to prepare myChannel multiple times (#5958) 2022-02-11 08:38:43 -03:00
Suneet Srivastava
ac556c66d6 [gekidou] fix: Margin b/w login error and forgot password btn (#5944) 2022-02-10 11:59:09 -06:00
Elias Nahum
9efa4ae062 Rename NAVIGATION_CLOSE_MODAL as CLOSE_BOTTOM_SHEET constant (#5952) 2022-02-10 13:15:02 -03:00
Elias Nahum
1b62c10dcc [Gekidou] various fixes (#5951)
* Specify the screen to be dismissed from the bottom sheet on tablets

* reposition unread badge on server icon

* Skip setNavigatorStyles and set correct theme for login flow screens

* Fetch current user status with fetchMe and when the WS connects

* switchToChannel skip setting current channel if id is the same

* ChannelMention component to use switchToChannelById instead of switchToChannel

* loginEntry only set initialChannel if isTablet

* deferredAppEntryActions mark channel as read and fetch channel stats if initialChannel is set

* feedback review

* feedback review
2022-02-10 11:46:35 -03:00
Daniel Espino García
210a2f2d8a [Gekidou] [MM-39717] Add Channel Browser screen (#5868)
* Add Channel Browser screen

* Fix tests

* Fix lint

* Address feedback

* Fix test

* Remove cancel and fix bottom sheet size

* Address feedback

* Address feedback

* Keep loading when not many items are visible.

* Separate search_handler from browse channels

* Search channels directly instead of filtering from the loaded

* Address feeback

* Reduce the size of search_handler.tsx

* Add title and closeButtonId to bottomSheet

* Let the default value be public and set it before the if

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-10 12:45:07 +01:00
Suneet Srivastava
81fb2bef1a fix: Remove error of displayName, url error if present on handleConnect server screen (#5934) 2022-02-10 08:17:04 -03:00
Jason Frerich
9cb8cae8b5 [Gekidou MM-39729] Websocket Events - hello, license, config (#5926)
* handle license changed

* move inside trycatch

* handle config changed

* remove hello WS handler. Not needed for V2. https://community.mattermost.com/core/pl/9tom9ck3cty1pk9ft64m3jzj9w
2022-02-10 08:16:25 -03:00
Elias Nahum
3ea065b845 [Gekidou] Fix & small refactor to the app entry logic and WS reconnection (#5937)
* Fix & small refactor to the app entry logic and WS reconnection

* Remove not needed log in MainActivity

* Replace async forEach with for await

* extract getClient to its own block

* replace double filter with reduce

* fix select channel on WS reconnect and user no longer belongs to current team

* feedback review on WS users actions

* Add windowFocusChanged for Android only

* on WS reconnection set team & channel if not member of current team

* reduce suggestion

* feedback review
2022-02-09 12:49:37 -03:00
Elias Nahum
92e069f00c Patch WDB to add cancelPrepareUpdate to be used in unit tests (#5946) 2022-02-09 10:52:57 -03:00
Elias Nahum
98fa1b0a55 [Gekidou] compass icons (#5940) 2022-02-08 16:16:30 -03:00
Daniel Espino García
8cb7dd2fa9 Fix team switch when there is no history in the team (#5943) 2022-02-08 13:07:49 -03:00
Elias Nahum
22564b8182 change icon for server item with disconnected WS 2022-02-03 19:01:47 -03:00
Elias Nahum
16524314aa Sort servers list 2022-02-03 11:44:49 -03:00