Commit Graph

189 Commits

Author SHA1 Message Date
Elias Nahum
7f9cd287fe feedback review 2022-03-23 11:35:37 -03:00
Elias Nahum
54218d8f3d Use new observables approach 2022-03-23 10:06:54 -03:00
Elias Nahum
092e1d9ba5 Merge branch 'gekidou' into gekidou-reactions 2022-03-23 09:52:09 -03: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
Elias Nahum
0618a10e1c Reactions screen 2022-03-22 14:37:39 -03:00
Elias Nahum
3807fb0efd constants 2022-03-22 14:30:44 -03:00
Elias Nahum
a0ff99f4e9 set maxWidth of reaction based on the amount of digits 2022-03-22 14:11:48 -03:00
Elias Nahum
1448ee843a Extract re-usable user_item component 2022-03-22 14:08:49 -03:00
Elias Nahum
7431fd4120 combine reactions by their first alias 2022-03-22 11:57:04 -03:00
Shaz MJ
4cedbdfdd2 Adds DM/GM limit based on pref (#6074)
* Adds DM/GM limit based on pref

* PR Feedback

* Memoized ids
2022-03-21 17:51:35 -03:00
Elias Nahum
104b6c7402 Fix crash when latex is used (#6066) 2022-03-18 13:38:56 -03:00
Elias Nahum
25022bb779 Move Thread screen from a modal to a pushed screen (#6060) 2022-03-18 12:44:55 -03:00
Joseph Baylon
1d9c371bfb Detox/E2E: Migrate e2e javascript to typescript (#6059)
* Detox/E2E: Migrate to typescript

* Add jest.config.js

* Add moduleMapper to config.json

* Add cookie jar to axios client, fix tsconfig.json and default_config.json

* Take keyboard into consideration; clean test for now for this migration PR

* Revert changes on path_builder

* Attempt to fix dep issues

* Update detox dep

* Added missing @type dev dependencies

* Fix dep order

* Fix unit tests

* Added dynamic year to email.ts
2022-03-17 17:35:26 -07:00
Elias Nahum
088aa193ab [Gekidou] Use localPath when available (#6058)
* Use localPath when available

* Revert changes to replace space for dash in the filename

* Rename other action to external and always call onDownloadSuccess if defined

* add missing localization strings
2022-03-17 08:58:49 -03:00
Daniel Espino García
ff952ced2a Fix user added to channel event not correctly getting the channel id (#6053)
* Fix user added to channel event not correctly getting the channel id

* Fix several other websocket problems
2022-03-15 19:55:09 +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
5178091ab0 MM-40203: permalink modal viewer for mentions (#5999)
* Permalink initial commit

* Fixes: 10 items per page

* MM-40203: permalink modal viewer for mentions

Is triggered by pressing on an item in mentions,
and shows posts around that item, including the item in a modal.

* Adds previously deleted file

* address feedback

* Move showPermalink as a remote action

* address more feedback

* fetchPostsAround to only return PostModel

* Attempt to autoscroll to highlighted item

* Permalink to not highlight saved and pinned posts

* Add bottom margin using insets to permalink screen

* Use lottie loading indicator

* Switch to channel

* Missing translation string

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-14 16:41:46 -03:00
Elias Nahum
a43dad53e1 [Gekidou] Markdown and Touchables (#6047)
* Fix markdown formatting and touchable interaction

* open gallery as overlay instead of modal

* update snapshots

* Add missing dependencies to useMemo
2022-03-14 16:32:06 -03:00
Elias Nahum
acf4cbde8d [Keyboard] Keyboard tracking (#6050)
* Pause/Resume tracking keyboard

* fix keyboard tracking view on tablets

* add EDIT_POST screen to pause keyboard tracking
2022-03-14 16:21:45 -03:00
Avinash Lingaloo
9e77c419b1 MM-41991 Gekidou Edit Post Screen (#6016)
* edit screen - in progress

* edit screen - in progress

* edit post screen - post input - in progress

* edit post screen - post input - in progress

* edit post screen - post input - in progress

* edit post screen - post input - in progress

* edit post screen - post error component - in progress

* edit post screen - post error component - in progress

* edit post screen -emitEditing - in progress

* edit post screen - in progress

* edit post screen - in progress

* edit post screen - in progress

* able to edit post

* edit post screen - in progress

* edit post screen - in progress

* edit post screen - in progress

* edit post screen - in progress

* updated errorLine

* corrections

* edit post screen - in progress

* edit post screen - in progress

* edit post screen - in progress

* properly closes modal on tablets

* starts with Save button set to false

* refactored onTextSelectionChange

* added useTheme to ErrorTextComponent

* passing canEdit and hasFilesAttached

* passing canEdit and hasFilesAttached

* fix API call

* change canEdit to canDelete

* nearly there

* displays alert

* maxPostSize

* autocomplete - fixing layout

* autocomplete - fixing layout

* autocomplete - work in progress

* autocomplete - work in progress

* clean up delete

* fixing autocomplete

* code fix

* added server error message

* update i18n

* removed comment

* code fix

* fix bug on empty post message

* post input top corrections

* post draft limit

* code corrections as per review

* removed theme from useEffect

* update edit_post - delete call

* refactor PostInputRef to EditPostInputRef

* autocomplete position fix and feedback addressed

* Navigation title & subtitle fonts / navigation button builder

* ux feedback

* delay focus of edit input by 20 frames

* properly dismiss the PostOptions screen

this comes from the fix for the BottomSheet screen

* using device info to check for physical keyboard

* autocomplete with keyboard closed

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-12 17:22:24 -03:00
Joseph Baylon
35fe4081f7 MM-41855 Detox/E2E: Initial e2e tests in Gekidou (#6029)
* Detox/E2E: Initial e2e tests in Gekidou

* Change Local Server to Server 1

* Renamed variables for consistency

* Added team display name verification on channel list screen

* Simplified login by email setup

* Simplified smoke test server login steps
2022-03-12 16:44:04 -03:00
Daniel Espino García
5a0a2c2220 Fix message not being added to the database when it fails (#6043) 2022-03-12 16:41:07 -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
Daniel Espino García
7e4b8b4dd9 [Gekidou] [MM-41524] Add tests to draft Upload Manager (#5990)
* Add tests to draft Upload Manager

* Address feedback
2022-03-11 14:00:09 -03:00
Daniel Espino García
b27ebce2e0 [Gekidou] [MM-39718] Add Create DM screen (#5900)
* Add Create DM screen

* Add channel toggle and minor improvements

* Fix tests and apply new UI

* Address feedback UX feedback and fix missing menu item by adding another item height

* Add display name to channels and piggyback improvement on fetchUserByIds action and translations fix

* Address feedback

* Fix hardcoded colors

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-11 12:57:31 -03:00
Shaz MJ
eec536a61b Adds muted state to channel list in sidebar (#6042)
* Sorting categories body in the observable

* Adds muted state to channel list in sidebar

* update snapshots

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Shaz Amjad <shaz.amjad@me.com>
2022-03-11 10:13:05 -03:00
Elias Nahum
86bd5c5072 [Gekidou] animated reactions (#6035)
* Add animation for reaction counter

* Preserve reaction order while the component is mounted
2022-03-11 09:08:02 -03:00
Shaz MJ
7001e29567 Gekidou category collapse animated (#6049)
* Adds chevron animation for collapsing categories

* Adds category body channel item collapsing

* Updates category body channel list tests and timing
2022-03-11 09:07:34 -03:00
Daniel Espino García
9f61c2778c Add Input radius (#6044) 2022-03-11 09:03:48 -03:00
Shaz MJ
23ff6e8a09 Sorting categories body in the observable (#6041)
* Sorting categories body in the observable

* feedback review

* Fix category queries to return only channels that have been loaded

* Do not display archived channels unless is the active one

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-10 18:19:49 -03:00
Anurag Shivarathri
5b44676985 [MM-39708] Gekidou Thread Screen (#6015)
* Thread screen

* misc

* Added snapshot for ThreadOverview

* Updated snapshot

* Misc

* Updated snapshot and ts fixes

* Made thread as a modal, fixes post list not closing on tablet

* Removed unsued variables

* Putting back the empty space before the root post (inverse list footer)

* Changed input text

* Removed empty footer space

* Misc fixes

* Disables new messages line for thread

* Loading threads before opening modal & BottomSheet componentId fix

* Moved merge navigation options to switchToThread

* Moved LeftButton to switch to thread

* Removed Q.and

* Misc fixes

* Added task id for pagination

* Removed useMemo, Q.and

* move thread close button as a prop

* Remove title font styles to use default

* Misc changes

* Misc fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-10 10:45:30 -03:00
Elias Nahum
0c0f92a237 [Gekidou] Markdown SVG & image size support (#6032)
* Support Markdown svg and custom size inline images

* remove commonmark patches

* move getMarkdownImageSize to @utils/markdown

* Fix worklet not present while running unit tests that use calculateDimensions

* Set max size for SVG

* Set svg dimensions based on calculated size

* feedback review
2022-03-10 09:03:09 -03:00
Shaz Amjad
2220a0d50c Filters to prune only custom categories (#6040) 2022-03-09 16:18:58 -03:00
Shaz Amjad
5552c3a252 [Gekidou] Sidebar Categories FlatList Optimisations (#6031)
* Adds optimisation to sidebar category lists rendering

* Test updated

* Updates snapshot
2022-03-08 18:16:58 -03:00
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
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
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