Commit Graph

235 Commits

Author SHA1 Message Date
Elias Nahum
ffc06bbaa3 Prevent more_messages to autoscroll more than once 2022-03-23 12:56:50 -03:00
Elias Nahum
c9ca6cb90c channel can be null or undefined 2022-03-23 12:03:41 -03:00
Elias Nahum
296d088ca2 channel settings can be null or undefined 2022-03-23 12:00:34 -03:00
Elias Nahum
292d72dc79 fix collapse categories dependencies and reset list on team change 2022-03-23 11:14:57 -03:00
Elias Nahum
ddd5538f23 Merge branch 'gekidou' into gekidou-fixes 2022-03-23 09:40:42 -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
65ceaed538 PR feedback 2022-03-23 09:05:20 -03:00
Elias Nahum
98d7ca6ea4 MM-42699 Fix tap state for posts 2022-03-22 23:45:57 -03:00
Elias Nahum
52da02bc7d Fix channel list item not to cause a crash if myChannel is not found 2022-03-22 23:44:15 -03:00
Elias Nahum
077d5b9e95 Fix post list scroll to index offset and more messages position 2022-03-22 23:43:26 -03:00
Elias Nahum
5bfc815f78 Remove padding bottom on channel list 2022-03-22 23:42:08 -03:00
Elias Nahum
fbdaff34c6 Fix thread_post_list to display first post completely 2022-03-22 23:41:30 -03:00
Elias Nahum
2463e17e52 Fix thread_overview style on android 2022-03-22 23:40:34 -03:00
Elias Nahum
71d442b693 Remove duplicate intro components 2022-03-22 23:34:08 -03:00
Elias Nahum
3e94958ab0 Patch react-native-animated-numbers to not re-render indefinitely (#6080) 2022-03-22 11:21:36 -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
8bd5261352 Exclude detox from typescript check (#6065) 2022-03-18 13:38:13 -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
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