Commit Graph

49 Commits

Author SHA1 Message Date
Shaz MJ
4825a54de0 [Gekidou] Groups API Calls (#6277)
* Adds missing group API calls

* Rename methods to fetch and move to remote actions
2022-05-26 14:10:04 -04:00
Shaz MJ
10c714e02f [Gekidou] Groups are included in the @metion auto-complete (#6261)
* Group autocomplete -
* Styling fixes
* Loading indicator
* Displays group name and display name
* PR Feedback
* Cleans up styling
* Adds constraints to group searches
* Channel Team before current team
* PR Feedback; displayName > name, model observable
* PR Feedback; rename fetch + model observable
* PR Feedback: return {error}, spelling fix
* PR Feedback: Add forceLogoutIfNecessary to fetch calls
* Remove doubled up logout
2022-05-25 07:25:59 +10:00
Elias Nahum
4573732fd2 [Gekidou] channel quick actions (#6288)
* Add hitSlop to navigation header right buttons

* Fix channel_item info muted style

* Fix team switch when global threads

* Wrap WS channel events in try/catch

* Group Box component and Animated Group Box

* SlideUpPanelItem style

* Fix return value of setCurrentTeamAndChannelId

* Add observeChannelSettings and include channel settings in prepareDeleteChannel

* update OPTIONS_HEIGHT reference in find channels quick options

* Fix DM limit in channel list

* Fix category header style and translate default categories

* Add snackbar for unmute/favorite/unfavorite

* Add toggleFavoriteChannel remote action

* Add makeDirectChannelVisible remote action

* Use makeDirectChannelVisible in switchToChannelById and update toggleMuteChannel snackbar

* Add channel actions common components

* Update channel intro to use channel action common components

* Rename ChannelDetails screen to ChannelInfo

* Add channel quick actions

* Update localization strings

* Fix addChannelToDefaultCategory

* Leave channel

* Add localization strings

* Fix snackBar screen event listener

* Feedback review
2022-05-19 14:30:55 -04:00
Anurag Shivarathri
8c3b101d66 [Gekidou MM-44308] CRT Android unable to read/follow the thread (#6280)
* Fixed android put requests failing

* Android thread options height fix
2022-05-17 09:40:31 -04:00
Elias Nahum
2c6bd00128 Set 5s as default timeout for ping (#6271) 2022-05-13 11:36:30 -04:00
Daniel Espino García
75d1c9d228 Try to remove as many as as possible (#6200)
* Try to remove as many ` as ` as possible

* Fix imports
2022-05-12 15:46:11 +02:00
Anurag Shivarathri
ba976dadc2 [Gekidou[ [MM-43969, MM-44037] global threads crash, mark as read (#6253)
* Preparing thread data as well with prepareDeletePost

* observing the post directly to prevent the crash until the data issue is found

* mark as read, delete threeds fix

* Update thread.ts

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-10 15:59:06 +05:30
Daniel Espino García
7e80843092 [Gekidou] [MM-41837] Add verification for push proxy and related interface (#6192)
* Add verification for push proxy and related interface

* Fix lint and extract i18n

* Be specific about undefined equalities.

* Fix test

* Address feedback

* Fix long server names styles

* Fix tests and typo
2022-05-09 11:41:16 +02:00
Anurag Shivarathri
2deb2e01e0 [Gekidou][MM-43870, MM-43896, MM-43898, MM-43902, MM-43903] CRT related bug fixes (#6205)
* Fixes

* Updated snapshot

* Excluding current user from getting updated

* Doesn't handle users if it's empty

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-05-05 09:06:18 -04:00
Elias Nahum
f973ac8016 [Gekidou] Find channels (remote) (#6203)
* Display local results

* Fix queryPreferencesByCategoryAndName to observeWithColumns value

* Find channels (remote)

* ux feedback review

* dev review

* dev review 2

* Fetch deleted channels from other teams
2022-05-03 14:29:37 -04:00
Daniel Espino García
e047106bac Add AppsForm and Interactive Dialogs (#6142)
* Add AppsForm and Interactive Dialogs

* Add the missing plumbing for Interactive Dialogs and minor fixes

* Remove widgets subfolder

* Fix paths

* Address feedback

* Address feedback

* i18n extract

* Only set the dialog if we are in the same server
2022-04-28 18:26:21 +02:00
Anurag Shivarathri
313fe9c469 In-Channel experience (#6141)
* User avatar stack

* In-Channel experience

* Misc Fixes

* Fixed fetchPostThread & added observer

* Reusing the user component

* Refactor fix

* Moved some post options to common post options

* Combined follow/unfollow functions

* Feedback fixes

* Feedback fixes

* teamId fix

* Fixed teamId again

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-19 11:42:20 -04:00
Daniel Espino García
14d6d53cc9 [Gekidou] Move managers (#6171)
* Move managers to their own folder

* Fix lint

* Fix unit tests

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-04-16 09:44:11 -04:00
Kyriakos Z
477c7cf1bf MM-40093 [Gekidou]: adds remote action to sync threads (#6135)
* MM-40093: adds remote action to sync threads

Syncing threads fetches all unread threads if there are no threads in
the DB.
If there are threads in the DB it fetches all threads newest than the
newest one we have stored.

Fetching happens in batches of 60 threads at a time.

* Fixes querying for all threads list

* Syncs threads on WS reconnection

* Addresses review comments

* Addresses review comments
2022-04-12 15:03:05 +03:00
Anurag Shivarathri
8d6fc41dd5 [Gekidou MM-41093] CRT - WS Events, Actions, Queries, Thread Follow, Post Query (#6075)
* WS Events, Actions, Queries, Thread Follow, Post Query

* i18n changes

* Misc

* Only unread threads are marked as read

* Mark threads from WS even as visible in Global threads

* Merge fixes

* Update thread_post_list.tsx

* Merge fix

* Feedback fix

* Make teamId in handleThreads optional for unfollowed threads

* Removed unwated type and return

* Review changes

* Removing unused model

* Merge fix

* Misc fixes

* Following button query change
2022-04-04 19:55:13 +05:30
Daniel Espino García
e2e54b3bca [Gekidou MM-39733] Port Create Channel from V1 (#6067)
* copy directly from v1. will get working and then convert class to functional components

* screen showing up correctly.  Need to convert lifestyle methods

* create channel button working

* save before refactor in prep for bringing in edit_channel functionality

* change function naming

* clean up lint

* clean up for PR review

* clean up for PR review

* remove hoardcoded styles

* add edit_channel screen

* add handlePatchChannel

* add custom useFormInput hook. use edit screen for both create and edit screens. edit or create screen mode determined by channel prop passed in as a channel or null

* rename edit_channel to create_or_edit_channel

* displayname, header, and purpose are now an object with value and onChange props, created from the useFormInput hook. Now only need to pass this new FormInput Prop to the edit_channel_info component and deconstruct there to get the onChange and value

* fix some lint errors

* fix some lint errors

* remove empty line

* pass intl into utils validate functions because they are not Hooks.  add validation for displayName including translations.

* Move useFormInput hook to its own hooks file and import

* simplify

* remove editing prop.  Was used to determine if the right button was enabled. It was always true for edit_channel screen and always false for create channel screen.  The enableRightButton prop call back is was also used for the same reason.

* remove channeUrl editing references.  This was not implemented on v1

* pass editing prop back into component and add back logic. When editing one field must change.  when creating, just need to check that name is provided

* lint fixes

* fix typing issue for channel types

* scrolling ref should be fixed.  Linting should pass now

* Linting should pass now

* require id field in partial Channel. fixes tsc

* remove everything related to renaming the channel URL.  This has never been requred for mobile

* manage state with useReducer so that all actions/state in one location. This also removes the number of onXXX functions and reduces the number of functions in the component

* reorganize code. useEffects are at top.  Move type and interfaces outside of function component

* Fix lint

* nit: invert if statement checking a negative

* use cneterChannelColor. in figma this is center channel text, but I verified theme color by comparing to SSO login text color

* Simple snapshot tests as a start

* Add more tests

* update snapshot

* add snapshot tests. Add tests for button enabling and disabling

* simplify test with destructuring.

* PR feedback. formatting changes. get user and teamid from one call

* remove FormInput hook and use value/setvalue convention for controlled components

* no need to setChannelDisplayName after creating/updating channel

* Just pass the setXXX function.  Don't need to create as separate callback

* modify floatingTextInput component to allow placeholder text

* remove InteractionManager. PR nits

* mv EditChannelComponent into create_or_edit screen.  Rename component from EditChannelInfo to ChannelInfoForm

* correct import path

* add IntlShape Type to function input. Wrap screen with withServerDatabase, not withIntl

* remove state setting function calls from inside the reducer.  move close function outside of the component. remove setRightButton and rightButton and place rightbutton in initial appState

* move editing const after useX oneliners and before useCallback, useEffect, and useReducers

* rightButton
  - useMemo to memoize an object with dependencies
  - move out of the appState
emitCanSaveChannel
  - wrap with useCallback
onCreateChannel
  - wrap with useCallback
onUpdateChannel
  - wrap with useCallback
useEffect Navigation
  - use the callbacks as dependencies in stead of the depencies of those
    callbacks.

* wrap all formatted message with useMemo()
wrap all onXXXChangeText with useCallback and add deps
move all oneliner derived constants directly after useState useMemo

* remove useMemo from formatted text

* switchToCHannel is still not working.  failing at
  const channel: ChannelModel = await member.channel.fetch();

* use prepareMyChannelsForTeam to update db tables for new channel

* add placeholder text color

* Attach open edit channel screen to `Set Header` button in channel intro view
port SectionItem from V1 and us to add a Switch for setting private/public channel
hook up the plus icon in the channel list header to create a channel (temporary fix to allow debugging)
add new queryChannelsInfoById and queryCurrentChannelInfo query functions
update text for create screen text inputs

* Fix styles and fix actions

* Add autocomplete, fix patch, and address design feedback

* Address feedback

* Add margin between icon and label on Make Private

* Address feedback

* Address feedback

* Address feedback and fix channel list not updating when the channel gets created

* Address feedback and directly add the channel to the default category

* Render at-mentions as Members if no channelId is set

* Display autocomplete on iOS

Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-31 10:06:02 +02:00
Daniel Espino García
7fecf7e474 Merge branch 'gekidou' into CommandAutocomplete 2022-03-23 17:53:43 +01:00
Daniel Espino García
7c642b1e80 [Gekidou] Extract common observers to queries (#5984)
* Extract common observers to queries

* Separate also queries and more agressive refactoring

* Use query to avoid throws from findAndObserve

* Fix minor error

* Address feedback

* Address feedback

* Address feedback

* Fix model types

* Address feedback
2022-03-23 09:19:29 -03:00
Daniel Espino García
b2408bd5d1 Add command autocomplete 2022-03-17 18:07:04 +01:00
Daniel Espino García
9f9190f5db Add User Mention to autocomplete (#6005)
* Add User Mention to autocomplete

* Minor fixes

* Fix at_mention (you) alignment

* Add missing translation strings

* Make it more parallel to channel mentions

* Fix bot tag

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-14 17:05:52 -03:00
Kyriakos Z
2645f7e66e MM-39710: saved posts screen and DB (#6020)
* MM-39710: saved posts screen and DB

- Adds ids of saved posts to the systems table, as we do with recent
mentions.
- Adds a new remote action to fetch saved posts (getFlaggedPosts).
- Adds a new screen to display those in a mobile.
- Displays saved posts in the tablet view next to profile card.

* Uses Preferences instead of System table

Renames to saved posts wherever possible

* Adds text to localization file

* Fixes fetching/saving saved posts

* Refactor mini post to components folder

* Fixes hooks dependencies according to review

* Removes unnecessary 'withObservables'

* Small refactor

* Satisfies linter

* Adds empty state

And fixes empty state icon to be theme sensitive.
Both recent_mentions and saved_posts.

* Fixes empty screen's alignment

* Add missing preference

* add missing translation strings

* remove unused database type definition

* Fetch newly saved post

* Fix return type for client.getSavedPosts

* Remove usage of lodash compose

* Rename get remote actions to fetch

* Include close button for savedPost modal

* fix tablet view for SavePosts and use lottie loading indicator

* Render post with content for save posts and recent mentions

* post list viewable items type definition

* Add layout width to post content for saved post screen

* Use PostWithChannel and viewableItems for saved posts and recent mentions

* Layout margin of 20

* openGraphImage margin

* Fix openGraphImage display

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-12 16:40:24 -03:00
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
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
Elias Nahum
bd7ce77197 Fixes WS reconnection (#6009) 2022-02-28 16:40:01 -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
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
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
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
Daniel Espino García
55324127e1 [Gekidou] Post input (#5844)
* Initial commit post input

* Fix message posting, add create direct channel and minor fixes

* Fix "is typing" and "react to last post" behaviour

* Some reordering, better handling of upload error, properly clear draft on send message, and fix minor progress bar misbehavior

* Add keyboard listener for shift-enter, add selection between video or photo while attaching, add alert when trying to attach more than you are allowed, add paste functionality, minor fixes and reordering

* Add library patch

* Fix lint

* Address feedback

* Address feedback

* Add missing negation

* Check for group name and fix typo on draft comparisons

* Address feedback

* Address feedback

* Address feedback

* Address feedback

* Fix several bugs

* Remove @app imports

* Address feedback

* fix post list & post draft layout on iOS

* Fix post draft cursor position

* Fix file upload route

* Allow to pick multiple images using the image picker

* accurately get the channel member count

* remove android cursor workaround

* Remove local const INPUT_LINE_HEIGHT

* move getPlaceHolder out of the component

* use substring instead of legacy substr for hardward keyboard

* Move onAppStateChange above the effects

* Fix camera action bottom sheet

* no need to memo SendButton

* properly use memberCount in sender handler

* Refactor how to get memberCount

* Fix queryRecentPostsInThread

* Remove unused isDirectChannelVisible && isGroupChannelVisible util functions

* rename errorBadUser to errorUnkownUser

* extract localized strings

* use ClientErrorProps instead of ClientError

* Minor improvements

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-02-03 08:59:15 -03:00
Daniel Espino García
bebfccb964 [Gekidou] Add Draft Upload Manager (#5910)
* Add Draft Upload Manager

* Address feedback

* Use callbacks instead of events and add byteCount

* Address feedback
2022-02-01 17:26:26 +01:00
Elias Nahum
b8b51296c0 [Gekidou] post list (#5893) 2022-01-17 07:06:26 -03:00
Kyriakos Z
675d8495b3 [Gekidou]: MM-39757 - Recent mentions (#5823)
* [Gekidou]: MM-39757 - Recent mentions

* Refactor channel_info to a separate component

* Fixes schema tests

* Fixes channel_info theme color

* Removes RECEIVED_MENTIONS table and model

Removes RECEIVED_MENTIONS table and model and saves recent_mentions in
the SYSTEM table under the recentMentions ID.

* Cleanup recent_mentions handler

* Adds i18n in recent_mentions screen

* Observe changes on the post messages

* Addresses review comments

* Batches records

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Fetches channels and users needed for mentions

Fetching mentions from all teams might result in missing info like user
profiles, and channels missing from the DB.
This commit fetches all missing users and channels.

* Adds empty state for recent mentions

* Prepares all missing models for channels

* Addresses review comments

* Fixes mention keys for recent mentions

User mention keys when asking for mentions should not include general
purpose ones, like @channel, @all, @here.

Fixes ActivityIndicator color in recent mentions screen.

* Removes top margin of mention message

* Addresses review comments

* Fixes group.name undefined
2021-12-16 12:26:43 +02:00
Elias Nahum
42f193c70c Upgrade deps (#5850) 2021-11-29 23:19:39 +02:00
Elias Nahum
fbd8b92194 [Gekidou] Avoid technical debt (#5795)
* Apply Status bar color

* useIsTablet hook instead of useSplitView in combination with the constant

* Constants clean up
2021-10-28 10:15:17 -03:00
Elias Nahum
790b1beb22 [Gekidou] push notifications (#5779)
* Push notifications entry point

* Process android notification natively only if RN is not initialized

* Database changes to store local channel viewed_at

* EphemeralStore wait until screen removed

* Move schedule session notification to utility

* Fix channel remote & local actions + added actions for markChannelAsViewed & fetchMyChannel

* Add fetchMyTeam remote action

* Add dismissAllModalsAndPopToScreen to navigation

* Improve post list component & add app state to re-trigger queries

* Improve WS implementation

* Handle push notification events

* Fix postsInChannel since handler

* Handle in-app notifications

* Post list to listen to column changes

* Track selected bottom tab in ephemeral store

* add useIsTablet hook

* in-app notifications on tablets
2021-10-27 17:53:11 -03:00
Daniel Espino García
d1e0c99c3d Gekidou websockets (#5671)
* Adapt websocket client

* Add Websocket Manager

* Address feedback

* Start websockets on init and login, and invalidate on logout

* Add temporal logging and bug fixing

* Working WS

* Add reconnect actions and periodic updates

* Address feedback

* Add missing change

* Several improvements on websocket reconnect and channel handling

* fix gekidou package-lock.json

* update Podfile.lock

* Address feedback

* Address feedback

* Address feedback

* Fix update channel delete at

* Catch errors on batchRecords

* Update app/queries/servers/channel.ts

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

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-10-19 19:16:10 +02:00
Avinash Lingaloo
7f91a6a78a Gekidou - Account Screen (#5708)
* Added DrawerItem component

* WIP Account Screen

* Added react-native-paper

* Added StatusLabel Component

* Extracted i18n

* TS fix DrawerItem component

* WIP Account Screen

* Added server name label under log out

* Updated translation

* WIP

* Fixes the Offline text style

* Added Metropolis fonts

* WIP

* Typo clean up

* WIP

* WIP

* WIP

* Added server display name

* Writing OpenSans properly

* WIP

* WIP

* Added OptionsModal

* Opening OptionsModal

* Added translation keys

* Writes status to local db

* Fix missing translation

* Fix OptionModal not dismissing

* Pushing status to server

* Refactored

* Added CustomStatusExpiry component

* Added sub components

* Added CustomLabel

* CustomStatus WIP

* Added Custom Status screen WIP

* WIP - unsetCustomStatus and CustomStatus constant

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Retrieving RecentCustomStatuses from Preferences table

* WIP

* WIP

* WIP

* Added Clear After Modal

* WIP - Transations

* WIP

* Done with showing modal cst

* wip

* Clear After Modal - DONE

* fix

* Added missing API calls

* wip

* Causing screen refresh

* wip

* WIP

* WIP

* WIP

* Code clean up

* Added OOO alert box

* Refactored Options-Item

* Refactored OptionsModalList component

* Opening 'status' in BottomSheet instead of OptionsModal

* AddReaction screen - WIP

* Add Reaction screen - WIP

* Added EmojiPickerRow

* Added @components/emoji_picker - WIP

* Emoji Picker - WIP

* WIP

* WIP

* WIP

* SectionList - WIP

* Installed react-native-section_list_get_item_layout

* Adding API calls - WIP

* WIP

* Search Bar component - WIP

* WIP

* WIP

* WIP

* Rendering Emoticons now - have to tackle some fixmes

* Code clean up

* Code clean up - WIP

* Code clean up

* WIP

* Major clean up

* wip

* WIP

* Fix rendering issue with SectionIcons and SearchBar

* Tackled the CustomEmojiPage

* Code clean up

* WIP

* Done with loading User Profiles for Custom Emoji

* Code clean up

* Code Clean up

* Fix screen Account

* Added missing sql file for IOS Pod

* Updated Podfile.lock

* Using queryConfig instead of queryCommonSystemValues

* Fix - Custom status

* Fix - Custom Status - Error

* Fix - Clear Pass Status - WIP

* Fix - Custom Status Clear

* Need to fix CST clear

* WIP

* Status clear - working

* Using catchError operator

* remove unnecessary prop

* Status  BottomSheet now has colored indicators

* Added KeyboardTrackingView from 'react-native-keyboard-tracking-view'

* Code clean up

* WIP

* code clean up

* Added a safety check

* Fix - Display suggestions

* Code clean up based on PR Review

* Code clean up

* Code clean up

* Code clean up

* Corrections

* Fix tsc

* TS fix

* Removed unnecessary prop

* Fix SearchBar Ts

* Updated tests

* Delete search_bar.test.js.snap

* Merge branch 'gekidou' into gekidou_account_screen

* Revert "Merge branch 'gekidou' into gekidou_account_screen"

This reverts commit 5defc31321.

* Fix fonts

* Refactor home account screen

* fix theme provider

* refactor bottom sheet

* remove paper provider

* update drawer item snapshots

* Remove options modal screen

* remove react-native-ui-lib dependency

* Refactor & fix custom status & navigation (including tablet)

* Refactor emoji picker

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-10-12 19:24:24 +04:00
Elias Nahum
2f8160d360 Remove team unreads and rely on channel member instead (#5710) 2021-10-01 16:07:57 -03:00
Elias Nahum
4e0688aef5 [Gekidou] update dependencies (#5691) 2021-09-23 14:44:50 -03:00
Daniel Espino García
1c26f14fdb Add import order lint rules (#5672)
* Add import order lint rules

* Address feedback

* Revert change
2021-09-13 10:18:03 +02:00
Elias Nahum
5700ce7c86 [Gekidou] post component tree and partial postList (#5637) 2021-09-06 08:22:55 -03:00
Elias Nahum
65c3e05fd8 [Gekidou] groups (#5593)
* Rename groups in channel/team to group channel/team

* Redefine groups schema

* Groups action and operator

* Add group at mentions

* fix uni test

* Update types/database/models/servers/group.d.ts

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

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2021-08-05 19:03:46 +04:00
Avinash Lingaloo
e8ce78f39d MM-36721 - [GEKIDOU] Porting Markdown components (#5586)
* Started with Channel Post List

* Added markdown hashtag

* Added TouchableWithFeedback component

* Added utils/bottom_sheet

* Removed BottomSheet in favor of future SlideUpPanel

* Added markdown_block_quote

* Added markdown_list_item

* Added markdown_list

* Added MarkDownTableCell component

* Markdown_table - in progress - need to verify TS

* Added markdown_table

* Update Podfile.lock

* Added deep_linking constant

* Added utils/draft

* Update config to include ExperimentalNormalizeMarkdownLinks

* Added markdown_link

* Added markdown_table_row

* Added ProgressiveImage and RetriableImage components and images utils

* Converted Retriable component to functional component

* Added type definition for commonmark

* Continuing with markdown TS

* Markdown - Typing props [ in progress ]

* Fix boolean flag with mardown block quote

* Adding observable config to markdown_link

* TS Fixes [ in progress ]

* TS fixes

* TS fixes - TextStyles

* Update markdown.tsx

* TS fixes on markdown

* TS Fixes - AtMention component

* AtMention [ IN PROGRESS ]

* Add markdown support

* Fix emoji and jumboEmoji on iOS

* Fix handleMyTeam operator

* Fix navigation style based on theme

* Fix iOS MattermostManaged deleteDatabse return error type

* wrap setNavigationStackStyles under a requestAnimationFrame

* Add preventDoubleTap to channel mention

* Increase double tap to 750ms

* Fix handleReceivedPostsInChannel chunk query

* Set initial navigation theme

* Swizzle FastImage on iOS

* fix preventDoubleTap test

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-08-02 20:30:17 +04:00
Elias Nahum
c452ef8038 [Gekidou] Login entry point (#5568)
* Login entry point

* feedback review

* sort imports

* Fix model relations

* Handle when no current team or current channel has been selected

* Fix MFA unit test

* update prepareCommonSystemValues arguments
2021-07-26 12:03:43 +04:00
Elias Nahum
8cd127a223 [Gekidou] Typings & PostMetadata structure (#5542)
* Typings & PostMetadata structure

* comment out unused code

* Remove duplicate interface

* Fix getPreferenceAsBool defaultValue
2021-07-15 11:49:02 -04:00
Elias Nahum
c64277bdbf Gekidou Update deps (#5530) 2021-07-11 07:52:44 -04:00
Miguel Alatzar
134c4a49c5 Integrate react-native-network-client (#5499)
* fix: handle NSMutableData

* feat: integrate react-native-network-client

* fix: typos

* fix: semicolon

* fix: rename to urlVersion

* fix: add returnDataOnly arg

* fix: configure network client

* fix: headers

* fix: handling of serverVersion

* fix: rename requests to actions

* fix: action imports

* fix: no need to stringify body

* fix: sso flow

* fix: address PR feedback

* fix: invalidate client on logout

* fix: address PR feedback take 2

* fix: address PR feedback take 3

* fix: tsc issues

* fix: get csrf token during client creation

* fix: linter

* fix: invalidate client onLogout

* fix: event emitter

* fix: unit tests

* fix: apply linter fixes

* fix lint

* Modify actions to add / update database values

* Rename clien4.d.ts to client.d.ts

* fix empty & missing translations

* cleanup api client

* Cleanup init & squash some TODO's

* Emit certificate errors in NetworkManager

* cleanup user actions

* Fix NetworkManager invalidate client

* Invalidate client when server screen appears

* Update kotlin to 1.4.30 required by network-client

* patch react-native-keychain to remove cached credential

* update react-native-network-client

* Use app.db instead of default.db in native code

* fix use of rnnc on Android

* Init PushNotifications

* No need to reset serverVersion on logout

* fix logout action

* fix deleteServerDatabase

* fix schedule expired session notification

* use safeParseJSON for db json fields

* unsubscribe when database component unmounts

* cleanup init

* session type

* pass launchprops to entire login flow

* Properly remove third party cookies after SSO login

* recreate network client if sso with redirect fails

* add missing launch props from server screen

* use query prefix for database queries

* Add temporary logout function to channel screen

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-07-06 11:16:35 -04:00
Avinash Lingaloo
3ee6e673c8 MM-35115 [Gekidou] Login flow - Email and Password (#5402)
* MM_35115: ADDED select_server screen

* MM_35115: ADDED select_server screen

* MM_35115: ADDED files on which select_server is dependent

* MM_35115: ADDED react-native-button

* MM_35115: Fixing TS issues [IN PROGRESS]

* MM_35115: Started withObservables [IN PROGRESS]

* MM_35115: Started withObservables [IN PROGRESS]

* MM_35115: withObservables - defaulting when no connection is available [IN PROGRESS]

* MM_35115: withObservables - some code clean up [IN PROGRESS]

* MM_35115: withObservables - some code clean up [IN PROGRESS]

* MM_35115: withObservables - some code clean up [IN PROGRESS]

* MM_35115: Substituting mapDispatchToProps [IN PROGRESS]

* MM_35115: Substituting mapDispatchToProps [IN PROGRESS]

* MM_35115: Substituting mapDispatchToProps [IN PROGRESS]

* MM_35115: Removed resetPing action [IN PROGRESS]

* MM_35115: ADDED app/client

* MM_35115: Preparing scheduleExpiredNotification

* MM_35115: Adding some todos

* Server & LoginOptions

* Use default server if available and autoconnect if configured

* Fix login header & manual server url

* MM_35115: Login Options[IN PROGRESS]

* MM_35115: Login screen - email [IN PROGRESS]

* MM_35115: Login screen - email [IN PROGRESS]

* MM_35115: Login screen - email - login api call [IN PROGRESS]

* MM_35115: Login screen - email - login api call [IN PROGRESS]

* MM_35115: Login screen - email - saving to server db [IN PROGRESS]

* MM_35115: Login screen - email - saving to System, Preferences to db [IN PROGRESS]

* MM_35115: Login screen - enforcing unique check on System entity [IN PROGRESS]

* MM_35115: Login screen - writing TeamMembership [IN PROGRESS]

* MM_35115: Login screen - writing Teams [IN PROGRESS]

* MM_35115: Login screen [IN PROGRESS]

* MM_35115: Login screen- Refactored DataOperator handlers [IN PROGRESS]

* MM_35115: Login screen - Proper clean up [IN PROGRESS]

* MM_35115: Login screen - completeLogin  [IN PROGRESS]

* MM_35115: Improving DataOperator

* MM_35115: Improving DataOperator

* MM_35115: 80% DONE - login with email and password - some todos

* MM_35115: 80% DONE - login with email and password - some todos

* MM_35115: 80% DONE - login with email and password - some todos

* MM_35115: Removing unused app/queries folder

* MM_35115: Clean up

* MM_35115: Clean up

* MM_35115: Clean up

* MM_35115: Clean up

* MM_35115: Clean up

* MM_35115: Adding roles for MYTEAM

* MM_35115: Code clean up

* MM_35115: Code clean up

* MM_35115: Code clean up

* MM_35115: Adding rn-fetch-blob for Android

* MM_35115: Code clean up

* MM_35115: Code clean up

* MM_35115: Added test setup

* MM_35115: Fix database utils

* MM_35115: ADDED loadRolesIfNeeded

* MM_35115: Fix TS issue

* MM_35115: ADDED Tests setup

* MM_35115: Fix TS issues

* MM_35115: Fix TS issues

* MM_35115: Fix TS issues

* MM_35115: Added alternative to site name

* MM_35115: Added alternative to site name

* MM_35115: Removed hardcoded values

* MM_35115: Clean up

* MM_35115 - Fixed Android platform check instead of hermes

* MM_35115  - Replaced emptyErrorHandlingFunction with emptyFunction

* MM_35115 : Implemented TS fixes

* Update index.ts

* MM-35115 - Fix react-test-renderer issue

* MM_35115 - Optimizing DatabaseManager

* MM_35115 : Implemented getDatabaseConnection

* MM_35115 : Refactoring set/getActiveDatabase to use flag record

* MM_35115 : Refactored active database to use flag in Global entity

* MM_35115 : Updated manual database manager test

* MM_35115 : Fix operator/utils/test

* MM_35115 : Fix for base_handler

* MM_35115 : Fix test issues with Handlers

* MM_35115 : Fix test issues with prepareRecords

* MM_35115 : Fix wrapper test issue

* MM_35115 : Updated getMostRecentServerConnection to return the serverUrl as well as the connection

* MM_35115 : Refactored the way we call DataOperator

* MM_35115 : Updated database manager mock

* Add getMostRecentServerUrl function (#5440)

* fix: add getMostRecentServerUrl func

* fix: add ts and tsx to editorconfig

* fix: rename functions

* fix: return type

* Fix unit test setup

* fix login screen unit tests

* MM-36205 [GEKIDOU] Login Flow SSO (#5454)

* MM_35115: Starting LoginOptions SSO

* MM_36205: SSO [IN PROGRESS]

* MM_36205 : SSO [ IN PROGRESS ]

* Update sso_with_redirect_url.tsx

* MM_36205 : SSO Tests [ IN PROGRESS ]

* MM_36205 : Passing serverUrl to SSO screen

* Update sso.test.tsx

* Fix ViewTypes imports and keyMirror method

* MM_36205 : Code clean up

* Fix : Clean up imports

* Update: Aligning with PR 5452

* Fix: AndroidManifest file to include redirection ofr scheme mmauthbeta

* refactor: SSO Login method via Gitlab now navigates to Channel screen

* refactor: SSO Login without redirectURL is also working

* feat: SSO - main test completed

* feat: ADDED test for sso_with_redirect_url

* fix : eslint correction

* fix: Updated Loading component name

* fix : code clean up from reviews

* fix: reviews check

* fix: Added mmauthbeta into info.plist

* Revert "fix: Added mmauthbeta into info.plist"

This reverts commit d87cc23f5b.

* Update Info.plist

* Update AppDelegate.m

* feat: ADDED Forgot Password - Test [ IN PROGRESS ]

* feat: Forgot Password - Completed & Tested

* fix: Including MFA screen [ IN PROGRESS ]

* MFA - Properly tested

* Properly testing forgot_password screen

* Fix login.test.tsx

* Fix SSO method calls chain

* Update index.tsx

* Sort imports for sceen/navigation

* fix: Reviews

* Update signing + act in test

* Removed todo comment on MFA

* feedback review

* fix login tests

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

* App initialization refactor (#5430)

* fix: initial init refactor

* fix: await isServerPresent

* fix: more refactor

* fix: move out launch functions

* fix: remove comment

* fix: update credential functions

* fix: refactor launch functions

* fix: deep link parsing

* fix: lint change

* fix: update deeplink and notification handlers

* fix: indentation

* fix: add relaunchApp

* fix eslint

* refactor launchProps and autoconnect server for deeplink

* fix: use undefined

* fix: define OptionalLaunchProps

* fix: Android - handle server URL in push notification

* fix: rename func

* fix: use boolean launchError instead

* fix: use DatabaseModule

* fix: use DatabaseHelper instead

* fix: remove unnecessary null check

* fix: iOS - support for serverUrl

* fix: iOS - extract serverUrl in reply action

* fix: iOS - expose objc specific func

* fix: remove unnecessary deviceToken param

* fix: return if device is untrusted

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

* fix: bye bye modulePaths

* fix: ios build

* chore: remove unused aliases from babel.config

* chore: fix dependency format in package-lock.json

* chore: remove transparent window background color for android AppTheme

* chore: remove mattermost.js and use index.ts as app entry

* fix: login flow screens theme

* fix: Launch types

* chore: remove OptionalLaunchProps type

* fix: url utils unit tests

* chore: update en.json

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

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-06-18 00:57:40 -04:00