Commit graph

707 commits

Author SHA1 Message Date
Daniel Espino García
044cebc978
Show at mentions in RemoveMarkdown renderer (#7664) 2023-11-17 11:43:25 +01:00
harshil Sharma
ba9a84e3e6 Merge branch 'main' into gm_to_channel 2023-11-16 13:23:27 +05:30
Daniel Espino García
94e1334ebb
Maintenance fixes (#7665) 2023-11-15 15:07:00 +01:00
harshil Sharma
b0becb4cee Fixed menu icon 2023-11-15 16:29:04 +05:30
harshil Sharma
4af2ad2f69 review fixes 2023-11-15 14:13:55 +05:30
harshil Sharma
77a1f79790 Review fixes 2023-11-14 13:57:25 +05:30
harshil Sharma
7106c1807b Somre review fixes 2023-11-10 16:14:11 +05:30
harshil Sharma
34567cb74e Cleanup 2023-11-09 17:23:48 +05:30
harshil Sharma
4138a202f2 removed debug logs 2023-11-07 13:10:22 +05:30
harshil Sharma
aff310471a Merge branch 'main' into gm_to_channel 2023-11-06 10:12:49 +05:30
Christopher Poile
332aab134e
MM-55010 - Calls: more messages bar adjustments (#7620)
* refactor; tried to clarify more_messages; new design

* adjust more_messages text spacing

* small fix for height with incoming call on current channel

* move calls-specific code in the calls product behind a hook
2023-11-03 17:51:32 -04:00
Christopher Poile
a0b1367fd3
MM-54278 - Calls banners redesign (#7611)
* join call banner

* same style of voice-on indicator; avatar & emoji sizing spacing polish

* refactor all calls bars; new calls bars UI designs

* i18n changes

* fix for warning bar's close icon color

* refactor banners to normalize UI; new 'noone is talking' design

* fix for avatar in current call bar

* change design for incoming call on calls screen

* remove commented out code
2023-11-03 16:23:12 -04:00
harshil Sharma
3555eb5d72 Merge branch 'main' into gm_to_channel 2023-11-01 10:48:02 +05:30
Daniel Espino García
b9024f5183
Fix error around combined user activity (#7637) 2023-10-31 15:59:54 +01:00
harshil Sharma
2a65fa7816 Merge branch 'main' into gm_to_channel 2023-10-31 07:44:04 +05:30
Tanmay Vardhaman Thole
d8d607257f
copy header text in channel info implemented (#7605)
* copy header text in channel info implemented

* changes fixed
2023-10-30 12:13:52 +01:00
harshil Sharma
7c008a9726 Merge branch 'main' into gm_to_channel 2023-10-30 07:52:55 +05:30
harshil Sharma
c59d7fee8e WIP 2023-10-24 15:43:08 +05:30
harshil Sharma
2574c90754 WIP 2023-10-22 07:48:38 +05:30
harshil Sharma
a717ea520f WIP 2023-10-20 15:57:00 +05:30
Elias Nahum
12a29fe33e
Fix race condition when showing the turorial (#7599) 2023-10-19 10:34:21 +04:00
harshil Sharma
6b0de22824 Merge branch 'main' into gm_to_channel 2023-10-18 11:33:45 +05:30
harshil Sharma
cd3ff8be76 Added message box 2023-10-17 16:27:11 +05:30
harshil Sharma
65dc65df47 Used goToScreen instead of shoModal 2023-10-17 10:15:42 +05:30
Pablo Andrés Vélez Vidal
3638da2536 MM-54199 - attachment author name missing on mobile 2023-09-29 15:26:16 +02:00
Christopher Poile
0ec2b09fd5
MM-54117 - Calls: Support wiredHeadsets; generalize panel_item (#7545)
* generalize panel_item; support wiredHeadsets

* i18n
2023-09-25 08:45:14 -04:00
Harrison Healey
2651dd31e1
MM-53107 Add limit to Markdown nodes (#7528)
* MM-53107 Add limit to Markdown nodes

* Update commonmark to published version

* Rename field to camel case for consistency

* Update Markdown tests for removed children
2023-09-07 09:18:31 -04:00
Harshal sanghvi
70ea5dc0d1
Fixed: The emoji autocomplete does not appear after switching apps (#7520)
* added last viewed feature

* added constants

* storing data in global table and added server col

* fixed stack screen"

* fixed values for crt

* fixed threadid store logic

* added status on profile in bottom tabs

* fixed error for profile edit

* refactored and removed rule from eslint

* fixed variable in username field

* fixed screen blur focus issue

* keyboard show issue
2023-08-28 15:22:49 +02:00
Elias Nahum
68939c9fcc
update reanimated (#7500)
* update reanimated

* fix reanimated types
2023-08-14 14:38:05 -04:00
Khanh P. Huynh
191f498ab0
Fix cannot search user when pressing space (#7486)
* - Update AT_METION_SEARCH_REGEX to allow to search user name with space, similar to mentioning user.
- Convert search term to lowercase.

* Update CHANNEL_MENTION_SEARCH_REGEX to allow to search channel name when typing space

* Fix app crash when searching in channel only

---------

Co-authored-by: Huỳnh Phương Khanh <phuongkhanh@evolgroup.vn>
2023-08-09 11:38:06 +02:00
Khanh P. Huynh
0d8466a055
Fix cannot scroll acknowledgement bottom sheet of user list when there are many users (#7489)
* Fix cannot scroll acknowledgement bottom sheet of user list when there are many users

* - Updated showing user list for Tablet
- Added GestureHandlerRootView to avoid bug not show the list

* Wrap BottomSheet inside withGestures function

* Remove GestureHandlerRootView for BottomSheet component since it's been wrapped inside withGesture function
2023-08-09 10:48:21 +02:00
Lucas Reis
8bc1ec2dff
Fix: Show admin on channel members (#7472)
* feat: adding the scheme_admin info on the channel members user_list sections

* feat: adding the scheme_admin info on channel members when there is a search in the textbox
2023-08-07 09:41:47 +02:00
Daniel Espino García
8a32588507
Fix DMs in sidebar (#7468)
* Fix DMs in sidebar

* Properly handle view, show and open preferences

* Refactor openChannel to keep similar logic together
2023-08-02 11:51:33 +02:00
Lucas Reis
722871d165
[MM-48225] Reduce Padding/Margins from Files Tab and moving the Search Results to the FlatList (#7430)
* feat: reducing the padding/margins of tabs and filter icons on the Search Page

* feat: adds the results text inside the post_results and file_results

* feat: changes search results to use translation

* feat: updates text on search results to use FormattedText

* feat: removing text wrapper

* feat: removing margins and using an ItemSeparator to separate the rows of the file results

* feat: refactor spacing on post results and unnecessary top

* review: externalizing Separator on the file_results

* feat: add marginTop in all File components used inside the <Files> component
2023-07-25 10:11:37 +02:00
Elias Nahum
3effecd6a4
match desktop search and highlight results (#7445) 2023-07-18 12:17:19 -04:00
Elias Nahum
fa43f68a8f
Fix search hashtag (#7459) 2023-07-17 11:36:28 -04:00
Elias Nahum
40254fba96
fix: crash when reactor is missing (#7448) 2023-07-12 10:22:37 -04:00
Elias Nahum
4d94728d90
fix open code block when keyboard is opened (#7432) 2023-07-05 10:13:28 -04:00
Daniel Espino García
0a8eb836f6
Remove guest tags based on config (#7425) 2023-06-30 11:05:54 +02:00
Elias Nahum
01c9e1ab01
Fix image attachment overlap (#7416) 2023-06-20 11:58:04 -04:00
Daniel Espino García
21a4f606b4
Add badge to thread screen (#7404)
* Add mention badge to global threads and threads screens

* Tablet fix

* Remove changes on Thread screen
2023-06-20 09:37:24 +02:00
Christopher Poile
81dd44ae09
MM-52653 - Calls: Attach call to existing thread on /call start (#7338)
* send rootId when starting a call from a thread

* allow join to start calls in threads and with thread titles
2023-06-15 10:08:50 -04:00
Elias Nahum
a27ad43394
Fix onViewableItemsChanged item id (#7400) 2023-06-09 14:40:32 -04:00
Daniel Espino García
20dfb4f406
Fix issue with missing post headers on threads (#7378)
* Fix issue with missing post headers on threads

* Fix lint
2023-05-31 11:42:20 -04:00
Daniel Espino García
b6f62e35fb
Remove unneeded padding on the FindChannels screen on Android (#7368)
* Remove unneeded padding on the FindChannels screen on Android

* Refactor keyboard overlap
2023-05-23 17:33:37 -04:00
Ilya
265be35dce
Fixed Interactive dialog radio buttons style (#7331)
* Fixed Interactive dialog radio buttons style

* removed unnecacary spaces

* remove spaces

---------

Co-authored-by: Ilia Polozov <ipolozov@stsoft.ru>
2023-05-18 12:39:01 +02:00
Daniel Espino García
5a610f1620
Fix post priority bottom sheet (#7350)
* Fix post priority bottom sheet

* Remove unneeded tablet handling
2023-05-16 19:13:06 +02:00
Md_ZubairAhmed
4e01a94cdd init 2023-05-14 17:34:55 +05:30
Elias Nahum
5e9de9f4a2
Thread crash fix and other UI fixes (#7342)
* center align channel name in intro

* align custom status in channel header

* wrap long custom status on profile bottom sheet

* Fix LaTex render clipped on Android

* Add margin for users displayed in a list

* show user profile when tapping on self on channel members

* Fix Thread screen when rootId prop is undefined

* update snapshots

* fix server / login screen on small devices
2023-05-11 09:35:11 -04:00
Daniel Espino García
66a37b7032
Show saved posts in search and recent mentions lists (#7326)
* Show saved posts in search and recent mentions lists

* Add missing space
2023-05-11 08:16:11 -04:00
Daniel Espino García
0a04be7448
Use RN Image for local images instead of FastImage (#7329) 2023-05-10 09:44:10 -04:00
Daniel Espino García
162cdfb21d
Handle currentUser not available throught the app and refetch it (#7333)
* Handle currentUser not available throught the app and refetch it

* Address feedback
2023-05-05 15:40:59 -04:00
Elias Nahum
3a416dc511
Fix Thread button crash (#7330)
* remove the right button component id

* do not render thread follow button

* use lodash uniqueId instead of uuid
2023-05-05 09:17:47 -04:00
Christopher Poile
f8f6839945
MM-51228 - Calls: UX redesign & theming support (#7283)
* UX redesign

* fix call bar profile on Android

* update @mattermost/calls; use common color utils

* collapseIcon and time colour fixes (not correct yet on Onyx or Quartz)

* fix time and collapseIcon colors; fix unavailable wrapper

* center users, scroll when full; statusBar bg and styling

* better spacing; better screenshare; no reaction bar when no reactions

* remove margins from bottom; speaker/react buttonOn colour is now callsBg

* update calls-common; update raised hand button colors

* i18n

* cleaning up style sheets

* fix package-lock

* fix vertical alignment of phone icon

* add a noBorder prop to UserAvatarsStack

* typography, icon sizing, spacing changes

* add rounded header; UI improvements; refactor observables

* updating phone icon, join call margins

* join call text; color theming

* remove unneeded container

* phone-outline -> phone

* split CallsChannelState into boolean components

* use sidebar bg to generate calls bg

* fix hand icon, button texts
2023-05-04 14:17:17 -04:00
Daniel Espino García
86658edc30
Refactor errors around the app (#7306)
* Refactor errors around the app

* Fix recursive function

* Fix tests
2023-05-03 13:08:55 +02:00
Elias Nahum
712d8465a7
fix small images style (#7310) 2023-04-28 20:56:03 -04:00
Harrison Healey
3c790d2561
MM-52173 Add setting to delay channel autocomplete (#7297)
* MM-52173 Add setting to delay channel autocomplete

* Remove extra enhancer

* Address feedback
2023-04-28 20:55:07 -04:00
Daniel Espino García
30706382a0
Improve post chunk handling (#7309)
* Improve post chunk handling

* Remove unneeded merge and improve post list handling

* Fix unneeded requests

* Address feedback and fix lint
2023-04-27 16:04:46 +02:00
Kyriakos Z
ab4f65020a
[MM-49540] Message Priority Phase 3 (#7142)
* Init

* i18 and types

* Acknowledge button, api

* Ack button + display ackd users

* Saves priority on draft and addresses some comments

* Addresses review comments round 2

* Moves fetching userprofiles upon opening ACKs

* Adds metadata column in drafts table

+ Addresses some more review comments.

* Small refactor according to review comments

* Addresses some review comments

* Addresses some review comments

* Uses local action when ACKing

* Fixes first time selecting priority and other

* Updates snapshots

* Fixes i18n

* Fixes ts errors

---------

Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-27 11:22:03 +00:00
Elias Nahum
58d1b02d3a
Fix the query undefined comparison when threadId prop is not set by the navigation library (#7302) 2023-04-21 12:27:51 -04:00
Elias Nahum
784b05fe97
Upgrade Dependencies (#7299)
* upgrade reanimated

* update devDependencies

* upgrade react-intl

* update react-native and some dependencies

* update react-native-permissions

* update RN

* use Share sheet for Report a problem

* update Sentry

* remove step to downloadWebRTC

* update detox deps

* feedback review
2023-04-21 12:16:54 -04:00
Daniel Espino García
a8ee3a1b5a
Fix and unify channel and user list items (#7175)
* Fix channel and user list items

* Fixes on members and create a dm lists

* Fix tutorial and ipad

* Fix test

* Address feedback

* Several fixes on Android

* Fix tests

* Address feedback

* Add more non breaking strings

---------

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2023-04-19 10:13:14 +02:00
Ashish Dhama
100a760502
[MM-44655] : Add channel files screen (#7223)
* add channel files screen

* fix filtering

* refactor code and fix style

* add search and some refactoring

* fix lint

* refactoring

* move file filters to files directory

* fix dependecy

* UX fixes and minor memo dependency changes

* fix empty state on Ipad

* fix search issues

* fix lint error

* fix search issue

* fix loading on filter changes

* show different text if no files found when filter is applied

* feedback review

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-04-14 18:33:11 -04:00
Tanmay Vardhaman Thole
265c4fe8a6
[MM-42565] Toast - Follow/Unfollow thread with undo functionality (#7267) 2023-04-14 12:28:03 -04:00
Daniel Espino García
2658d62c9c
Fix file attachment limited to one file (#7280) 2023-04-14 11:12:40 -04:00
Daniel Espino García
c2bb87dd37
Check server identifier before login (#7206)
* Check server identifier before login

* Update text

* Update message
2023-04-13 15:48:25 +02:00
Daniel Espino García
720ac22070
Handle undefined metadata all over the app (#7244)
* Handle undefined metadata on Markdown Table Images

* Add missing change

* Handle undefined image metadata all over the app
2023-03-31 09:41:28 +02:00
Daniel Espino García
77095b1034
Add members (#7220)
* Add "Add members" modal

* Refactor into server user list

* Renaming and fixes

* Address feedback

* Add missing change

* Styling fixes for iOS
2023-03-30 11:58:50 -03:00
Daniel Espino García
473426180d
Update members count on remove users (#7222)
* Update members count on remove users

* Check for error on removeMemberFromChannel
2023-03-30 11:10:53 +02:00
Tanmay Vardhaman Thole
4b04df83f9
Tapping on a custom status in the message list opens the users profile card (#7199)
* Tapping on a custom status in the message list opens the users profile card

* Tapping on a custom status in the message list opens the users profile card

* code refactored and reuse functions in headerDisplayName

* fix import

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-03-28 09:17:22 +02:00
Daniel Espino García
8ff732a9d6
Fix guest badge not appearing on member list (#7197)
* Fix guest badge not appearing on member list

* Improve performance on role change
2023-03-13 16:39:29 -04:00
Tanmay Vardhaman Thole
66c7a70e49
MM-44663/tappable-channel-names (#6997)
* ADD: channel name tappable in post with channel name fields

* touchable feedback added to the channel name

* rippple effect added in toucable

* Text color of channel name changes as its presses

* ui colors and borderRadius fixed in channelinfo

* comments resolved: dependency added, function name changed

* comment resolved: condition added onChannelNamePressed
2023-03-09 10:17:05 +01:00
Daniel Espino García
9b932c401a
Performance fixes and fix manual sort (#7190)
* Performance fixes and fix manual sort

* Fix test

* Use combineLatestWith

* Revert unread on top
2023-03-07 19:24:40 +01:00
Elias Nahum
a804a7331f
support WS connection over TLS1.3 (#7182)
* support WS connection over TLS1.3

* fix updateDraftMessage on unmount
2023-03-03 11:33:01 +02:00
Elias Nahum
903aaf62b5
Fix display name when open own DM (#7181) 2023-03-02 16:57:49 +02:00
Elias Nahum
af07f511f7
use sourceScreen instead of location in post options (#7176) 2023-03-02 12:46:18 +02:00
Elias Nahum
0938045b7d
Fix potential reaction crash (#7172) 2023-03-01 13:24:11 +02:00
Daniel Espino García
7c6b34afe3
Minor performance fixes on message send (#7164) 2023-02-24 15:35:20 +02:00
Elias Nahum
d61fbd3180
Various fixes (#7161)
* Save message draft when post input is unmounted

* Fix switch CRT on/off

* Handle iPad on Stage Manager

* iOS Share Extension to use LRU cache instead of file cache

* Support building android as aab

* use handleReconnect instead of appEntry on handleCRTToggled

* show skin tone selector tutorial after running all interactions

* Update app/actions/remote/preference.ts

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* fix lint

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-02-24 13:02:05 +02:00
Elias Nahum
2fc1386b78
feat: Channel notification preferences (#7160)
* feat: Channel notification preferences

* feedback review

* use button color for the icon
2023-02-24 12:41:36 +02:00
Daniel Espino García
9f84ab79ce
Only call app entry on websocket reconnect (#7065)
* Only call app entry on websocket reconnect

* Handle notification on its own entry and run app entry on websocket initialization

* Fix notification entry issues

* Fix login entry and add retry on entry failure

* feedback review

* Put back handleEntryAfterLoadNavigation before the batching

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2023-02-23 10:11:34 +01:00
Daniel Espino García
98f25046af
Fix double tilde by waiting for text values to propagate to the native side (#7132)
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2023-02-22 18:03:21 +01:00
Elias Nahum
a78e6ff673
Do not dismiss keyboard when app is brought to the foreground (#7143) 2023-02-16 13:58:26 +02:00
Elias Nahum
6def5d9610
Process notifications when the app is in the background and other perf improvements (#7129) 2023-02-15 17:08:19 +02:00
Elias Nahum
ab5084ce48
use the correct skin tone when selecting an emoji from the picker (#7125) 2023-02-15 11:19:14 +02:00
Daniel Espino García
f23960dea3
Fix upload permissions and centralize download permissions (#7109) 2023-02-14 22:55:02 +02:00
Joseph Baylon
21ae37353e Add testID for radio item option 2023-02-09 09:40:32 +01:00
Jason Frerich
218f98e3e0
[Gekidou - MM-47653] Implement Manage Members Screen (#6771)
* move user_list to component

* start the modal from create_direct_message

* initial commit

* Add managing options to user profile

* s/showManage/showManageMode/

* simplify

* use helper functions

* add dependency

* fix togglling manage/done button

* remove close button in navbar

* remove close button. The only exit from this screen is the back button

* utilize LeaveChannelLabel component actions

* nit

* nit

* slight refactor

* return earlier if not showManageMode

* use defineMessages

* don't modify leave channel component

* add manage_members_label component

* rename variables to imply manage actions

* remove user from channel on server and locally in channel membership

* prevent managing yourself. In V1, this is done by not allowing you to
select yourself for channel removal

* remove useReducer

* - fix typography
- fix icon size
- don't allow tapping on yourself in manage mode

* sort props

* sort props

* sort props

* - combine try blocks
- use getServerDatabaseAndOperator function to get the operator

* fetchChannelStats after removing users from a channel

* currently, the UI does not provide a need to remove multiple members
from a channel, only one member. modify the function to only accept and
remove one user

* no need to pass the entire channel object. only need the channelId which
is already passed into the screen

* do not pass the entire user model, only the userid and if user canManage
  (is sysadmin or channel admin)

* move members constants to its own file and out of general.ts file

* pass channel displayName instead of the entire channel object

* not need to store the user as it is already in the store from the
fetchProfilesInChannel call

* implement device emitter to notify the parent to remove to the user from
the user list

* rename constant in reveal removing a member from a channel.  Might need for another team removal later.

* add snackbar after user is removed

* remove unnessary filter

* remove paging. Server response is not paginated
deconstruct intl

* create EMPTY const

* simplify getProfiles function

* move constants to top of file

* add function to remove the user from the server

* clean up dependencies

* remove @app/ prefix from imports

* add comment describing reason for switch / case

* rename varaible to be more intention revealing

* calculate isDefaultChannel and pass in as prop so don't need to
query for each user

* if user cannot manage, do not show the manage nav button

* move options const into function that uses it

* have the caller of handeRemoveMemberFromChannel fetch channel stats, not
the action

* nit formatting

* s/canManage/canManageMembers/

* use existing observeCanManageChannelMembers function
function only requires channel id

* move userInfo and manage user options to their own components

* calculate bottom sheet snap points when in manage mode

* implement correct permissions for managing users.  For now, only channel
admins can manage users (including deleting members)

* working on section creation

* use map instead of arrays

* - handle user profile sections differently when in members are provided (manage mode)
- emit event when user role is changed
  - modify the channelMembers in manage members modal after changing
    user role

* remove commented code

* deconstruct options

* sort dependencies and add loading dependency

* - when removing a user, remove them from channelMembers state also
- don't add empty sections to the user list results

* user profile coming from ManageChannelMembers is UserProfile joined with
their ChannelMembership.  Can now check for scheme_admin to see if the
user is a channel admin

* deconstruct locale from intl and remove intl const

* Add SearchUserOptions type to provide type checking when creating options for searchProfile
action and searchUsers client api

* correct comment

* deconstruct MANAGE_OPTIONS

* Remove unused event constant

* nits

* Push header title in to the UserProfileTitle component

* Put constants back so Diff of file is smaller

* Combine switch statements
Remove isOptionItem.  These are always action items

* Wrap onAction in a usecallback

* Add help comments

* Add i18n to section titles

* Create RenderItemType for renderItem callback

* update testID
update snapshots

* CanManageMembers is deterimined by observeCanManageChannelMembers

* Add members chanenl option

* Update after merge

* Sort in order of options shown

* nit refactor

* Modify client getProfilesInChannel allow passing more options than sort.
- sort the profiles by admin
- do not show deactivated users in the manage members modal

* Profiles are now sorted by admin.  We can maintain the alphabetical sort
also by iterating over the profiles instead of members which are not alphabetical

* Type the get users Api object

* Add type.
Active option is a boolean, not a string

* only initialize if needed. Moved inside the check for members

* Create type for Manage Member Options

* Remove one liners and call directly in the switch block

* Keys to the map do not need to be translated. Only translate the title
Place the Admins section always on top

* Add removeFromChannel as a dependency

* Remove manageMode option from the title component
- add imageSize prop
- add headerText prop

* Do not show deactivated users in search

* When users are showing and not in manage mode, allow the user to tap and
open the profile for the user (in non-manage mode)

* Add fetchOnly to getMemberInChannel function
Add fetchOnly to updateChannelMembersSchemeRoles function
Remove getMemberInChannel from handleUserChangeRole in manage_channel_members because it is already called via updateChannelMembersSchemeRoles

* Remove todo from comment

* Don't use state for defining action text, icon, and isDestructive. just
set them based on the prop value manageOption

* Added correct permission check for can user manage member roles

* Add can manage member roles prop

* Calculate snap points based on manageMemberRoles prop

* Calculate snap point based on if user can remove other users

* Do not show options if you cannot remove or manage members

* Fix post merge issues

* No need to batch because only manipulating a single model

* Remove comment

* Rename variable

* Split and sort props into multiple lines for readability

* Nit

* Make dependency more specific

* Remove comment.  Doing this requires writing a custom search function in
the app that would need to guarantee the same results as a server call

* Add logError to functions with catch

* Add ticket reference

* Remove await from functions that are updating the database.  Components
that observe models these modify will get the update based from the
observable change.

* Keep track of which section is first so that the tutorial highlight
selects the first user profile of the first section

* Add a second user that creates a new section for testing tutorial

* Remove unused prop

* Update snapshot to include second user

* Use getServerDatabaseAndOperator

* remove testID change. Added a ticket to fix later

* Revert tests to only one user to test if previous tests worked

* Add new test that has 2 users

* Add ticket context as comment

* Add channelId as dependency

* Use useCallback for updateChannelMemberSchemeRole

* Remove async

* mounted.current should only be used in an effect that executes on the
first render

when user has permission to manage members changed, there is no need to
get the profiles again

* Add await for function

* Always reset loading to false after getting profiles

* use !text instead of const value using Boolean()

* add dependency

* Add manage members ids back

* When fetching users for the channel, always store them in the database.
Otherwise tapping a user might not be in the database and tapping on
them will cause a crash

* Fetch the user profile from the server when opening the user profile

* Checking management permissions should be based on the current user, not
the user of the profile being opened

---------

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2023-02-03 10:42:12 +02:00
Elias Nahum
64a59aad55
Filter unused preferences (#7015)
* small preferences refactor

* filter unused preferences and fix removal of preferences in the db

* Feedback review
2023-01-30 21:00:19 +02:00
Elias Nahum
50b845452e
Do not access record children directly to avoid crashes if the child is not present in the db (#7028) 2023-01-27 17:57:38 +02:00
Elias Nahum
15e75ac24b
iPad: enable rotation in all directions (#7007)
* iPad: enable rotation in all directions

* feedback review
2023-01-24 21:48:37 +02:00
Elias Nahum
7aa5bd0611
Update Dependencies and bug fixes (#7000)
* update dependencies

* update dependencies

* feedback review

* update @mattermost/react-native-turbo-mailer
2023-01-24 09:14:23 +02:00
Julian Mondragón
ba33f610c1
Merge pull request #6877 from julmondragon/MM-42835
MM-42835_Invite People - add email+user invites
2023-01-23 16:26:12 -05:00
Christopher Poile
9a89259e96
MM-48836 - Calls: handle slash commands (#6980) 2023-01-23 20:08:33 +02:00
Julian Mondragon
557804ef45 MM-42835_Invite People - add email+user invites 2023-01-23 12:59:57 -05:00
Julian Mondragon
5816406040 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2023-01-15 16:40:21 -05:00
Daniel Espino García
b191154db9
Clean todos (#6897)
* Clean todos

* Remove DatabaseHelper folder
2023-01-12 14:25:39 +01:00
Elias Nahum
612fd5022f
New UI for Emoji picker (#6933)
* BottomSheet migration to react-native-bottom-sheet

* Refactor Emoji picker to use bottom sheet

* Add skin selector

* Add Emoji Skin Tone tutorial

* add selected indicator to tone selector

* feedback review

* show tooltip after 750ms

* ux feedback review

* ux feedback review #2

* Hide emoji picker scroll indicator
2023-01-12 13:38:44 +02:00
Daniel Espino García
8edf128d59
Fix code syntax highlight on full screen view (#6944) 2023-01-11 21:40:01 +02:00
Daniel Espino García
6082a6a790
Fix connection banner showing when not needed (#6948)
* Fix connection banner showing when not needed

* Fix some issues and some refactoring
2023-01-11 21:37:09 +02:00
Julian Mondragon
a9a9c00860 MM-42835_Invite People - add email+user invites 2023-01-09 12:33:51 -05:00
Elias Nahum
ca1f6df1c6
Generate video thumb from file url instead of public url (#6922) 2023-01-05 13:49:04 +02:00
Elias Nahum
dbe565319d
BottomSheet migration to react-native-bottom-sheet (#6907)
* BottomSheet migration to react-native-bottom-sheet

* Use correct scroll view for announcement bottom sheet

* ux review

* Fix post options bottom sheet snap point

* feedback review
2023-01-05 09:51:51 +02:00
Elias Nahum
03dd4477da
Fix onViewableItemsChanged 2023-01-04 14:42:43 +02:00
Elias Nahum
0c4e554534
Use Promise.allSettle when fetching emojis (#6921) 2023-01-03 23:45:50 +02:00
Elias Nahum
411a7e22a2
Reduce the amount of queries to display the PostList (#6927) 2023-01-03 23:36:31 +02:00
Julian Mondragon
5bf0bbbea0 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2023-01-03 09:24:09 -05:00
Elias Nahum
f913819b79
Dismiss correct bottom sheet screen for post / thread options (#6919) 2023-01-01 22:54:04 +02:00
Elias Nahum
5fbfd6bef5
Fix floating input style (#6916)
* Fix floating input style

* simplify style
2022-12-29 20:13:32 +02:00
Elias Nahum
4d039ae88b
Revert "Align latex with text (#6900)" (#6911) 2022-12-27 15:22:00 +02:00
Jason Frerich
c872f7ca8d
remove AddMembers and ManageMembers instances until PRs are merged (#6831) 2022-12-27 15:21:35 +02:00
Elias Nahum
c3bad20176
Fix floating text input color 2022-12-25 12:42:27 +02:00
Tiago Correia
97a34fc0e0
[MM-46562] Add show/hide password function for login screen (#6612) 2022-12-23 16:42:34 +02:00
Daniel Espino García
b1e4403768
Fix several issues around team join (#6863)
* Fix several issues around team join

* Open in modal and fix channel list

* Add joining states and fix issues

* i18n-extract

* add specific message for group related failures on joining teams

* Address feedback

* Address feedback

* Use error from server response
2022-12-23 14:43:59 +02:00
Daniel Espino García
450b6e1a21
Align latex with text (#6900)
* Align latex with text

* fix tests

* fix markdown bold

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-12-23 14:21:50 +02:00
Matthew Birtch
9753334ff2
[Gekidou MM-46365] fix reaction bar space and update bottom sheet styles (#6634)
* updated styles for reaction bar and made pick reaction pressable

* removed unused style import

* removed unused style import

* updated user avatars, user presence, thread options bottom sheets to new style also

* updated status bottom sheet, thread options, and some tweaks to the bottom sheet main file

* fixed a few minor styling issues

* used proper bottom inset in user presence bottom sheet

* various updates to bottom sheets

* used negative top position instead of negative margin

* updated camera type bottom sheet

* further refinements to bottom sheets

* updates to emoji bar and profile image picker

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-12-23 14:08:51 +02:00
Furqan Malik
d063ecf8c7
Merge pull request #6873 from mattermost/detox-maintenance-12152022
Detox/E2E Maintenance: Fix broken iOS e2e tests
2022-12-22 15:06:31 -05:00
Daniel Espino García
da4470bd78
Allow to select text from tables on full view (#6901)
* Allow to select text from tables on full view

* Fix check

* Remove inline style
2022-12-22 20:46:11 +02:00
Elias Nahum
f32b2dfeb2
Perform search when hashtag is pressed (#6893)
* Perform search when hashtag is pressed

* PM feedback review
2022-12-21 19:35:34 +02:00
Elias Nahum
58b78ec27a
use correct syntax highlight styles for github code theme (#6895) 2022-12-21 16:00:38 +02:00
Daniel Espino García
25291b04f1
Fix server unreachable message showing too often (#6890) 2022-12-20 22:35:12 +02:00
Kyriakos Z
bf5783252e
MM-49219: fixes post priority (#6880)
We have changed how priority gets saved in the server, so now instead of
post.props we are using post.metadata.priority.
This commit adds the relevant changes for posts' priority to work in the
mobile app.
2022-12-20 21:54:25 +02:00
Elias Nahum
b01a5bfab8
use matchDeepLink result for relative links (#6882) 2022-12-20 11:42:02 +02:00
Elias Nahum
712324c756
Remove lineHeight from post so that it does not break inline images (#6883) 2022-12-20 07:09:27 +04:00
Elias Nahum
88fde2cc5e
Restyle video playback error (#6871)
* Restyle video playback error

* video not shown when attached with multiple files and thumb fails

* update local path when saving and sharing a file

* feedback review
2022-12-19 21:29:11 +02:00
Anurag Shivarathri
724d72d98a
[MM-47483] Activity Indicator while loading thread posts (#6865)
* Fix

* Addressing feedback

* Disabled pull to refresh when thread is being fetched

* Test fail fix

* Feedback changes
2022-12-17 01:15:22 +05:30
Elias Nahum
e294b07418
Add DeepLink support (#6869) 2022-12-16 18:57:15 +02:00
Julian Mondragon
0262b22a02 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2022-12-16 10:46:15 -05:00
Julian Mondragon
a476b53d5f MM-42835_Invite People - add email+user invites 2022-12-16 10:45:48 -05:00
Joseph Baylon
56d2d57291 Detox/E2E Maintenance: Fix broken iOS e2e tests 2022-12-15 14:47:33 -08:00
Elias Nahum
f51557bcd1
Improve cold start (#6868) 2022-12-15 13:56:46 +02:00
Elias Nahum
917ea371a0
Fix ios keyboard tracking and profile status theme (#6859)
* add listener when screen is popped

* Fix profile status theme
2022-12-13 09:14:39 +02:00
Daniel Espino García
28526034d4
Refactor makeStylesFromTheme to use the correct types (#6801)
* Refactor makeStylesFromTheme to use the correct types

* Address feedback
2022-12-12 10:53:54 +01:00
Jason Frerich
67ff0d2d53
[MM-48951] Add flex to text so that it shrinks and allows icons to take precedence (#6853) 2022-12-09 13:14:47 -06:00
Daniel Espino García
8a8a888420
Fix issues when removing a user from a team (#6855) 2022-12-09 21:08:45 +02:00
Elias Nahum
d676568c61
Refactor NavigationStore (#6842) 2022-12-07 16:44:21 +02:00
Elias Nahum
5e3e7b151e
Place cursor position in between the phrase modifier (#6828) 2022-12-06 18:36:48 +02:00
Elias Nahum
00039cb21b
center highlighted post in permalink view (#6836) 2022-12-06 18:35:13 +02:00
Elias Nahum
5992a85dfb
fix bad merge 2022-12-06 14:15:23 +02:00
Elias Nahum
8ed78b807c
set mentionHighlightBg background for mention keywords (#6834) 2022-12-06 14:09:53 +02:00
Elias Nahum
8e0bf7c397
Fix inline code blocks in thread preview (#6835) 2022-12-06 14:09:38 +02:00
Javier Aguirre
655f55be20
Fix multiselect on users list integration selector (#6826)
* Moving selected ids to a parent

* typing selectedIds for user
2022-12-05 12:13:48 +01:00
Elias Nahum
8366268beb
Create DM/GM Screen - fix extra space in selected users bottom panel (#6821) 2022-12-03 09:48:45 -06:00
Jason Frerich
e4c38bd5a0
[Gekidou MM-47652] Add Create DM Add Bottom Panel (#6699) 2022-12-02 22:44:38 +02:00
Elias Nahum
dc4d61972f
Fix potential crash by accessing the team directly from another model (#6813) 2022-12-02 17:06:18 +02:00
Daniel Espino García
88835ce142
Add connection banner (#6798)
* Add connection banner

* Switch icon depending on whether it is connected or not

* Clean timeout and change text

* Handle optimistic approach

* Piggyback server item fix

* Use toMilliseconds util function

* Set the websocket as disconnected when we are manually closing it

* Do not hide banner when app state changes

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-12-02 15:31:21 +01:00
Daniel Espino García
33b2cb6623
Check if group exist before fetching the mention (#6816) 2022-12-02 15:15:23 +02:00
Javier Aguirre
fc44e8f90b
New User List for Integration selector (#6806)
* WIP New User List for int selector

* user selection

* searchusers by term

* Remove old user list related code on selector

* Fix linting issues

* Submitting user list selection

* currentUserId

* multiselect showing after the bar

* useState instead of reducer

* Remoce empty line

* add callbacks

* Fix lint
2022-12-01 17:10:55 +01:00
Elias Nahum
6eadc527bb
Gekidou Android share extension (#6803)
* Refactor app database queries to not require the app database as argument

* Android Share Extension and fix notifications prompt

* feedback review
2022-11-30 23:18:56 +02:00
Michael Kochell
c1f480de31
App framework - Post menu and channel info bindings, App forms (#6735) 2022-11-30 21:25:08 +02:00
Shivashis Padhi
130b066d36
Switch teamname display from 'capitalize' -> 'uppercase' (#6785) 2022-11-29 08:03:08 +02:00
Anurag Shivarathri
5dd3121bbc
[Gekidou MM-43527] Add threads item to the channel switcher (#6657)
* Threads item in channel switcher

* Misc

* Updated test & renamed type

* Reverted unwanted changes

* Changed thread text to i18n

* feedback fix

* Merge conflict steps

* Merge fix

* test fix

* Added onPress to the dependencies

* Moved the term matching logic to the useMemo block

* Misc

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-25 18:51:04 +05:30
Daniel Espino García
5fae120826
Add support for review app (#6772)
* Add app review

* Use overlay instead of modal

* Add fixes for ios

* i18n-extract

* Add to milliseconds function

* Address review feedback

* Add try to queryGlobalValue

* added app review illustration

* add feedback illustration

* Add animations and feedback bot message

* Restrict reviews to build environment variable

* Fix bug with "dont ask anymore"

* Add check for only supported servers

* Add missing change

* Use for await

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-11-24 18:52:15 +01:00
Javier Aguirre
81dcfc817b
Move User list to a component (#6783)
* Move user list to a component

* added tests to see that several situations render
2022-11-23 19:08:22 +01:00
Christopher Poile
068549a285
MM-46055: Fix toast position after copying link in ChannelInfo screen (#6703) 2022-11-23 13:32:34 +01:00
Javier Aguirre
ac8a18bbfb
[MM-43844][MM-42809] Integration Selector (#6716)
* Activating screens

* Registering the screen

* Adding default themes for components

* Porting items rows, WIP

* WIP Custom List

* Pasting old code to integration_selector, WIP

* No TS errors on components

* Adding selector options

* fix types

* Adding state with hooks

* Page loading with no results

* fix search timeout

* Getting channels, not painting them yet

* searching for profiles

* tuning user and channel remote calls

* Fix radioButton error

* channels being loaded

* rendering options

* Rendering users

* Preparing search results

* Added onPress events for everybody!

* single select working for all selectors

* Remove dirty empty data fix

* remove unused data on custom list row

* fic touchableOpacity styling

* Adding extra info to userlistRow

* Search results (channels and users)

* filter options!

* Adding i18n

* Adding username as name

* move code to effects

* fix typing onRow

* multiselect selection working, missing a "Done" button

* commenting out the selector icons, moving selected options to func

* Added button for multiselect submit

* Fixing data types on selector

* 💄 data sources check

* cleaning custom_list_row

* Fix onLoadMore bug

* ordering setLoading

* eslinting all the things

* more eslint

* multiselect

* fix autocomplete format

* FIx eslint

* fix renderIcon

* fix section type

* actions not being used

* now we have user avatars

* Fix icon checks on multiselect

* handling select for multiple selections

* Moving to its respective folders

* components should render

* Added some test cases

* Multiple fixes from @mickmister feedback

* changing lock icon to padlock on channel row

* Fix children lint errors

* fix useEffect function eslint error

* Adding useCallback to profiles, channels and multiselections

* Fixing @larkox suggestions

* type checking fixes

* Fix onLoadMore

* Multiple hook and functionality fixes

* 🔥 extraData and setting loading channels better

* fix teammate display

* Fix multiselect button selection

* Fix returning selection to autocomplete selector

* Using typography

* Updating snapshots due to typography changes

* removing UserListRow, modifying the existing one

* Extract key for data sources

* Multiselect selection refactor

* fix setNext loop

* refactoring searchprofiles and channels

* Using refs for next and page

* Callback and other fixes

* Multiple fixes

* Add callback to multiselect selected items

* integration selector fixes

* Filter option search

* fix useCallback, timeout

* Remove initial page, fix selection data type

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
2022-11-23 11:17:47 +01:00
Anurag Shivarathri
d20da35205
[Gekidou MM-46585] Message Priority (Phase 2 - setting message priority) (#6656) 2022-11-23 10:22:05 +01:00
Javier Aguirre
da31c9c3cf
[MM-48515] Reuse ChannelListRow component to make it selectable maintaining compatibility (#6778)
* Moving ChannelListRow to component

* selectable
2022-11-22 10:00:20 +01:00
Joseph Baylon
bcca6be0af
Detox/E2E: Search Messages e2e tests in Gekidou (#6756)
* Detox/E2E: Search Messages e2e tests in Gekidou

* Migrate to Detox 20

* Fix detoxrc

* Fix assertion for search messages
2022-11-21 12:58:51 -08:00
Elias Nahum
2a6bb1ddc1
[Gekidou] Show alert message when server is unsupported (#6764)
* Show alert message when server is unsupported

* set server min required version to 5.26.2
2022-11-18 12:18:11 +02:00
Daniel Espino García
e2bd4fbf51
Add announcement banner (#6728)
* Add announcement banner

* Move config to its own table

* Add new config behaviour to iOS share extensions

* Fix test

* Add style changes

* Minor style fixes

* Address design feedback

* Address feedback

* Only render the announcement banner if container if licensed

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-11-17 19:13:20 +01:00
Elias Nahum
25ddc894f2
Fix more messages bar on iOS without insets (#6752) 2022-11-11 20:47:25 +02:00
Daniel Espino García
1aa4188f8e
Move config to its own database table (#6744)
* Move config to its own database table

* Address feedback

* Fix test

* Revert minimum version related changes
2022-11-11 21:20:42 +04:00
Jason Frerich
b078efe84f
[Gekidou MM-48281] Fix issue with single image result extending to full height of the image (#6750) 2022-11-10 10:56:35 -06:00
Elias Nahum
ae0eb43793
[Gekidou] EMM fixes (#6730) 2022-11-08 22:49:39 +02:00
Jason Frerich
23194034da
[Gekidou MM-47765] Add horizontal padding to empty results (#6745) 2022-11-08 12:54:57 -06:00
Javier Aguirre
cc5331f2ba
The value wasn't unique (#6731) 2022-11-08 10:27:52 +02:00
Matthew Birtch
1d4806d7b0
udpated theme color and position of unread dot and adjusted border radius on selected team (#6738) 2022-11-07 05:09:17 +02:00
Matthew Birtch
8e6c452256
change generic file icon to paperclip icon (#6739) 2022-11-07 05:09:03 +02:00
Elias Nahum
d8504b822c
Update denim theme link color (#6733) 2022-11-04 20:57:12 +04:00
Jason Frerich
88ff8fac30
[Bug] Emit boolean with "of" operator (#6729) 2022-11-02 19:35:23 -05:00
Jason Frerich
debcc99480
[Gekidou MM-48006] Show keyboard when select a modifier (#6714) 2022-11-02 12:15:54 -05:00
Daniel Espino García
f033a28eb2
Make so Autocomplete opens when we use the at quick action (#6613)
* Make so Autocomplete opens when we use the at quick action

* Open keyboard when the quick action is pressed
2022-10-31 18:02:44 +01:00
Jason Frerich
b58b425909
[Gekidou - MM-47656] Members List UI Changes (#6698) 2022-10-31 09:44:04 -05:00
Daniel Espino García
bb0322321e
Fetch and store bindings (#6660)
* Fetch and store bindings

* Fix navigate and form opening
2022-10-28 17:08:28 -04:00
Guillermo Vayá
fd7ab546e0
don't bold muted channels (#6713) 2022-10-28 10:53:29 -03:00
Elias Nahum
2eb52990ca
apply heading style to hashtags (#6710) 2022-10-28 10:02:32 -03:00
Matthew Birtch
14cc74fdb9
update team sidebar's background color to match with the theme color used in the webapp (#6711) 2022-10-28 10:01:51 -03:00
Jason Frerich
c627fb8df9
[Gekidou MM-46229] Add hideAndLock, showAndUnlock callbacks for Search (#6677)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-10-27 22:04:26 -05:00
Daniel Espino García
bb051b83b9
Use always first the local channels (#6594)
* Use always first the local channels

* Fix several race condition related issues

* Remove clean after cursor change

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-10-24 10:55:31 +02:00
Daniel Espino García
c82c634523
Hide autocomplete when the input is blurred. (#6692) 2022-10-21 10:35:59 +02:00
Jason Frerich
6b2d8ceff3
[Gekidou MM-47486] Clear the search input after selecting a user (#6683) 2022-10-20 05:54:00 -05:00
Daniel Espino García
4f4f96ff24
Fix channel links when it implies joining a channel (#6686) 2022-10-18 16:16:06 +02:00
Elias Nahum
5c7e89d7de
[Gekidou] update deps (#6667)
* Fix login not showing the usernames (#6652)

* update dependencies

* feedback review

* feedback review 2

* remove unused dependencies

* remove duplicate gesture-handler dependency

* add -XX:+HeapDumpOnOutOfMemoryError to gradle

* adjust gradle memory

* update android ci image

* android executor xlarge

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-10-13 08:41:18 -03:00
Jason Frerich
380b375411
[Gekidou MM-45790] Create File Options Menu for Tablet View (#6531) 2022-10-11 08:19:13 -05:00
Elias Nahum
d201035a89
[Gekidou] Add custom status to user profile sheet (#6670)
* Add custom status to user profile sheet

* add missing translations
2022-10-11 09:18:46 -03:00
Elias Nahum
4c4d5475f3
Fix channel calls icon alignment (#6668) 2022-10-07 09:14:48 -03:00
Elias Nahum
13464cb06b
dismiss bottomSheet before opening the camera 2022-09-18 06:59:56 -04:00
Anurag Shivarathri
af77f74902
Fix (#6644) 2022-09-15 14:13:46 +05:30
Jason Frerich
36846e9b4c
[Gekidou MM-46847] allow wrapping long channel text in autocomplete (#6633) 2022-09-14 08:21:57 -05:00
Anurag Shivarathri
97c41057cc
[Gekidou MM-43992] Display message priority labels for the posts (#6620)
* Displays label

* feedback

* import fix

* Moved label colors to stylesheet
2022-09-11 20:45:07 +03:00
Daniel Espino García
9ab4c935ef
Fix autocomplete not scrolling in search in Android (#6596) 2022-09-08 04:39:15 -03:00
Joseph Baylon
8d7b15da51 Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
Jason Frerich
d88bf8e535
[Gekidou MM-46370] Fix slow response time which switching between files and messages tabs (#6579) 2022-08-25 08:27:55 -05:00
Elias Nahum
37e13b81b5
fix option box minHeight so that it fits on iPhone SE (#6588) 2022-08-24 08:55:26 -04:00
Daniel Espino García
f874279d87
Make it so a space after autocomplete channels and users closes the autocomplete (#6589) 2022-08-23 09:56:04 +02:00
Christopher Poile
d30b97ba99
MM-45747 - Cloud freemium limits & Max participants limits (#6578) 2022-08-20 08:57:14 -04:00
Joseph Baylon
25ae8fdb88
Detox/E2E: Account e2e tests in Gekidou (#6584)
* Detox/E2E: Account e2e tests in Gekidou

* Fix suite title

* Changed ldap port to number

* Fix testIDs for settings

* Added zephyr test case keys
2022-08-18 03:18:46 -07:00
Christopher Poile
7a63467610
do not send the call end slash command (no fallthrough) (#6580) 2022-08-17 10:01:09 -04:00
Daniel Espino García
afd818996e
Improve autocomplete behaviour (#6559)
* Fix positioning issues with Autocomplete

* Fix positioning for iOS and iPad

* Adapt search to new autocomplete approach

* Adapt for android

* Fix lint

* Fix calculations on channel edit

* Address feedback

* Address feedback

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-08-13 08:34:26 -04:00
Christopher Poile
7da253e310
MM-45945 - Calls: finish i18n of calls components and messages (#6547)
* finish i18n for calls components

* fix formatted time style bug

* prefer FormattedText

* more FormattedText

* merge conflicts

* PR comments on copy
2022-08-11 16:10:28 -04:00
Jason Frerich
f376b3f6af
[Gekidou MM-46195] Fix team picker height (#6554) 2022-08-10 06:32:40 -05:00
Elias Nahum
dcc05956b6
Gekidou upgrade RN to 0.69.3 and dependencies (#6537)
* module dependencies

* update fastlane

* upgrade types dependencies

* update dev deps

* update react-native-notifications

* update react-native-keychain

* update sentry

* update detox

* Upgrade to RN 69.3

* increase MaxMetaspaceSize gradle opts

* feedback review
2022-08-08 09:06:20 -04:00
Daniel Espino García
f4e6917185
Ensure no unresolved types in the definition files (#6521)
* Ensure no unresolved types in the definition files

* Address feedback and general cleanup

* Move import from @constants/x to @constants where relevant

* Remove unneeded "import as"
2022-08-05 14:36:19 +02:00
Jason Frerich
aec0ccb105
[Gekidou MM-44940] Add autocomplete to navigation search (#6516)
* implement so that autocomplete will track the collapsable header

* add search screen

* move autocomplete to it's own view and add zindex to the view so it sits
atop the modifiers and results

* remove unused imports

* - remove console.log
- paddingTop is optional

* remove comments

* remove commented code

* - use a more reasonable zindex value. On more than in Nav Header
- use consts for autocomplete padding top

* remvoe search screen button

* - add dependencies

* - remove search button

* - not needed

* move autocomplete zindex to constant

* - move autocomplete directly below NavigationHeader
- adjust distance from search box

* - remove setXX from dependencies
- remove useMemo because only returning the component

* remove these changes. after placing autocomplete correcting in the
search component, this works as expected

* without this setting, ios has the issue where autocomplete is open,
transparent, and has height.  The user cannot click any modifiers.

* - need usememot for autocomplete
- add isSearch to remote runSearch function as option to hit the search
  for autocomplete API option
- Initial component needs handleTextChange callback to set the
  cursorPosition correctly

* use ternary operator
2022-08-05 16:15:12 +04:00
Christopher Poile
f61ea842af
MM-45746 - Handle call_end ws event and '/call end' slash command (#6542) 2022-08-05 07:39:10 -04:00
Anurag Shivarathri
690dd1e66e
[Gekidou MM-42242 MM-46043] Paginating Threads (#6535)
* Pagination and bug

* Feedback and version update

* Making the args optional

* Code refactor
2022-08-04 17:19:55 +05:30
Avinash Lingaloo
e443a69265
MM-45344 Gekidou Remove <MenuItem/> (#6522)
* added MENU_ITEM_HEIGHT to constant/view

* fix user presence and your profile

* added MENU_ITEM_HEIGHT to constant/view

* fix user presence and your profile

* UI Polish - Custom Status

* UI Polish - Settings

* UI Polish - logout

* refactored styles

* removed 'throws DataOperatorException' from './database/`

* fix for copy link option

* fix autoresponder

1.  user should be allowed to enter paragraph

2. the OOO was not immediately being updated on the notification main screen.  The fix is to cal fetchStatusInBatch after the updateMe operation

* About Screen - code clean up

* removed MenuItem component from common_post_options

* removed MenuItem from Settings

* refactored show_more and recent_item

* removed menu_item component

* Update setting_container.tsx

* PR review correction

* Update setting_container.tsx

* Update recent_item.tsx
2022-08-04 12:26:27 +04:00
Daniel Espino García
99d219d8b1
Remove copy link from DMs and GMs (#6534) 2022-08-03 09:40:40 +02:00
Daniel Espino García
78f7acde87
Fix other name showing on typing (#6532) 2022-08-02 19:01:45 +02:00
Jason Frerich
a18bc6cde1
[Gekidou MM-45552] Replace Recent Search Item From MenuItem To OptionItem (#6480) 2022-08-02 07:04:42 -05:00
Shaz MJ
986b9b9f7a
[Gekidou] Autocomplete Group Member Count (#6460)
* Adds member_count to groups table

* Handles member count

* Adds elipsis

* UX Feedback, 2:1 displayName:name

* Removes space
2022-08-01 08:06:03 +10:00
Christopher Poile
17dbfdcb99
MM-45745 - Calls channel info screen options (#6502)
* implement calls_channel_info; joinCall refactoring

* i18n

* Start/Join call as top button; movable copy channel link button

* MM-45971 - Calls v2 PR comments (#6514)

* don't clobber config if api req failed

* combine two loops into one

* update dependencies

* fetch user model on user connected

* fix state exports; spacing; unneeded field in ServerConfig type

* remove useless return in websocket handler

* constant sorting

* move microphone permission request to leave_and_join_alert

* ServerConfig -> ServerCallsConfig

* console.log -> logError

* ternary -> Platform.select

* merge conflicts

* add destructive options to OptionBox; require DismissChannelInfo fn

* add CopyLink option to quick actions list

* showSnackBar on link copied

* adjust quick_options_height

* Screens.Call

* fix CopyLink spacing

* fix observeUsersById, observe needed columns; fix JoinCallBanner mount

* optimized observables; bug fixes

* remove unneeded `return null`

* PR comments

* readable-stream -> 3.6.0

* merge conflicts

* PR comments
2022-07-29 11:10:32 -04:00
Daniel Espino García
bae5477b35
Graph QL POC (#6024)
* First approach

* Lint

* Fixes and adding monitoring console statements (to be removed later)

* Add pagination and apply graphQL also to login

* Get all entry points to use the same GQL call

* Unify gql handling

* Use graphQL on websocket reconnect

* Handle latest changes regarding categories

* Use graphQL to properly fetch channel members on other servers

* Remove logs and fetch unreads from other teams

* Minor fixes

* Final fixes

* Address feedback, minor refactoring, and fixes around the refactor

* Fix custom status duration types

* Add missing fields and some reordering

* Add timeout to fetch posts for unread channels
2022-07-29 16:28:32 +02:00
Christopher Poile
6c5043d598
MM-45744 - Calls mobile: Implement banner spacing (#6490)
* adjust more_messages banner with props
2022-07-29 10:26:31 -04:00
Elias Nahum
5c63392c2f
Remove unused INDICATOR_BAR_HEIGHT (#6519) 2022-07-29 08:14:46 -04:00
Jason Frerich
309c2c01bc
[Gekidou] Get theme from useTheme (#6485)
* get theme from useTheme. No need to pass in as a prop

* get theme from useTheme hook instead of passing in as props
2022-07-28 13:08:38 +02:00
Avinash Lingaloo
adde833ea9
MM-45221 - Gekidou Settings fixes - part 2 (#6491)
* modifying setting option

* navigates to email screen

* UI construction [in progress]

* hooking up withObservables

* email settings - need to save now

* adding a bit of paddings

* setting initial value

* Update notification_email.tsx

* UI Polish - main setting screen

* UI Polish - Mention

* UI Polish - Notification main screen

* code clean up

* code clean up

* UI Polish Notification

* UI Polish

* code clean up

* UI Polish - OOO

* fix observable for email interval

* fix ooo

* fix ooo

* added setting_row_label component

* further clean up

* UI Polish - Display - [ IN PROGRESS ]

* UI Polish - Display - [ IN PROGRESS ]

* UI Polish - Timezone Select [ IN PROGRESS ]

* Update index.test.tsx.snap

* Update app/screens/settings/notification_email/notification_email.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* refactor after review

* update option_item so that action can accept type React.Dispatch<React.SetStateAction

* UI - Polish - Display Theme

UI Polish - Display/Theme [ IN PROGRESS ]

UI - Polish - Display Save button

* UI - Polish - Display Clock

UI - Polish - Display Clock

* UI Polish - Display - Timezone

UI Polish - Display Timezone

added the save button

UI Polish - Display/TZ

UI Polish - Display Timezone

minor refactoring

code clean up

code clean up

* UI Polish - Adv Settings

* UI Polish - Settings/About

UI Polish - Settings/About

* UI Polish - Radio Button

UI Polish - Radio Button

* UI Polish - Android Polishing [ IN PROGRESS ]

* UI Polish - Timezone

fix timezone

fix timezone select

fix timezone select ui

Update index.tsx

* UI Polish - Display/Theme

UI Polish - Custom Theme - Checked Radio btn

* Update en.json

* tweaks to settings styles

* further tweaks to spacing

* Revert "Merge branch 'gekidou-settings-finale' of https://github.com/mattermost/mattermost-mobile into gekidou-settings-finale"

This reverts commit f1fd26987ee5b1854366573b5822c9d0b919d83a, reversing
changes made to 684ba6a19c5962353ce61add2cc9cf10c8f9d3d4.

* added space before 'default'

* Update index.test.tsx.snap

* Revert "Revert "Merge branch 'gekidou-settings-finale' of https://github.com/mattermost/mattermost-mobile into gekidou-settings-finale""

This reverts commit ce77127cb20a3668510a82122325f1642ec7bb60.

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-07-27 22:35:57 +04:00
Elias Nahum
4e70961303
[Gekidou] gallery footer and video (#6512) 2022-07-27 09:25:01 -04:00
Daniel Espino García
b5dc0b02a7
Add observeWithColumns where needed (#6517) 2022-07-27 14:48:35 +02:00
Elias Nahum
2249af4cde
[Gekidou] RN patch (#6513) 2022-07-26 11:37:59 -04:00
Christopher Poile
5bb240dec8
MM-43300: Calls v2 first cut (#6475)
* Android and iOS requirements

* external types

* babel config for calls, package.json for calls dependencies

* state in rxJS; tests

* actions, client/rest, websocket events, constants

* webrtc connection logic

* calls components / screens

* handle peer destroyed gracefully

* PR comments

* remove ViewPropTypes from mocks; no need to ignore error in LogBox

* calls.d.ts -> calls.ts; i18-extract

* @app/products/calls -> @calls

* PR comments; test cleanup

* Revert "remove ViewPropTypes from mocks; no need to ignore error in LogBox"

This reverts commit f9bd171a544de9c02da8387455f904b3840fc5dc.

* working on typing withServerUrl

* added exportedForInternalUse instead of commenting "internal export"

* better switchToThread in call_screen

* i18n

* typed withServerUrl
2022-07-22 15:57:12 -04:00
Anurag Shivarathri
59aeb3767c
Fix (#6500) 2022-07-22 10:44:19 -04:00
Anurag Shivarathri
c4c89a8f05
[Gekidou MM-40096] Permalink view for replies when CRT is enabled (#6494)
* Permalink for CRT

* typo

* Condition refactor
2022-07-22 17:44:39 +05:30
Anurag Shivarathri
102789bbd9
[Gekidou MM-40089 MM-39318] CRT New Messages Line (#6489)
* New Messages Line + More Messages

* Misc

* Update app/actions/local/thread.ts

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

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-07-22 17:28:14 +05:30
Joseph Baylon
c460c485a7
Detox/E2E: Channel Info and Quick Actions e2e tests in Gekidou (#6487)
* Detox/E2E: Channel Info and Quick Actions e2e tests in Gekidou

* Detox/E2E: Fix broken iOS e2e tests in Gekidou (#6488)
2022-07-21 14:18:56 -07:00
Daniel Espino García
3abaf8893d
Add minor fixes and performance improvements on channel switch (#6469)
* Add minor fixes and performance improvements

* Add comment
2022-07-15 16:04:58 +02:00
Jason Frerich
33d9e6257e
[Gekidou MM-44943] Add team picker to the search screen and results screens (#6455)
* initial check in

* add search value to memoized dependencies in modifier component

* ignore the back press

* UI adjustments from PR feedback

* initial commit

* recent search are getting rendered from WDB

* search terms from the search bar are getting added

* can delete recent searches from WDB from recent searches Options

* will now add new ters to the table and recreate existing terms with new
timestamp

* push for scrollview

* use flatlist instead of scrolview

* s/deleteRecentTeamSearchById/removeSearchFromTeamSearchHistory/

* s/addRecentTeamSearch/addSearchToTeamSearchHistory/

* Fix search to use a flatlist and remove douplicate reference

* fix eslint

* Fix android autoscroll search field to the top

* limit the number of saved searches to 20 for a team.
return the results a team Search History sorted by createdAt

* set display to term for now

* clean up

* clean up

* initial commit

* - From the search screen, you cna now set the team for the search
- Recent searches are saved for the specified team

* fix styling fo icon in modifiers

* - move team picker to its own component and call from modifiers
- will use for results header also

* - show team image if available
- pass optional size to TeamPickerIcon
- add TeamPickerIcon to Resuls Header
- styling fixes

* add team name to recent searches title

* parameter renaming

* fix lint

* fix callback bug that was calling itself

* when changing a team while showing search results:
  - update the search results with new selected team and current search
    term.
  - save the recent search the new selected team TeamSearchHistory for
    that team

* move to bottom for reduction of PR review lines and comparison to
changes in theh component logic

* - add dependencies
- rename function

* fix PR feedback

* - created helper function for bottom sheet with TeamList
  BottomSheetContent
- share the bottomScreen calls from AddTeam and TeamPickerIcon

* Add title back to renderContent of bottomSheet call.  This is needed for
tablets

* remove unnecessary check of selectTeamId.  it will be undefined and fail
the equality check

* - now all team_icons are all radius of 8. Includes the following icons:
  - team picker icon in in search screen
    - each team icon in the search screen bottom sheet team list
  - team picker icon in in search results screen
  - each team icon in the home screen team side bar list
    - each team icon in the join new team bottom sheet team list (from home screen)

* use padding in the width of the header so the margins are extended full
width, and dateline separator of post list does not creep into the
header region

* add smallText prop to team_icon.
- allows using 200 instead of default 400 value.
- 200 is used for the TeamPickerIcon used in the searcha nd results
  headers

* - add dependency back to handle renderItem and allow selecting files or
  messages view
- when handling the search, save the term to the correct team

* adjust styling so the rounded edges appear for the header. Use the
header container height to set the height of the header to 40 and then
set top and bottom margins for the rounded top edge and the bottom
margin to the divider

* use typography

* add title dependency

* update dependencies

* use bottomSheetSnapPoint to get the height of the total items

* rename variable

* Always use Metropolis-SemiBold for the team icon fallback

* use a fragment because there is not styling

* move title inside onPress function and can remove the title as a
dependency

* just use strings for testID

* calculate the observable inside the return object

* - remove const and use string
- correct the name of the testID

* - use more specific dependency value team.id
- add onPress dependency

* move to a constant

* move to a constant

* replace with logical AND

* add all logic for the style to textStyle

* remove the separate divider view and just use the outside container with
bottomBorder with and color

* extend the image vertically in the results

* Fix size of bottom sheet

* Refactor unneeded change

* Minor tweaks

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-15 16:05:58 +04:00
Elias Nahum
4a842f0129
Gekidou bugs fixes (#6473)
* Timezone search results not updating on term edit MM-45621

* Fix update theme MM-45604 / MM-45591

* Prevent channel items from stacking when collapse/expand category MM-45590

* Remove current channel from unread section MM-45589

* Latex code block style MM-45572

* Update Post input style when theme update

* Show tutorial only for the first item in the first section MM-45549

* Fix close user profile modal on iPad

* Move style out of component

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-15 12:40:59 +02:00
Jason Frerich
e5273fc43b
[Gekidou - MM-44939] Search Screen - Add File Options Bottom Sheet (#6420)
* add observables for search component
add loader screen
add file client searches for files

* hook up loader component for loading state

* search results with found posts now working

* get and store files when searching

* query file results from the database
display dummy file text for now

* add filter screen and icon to the results header

* needs some cleanup but functionally works
- applied filters reduce files to subset of selectd types
- no filters will show all files

* update number files in parenthesis to match the filtered number of files
(if filtered)

* added the missing file extensions found in webapp
added document_types which is a superset of other types

* remove clear all text from filter and from bottom_sheet component

* checkin before merge latest gekidou branch
- change filters to use latest figma design
  - from multiselect to single select
  - revert changes to bottom sheet content that allowed adding a RHS title button
  - start of the file attachement cards show in file results

* Cleanup and fixes

* Remove nested scroll views

* Address feedback

* Address feedback

* extract the fileInfos from the results object, from an array

* add translations for filters

* add translations

* use Object values to determine if has file info results

* Combine fetch recent mentions and search for posts

* add search icon back to home screen

* remove unused function import

* fix formatting and add 3 dot onPress option

* don't show search button

* Add touchable opacity for pressing the card
Add function for opening gallery
Fix `...` so only clicking directly over it calls it's function.  Everywhere else calls open gallery

* place compassIcon in a touchable and add hitslop
create individual objects for flex column and row

* use one-liner for text
move constant outside of the component

* truncate filename if over max filename lenght and append ...
fix style for filename

* remove all commented filetype code. This will not be added to the card
because of added length to second row. Feedback from UX discussion

* remove trimFileName function and MAX_FILENAME_LENGTH constant
make the textContainer grow in width.  The other flex boxes are constant width
align main container center and remove vertical margins

* create TabTypes contant and TabType Type to replace all uses of 'messages' and
'files'

* make padding adjustments based on the selected tab and if there are
results.
When no results are shown, we want the 'Check the spelling or try
another search' text to not move or flicker when switching between files
and messages

* put the margin on the touchable container, not the compassicon so the
hitslop is relative to the compassicon.

* Add the channel name to the filecard.
each fileInfo from the server contain a channel_id. Add to the reponse type

* Move the channel name to a separate line

* implement changes from PR. Shrink channel name when it doesn't fit

* use a useMemo instead of useCallback

* initial implementation

* keep the bottomsheet open until successful download

* remove comment

* initial commit

* don't use raw object values

* channel_id will be defined

* remove shadows
update channel name text

* move file_options to it's own folder
add checks for enabled downloading and public links

* - when touching each menu item, extend the area horizontally so the edge
  of the icon has space between it and the touchable area.
- don't dismiss the modal.  allow the user to dismiss or choose another
  option.
- adjust the horizontal spacing of the toast

origin/MM-44939-file-options

* adjust margin so holding down on a menuItem spans the width of the
bottom sheet

* working copy using the File component instead of creating a new FileCard
component

* add styhling for long channel name

* update styling for info text

* update styling

* disable lint check for console statement until function is hooked up

* fixt linting errors caused by api including channel_id. It needs to be
optional or the model will complain

* when a file is an image, show the image or video as an image instead of
the generic file icon

* make `asCard` File Prop optional

* shift the image icon over 4px

* tweaked styles

* tweaked styles for file info

* move files directory from inside the post_list/post/body/ folder to its
own component because is it referenced from other screens and components
including:

app/components/post_draft/uploads/upload_item/index.tsx
app/components/post_list/post/body/content/image_preview/image_preview.tsx
app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
app/components/post_list/post/body/index.tsx
app/screens/gallery/document_renderer/document_renderer.tsx
app/screens/home/search/results/results.tsx

* create useImageAttachments hook and share with files component and
results

* rename all renderXXXFile useMemo options to xxxFile. These return the
actual component

* use explicit Boolean(onOptionsPress)

* isSingleInput does not need to be a function

* use find instead of filter().map()

* add dependencies and refactor to reduce some file dependency arrays

* order files by reverse create_at date

* remove console.log and leave as a comment for now

* update styling so that the view wrapper has the borderRadius.  Now
android and ios get the correct borderRadius surrounding the channel
name

* initial implementation

* keep the bottomsheet open until successful download

* remove comment

* move file_options to it's own folder
add checks for enabled downloading and public links

* remove shadows
update channel name text

* - when touching each menu item, extend the area horizontally so the edge
  of the icon has space between it and the touchable area.
- don't dismiss the modal.  allow the user to dismiss or choose another
  option.
- adjust the horizontal spacing of the toast

origin/MM-44939-file-options

* adjust margin so holding down on a menuItem spans the width of the
bottom sheet

* delete file

* - use OptionItem instead of MenuItem
- show the actual image for images and video

* update results to use sorted filesForGallery file_options click gets the
correct file

* use the results of the ordered useImageAttachements results as data for
File and Gallery

* remove unnecessary View

* - create snappoints based on number of OptionItems and the header height
- adjust the toast according to the number of items shown
- show and hide items when canDownload and publicLinksEnabled
- bottom sheet will not resize because it is a function, but will show
  and hide items when enabled/disabled

* results does not need to know about the toast margin in FileOption

* extend optionItem to extende to edges of the bottom screen

* When canDownloadFiles or publicLinksEnabled, reopen the bottom sheet
with the correct options available

* initialize lastViewedIndex to undefined with FileOptions first opens

* remove extra empty line

* open the permalink view when select Open in Channel

* PR feedback
- rename capitalize const
- add several useCallbacks
- use typescript optional parareter instead of if statement

* - remove useMemos that only return a component
- fix bug - when channel name is not present, don't show the channel
  component. This happened when looking at posts in a channel because
  post comes from the model, which does not include the channelName.
  This is because in the channel view all images are in a specific
  channel and no need to store it

* remove useMemo import

* remove callback

* - remote unused operator
- nothing needed outside of try catch

* remove unused Client import

* s/xxxFile/renderXxxFile/ because theare are a function that returns a
component

* move constant above component

* default to 0 instead of forcing to be defined

* - remove useMemo for renderIcon.  It only returns a component
- remove async from useCallback for handle functions

* - do not modify the file value directly
- handle the case where the only open the bottom sheet if it was open at
  the time of the dependencies changing

* use optional operator

* convert to switch statement

* let the parmalink handle what to do when called.

* just use the post id from fileInfo

* use observerConfigBoolean

* import as type because not useing to construct as models

* add links to Jira ticket and github PR

* add line breaks and sort alphabetically

* use ternary operator to reduce number of lines

* move up as far as possible

* remove unused style

* sort props and input vars alphabetically

* move higher in the component

* return ealier

* no need for useDerivedValue. useMemo instead

* use useCallback

* remove unused constant

* replace any with type

* use more specific dependency

* remove memoization.  fileInfo will not change because it is passed from
a server call and will not update unless a new search is created (with
this modal closed)

* no need to memoize. SetValue is already memoized because of useState

* use observeConfigBooleanValue to get config values

* add comment explaining the purpose of the useEffect

* Merge fixes and minor tweaks

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-07-15 11:44:46 +02:00
Avinash Lingaloo
431406f09b
MM-45221 - Gekidou Settings fixes - part 1 (#6472)
* modifying setting option

* navigates to email screen

* UI construction [in progress]

* hooking up withObservables

* email settings - need to save now

* adding a bit of paddings

* setting initial value

* Update notification_email.tsx

* UI Polish - main setting screen

* UI Polish - Mention

* UI Polish - Notification main screen

* code clean up

* code clean up

* UI Polish Notification

* UI Polish

* code clean up

* UI Polish - OOO

* fix observable for email interval

* fix ooo

* fix ooo

* added setting_row_label component

* further clean up

* UI Polish - Display - [ IN PROGRESS ]

* UI Polish - Display - [ IN PROGRESS ]

* UI Polish - Timezone Select [ IN PROGRESS ]

* Update index.test.tsx.snap

* Update app/screens/settings/notification_email/notification_email.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* refactor after review

* update option_item so that action can accept type React.Dispatch<React.SetStateAction

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-15 13:32:25 +04:00
Elias Nahum
0f0c7d5795
Open User avatar in gallery (#6474) 2022-07-15 10:02:09 +02:00
Jason Frerich
17f6aee8a5
[Gekidou MM-44927] Add Recent Searches Component (#6454)
* initial check in

* add search value to memoized dependencies in modifier component

* ignore the back press

* UI adjustments from PR feedback

* initial commit

* recent search are getting rendered from WDB

* search terms from the search bar are getting added

* can delete recent searches from WDB from recent searches Options

* will now add new ters to the table and recreate existing terms with new
timestamp

* push for scrollview

* use flatlist instead of scrolview

* s/deleteRecentTeamSearchById/removeSearchFromTeamSearchHistory/

* s/addRecentTeamSearch/addSearchToTeamSearchHistory/

* Fix search to use a flatlist and remove douplicate reference

* fix eslint

* Fix android autoscroll search field to the top

* limit the number of saved searches to 20 for a team.
return the results a team Search History sorted by createdAt

* set display to term for now

* clean up

* clean up

* extract as constant

* move styles to the top

* always update the created_at value in the database.

* remove unused function

* - remove useMemo of recent
- set or remove props on AnimatedFlatlist

* styling adjustments

* styling changes

* divider takes up 1ox so only need 15px margin to get the 16px total to
the neighboring veritcal views

* update compassIcon to match figma design

* update divider opacity to match figma design

* update styling from UX PR requests

* increase close button to touchable area of 40x40 and adjust menuitem
container

* use logError instead of console.log and trowing an error

* remove surrounding parenthesis

* There is only one record, so no need to batch.  Just call
destroyPermanently.

* call destroyPermanently directly

* when not useing the onScroll callback you don't need to set the
scrollEventThrottle

* set the max searches saved to 15

* no need to memoize

* shoud be a function call

* batch the add/update with the delete of the oldest model

* Minor improvements

* Fix bug when hitting back on search screen

* Fix long channel names in search results

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-14 14:56:08 +02:00
Jason Frerich
97b5e75e5f
[Gekidou - MM-44930] Use File component for showing files in search. (#6425)
* add observables for search component
add loader screen
add file client searches for files

* hook up loader component for loading state

* search results with found posts now working

* get and store files when searching

* query file results from the database
display dummy file text for now

* add filter screen and icon to the results header

* needs some cleanup but functionally works
- applied filters reduce files to subset of selectd types
- no filters will show all files

* update number files in parenthesis to match the filtered number of files
(if filtered)

* added the missing file extensions found in webapp
added document_types which is a superset of other types

* remove clear all text from filter and from bottom_sheet component

* checkin before merge latest gekidou branch
- change filters to use latest figma design
  - from multiselect to single select
  - revert changes to bottom sheet content that allowed adding a RHS title button
  - start of the file attachement cards show in file results

* Cleanup and fixes

* Remove nested scroll views

* Address feedback

* Address feedback

* extract the fileInfos from the results object, from an array

* add translations for filters

* add translations

* use Object values to determine if has file info results

* Combine fetch recent mentions and search for posts

* add search icon back to home screen

* remove unused function import

* fix formatting and add 3 dot onPress option

* don't show search button

* Add touchable opacity for pressing the card
Add function for opening gallery
Fix `...` so only clicking directly over it calls it's function.  Everywhere else calls open gallery

* place compassIcon in a touchable and add hitslop
create individual objects for flex column and row

* use one-liner for text
move constant outside of the component

* truncate filename if over max filename lenght and append ...
fix style for filename

* remove all commented filetype code. This will not be added to the card
because of added length to second row. Feedback from UX discussion

* remove trimFileName function and MAX_FILENAME_LENGTH constant
make the textContainer grow in width.  The other flex boxes are constant width
align main container center and remove vertical margins

* create TabTypes contant and TabType Type to replace all uses of 'messages' and
'files'

* make padding adjustments based on the selected tab and if there are
results.
When no results are shown, we want the 'Check the spelling or try
another search' text to not move or flicker when switching between files
and messages

* put the margin on the touchable container, not the compassicon so the
hitslop is relative to the compassicon.

* Add the channel name to the filecard.
each fileInfo from the server contain a channel_id. Add to the reponse type

* Move the channel name to a separate line

* implement changes from PR. Shrink channel name when it doesn't fit

* use a useMemo instead of useCallback

* initial commit

* working copy using the File component instead of creating a new FileCard
component

* add styhling for long channel name

* update styling for info text

* update styling

* disable lint check for console statement until function is hooked up

* fixt linting errors caused by api including channel_id. It needs to be
optional or the model will complain

* when a file is an image, show the image or video as an image instead of
the generic file icon

* make `asCard` File Prop optional

* shift the image icon over 4px

* tweaked styles

* tweaked styles for file info

* move files directory from inside the post_list/post/body/ folder to its
own component because is it referenced from other screens and components
including:

app/components/post_draft/uploads/upload_item/index.tsx
app/components/post_list/post/body/content/image_preview/image_preview.tsx
app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
app/components/post_list/post/body/index.tsx
app/screens/gallery/document_renderer/document_renderer.tsx
app/screens/home/search/results/results.tsx

* create useImageAttachments hook and share with files component and
results

* rename all renderXXXFile useMemo options to xxxFile. These return the
actual component

* use explicit Boolean(onOptionsPress)

* isSingleInput does not need to be a function

* use find instead of filter().map()

* add dependencies and refactor to reduce some file dependency arrays

* order files by reverse create_at date

* remove console.log and leave as a comment for now

* update styling so that the view wrapper has the borderRadius.  Now
android and ios get the correct borderRadius surrounding the channel
name

* use the results of the ordered useImageAttachements results as data for
File and Gallery

* remove extra empty line

* PR feedback
- rename capitalize const
- add several useCallbacks
- use typescript optional parareter instead of if statement

* - remove useMemos that only return a component
- fix bug - when channel name is not present, don't show the channel
  component. This happened when looking at posts in a channel because
  post comes from the model, which does not include the channelName.
  This is because in the channel view all images are in a specific
  channel and no need to store it

* remove useMemo import

* remove callback

* - remote unused operator
- nothing needed outside of try catch

* remove unused Client import

* s/xxxFile/renderXxxFile/ because theare are a function that returns a
component

* move constant above component

* default to 0 instead of forcing to be defined

* use observerConfigBoolean

* import as type because not useing to construct as models

* add links to Jira ticket and github PR

* add line breaks and sort alphabetically

* use ternary operator to reduce number of lines

* move up as far as possible

* remove unused style

* sort props and input vars alphabetically

* move higher in the component

* return ealier

* no need for useDerivedValue. useMemo instead

* use useCallback

* Minor tweaks and fixes

* Remove floats from style

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2022-07-14 12:50:05 +02:00
Jason Frerich
d015656944
[Gekidou MM-45521] Remove show results button (#6465)
* - calculate the bottom sheet height dynamically
- remove show results button
- set the new fitler when select a new item

* when the user selects the same filter, just dismiss the bottom sheet,
don't fetch the values again

* Update app/screens/home/search/results/header.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* Use OptionItem instead of MenuItem

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-12 20:05:35 +02:00
Malik
8aa0a2490d
Merge pull request #6462 from mattermost/detox-mentions-saved 2022-07-11 05:55:41 -04:00
Avinash Lingaloo
39cfb297a3
MM-39711 - Gekidou Advanced Settings (#6412)
* fix display clock

* implemented help functionality

* skelton for adv settings

* added rightComponent to menuItem

* added advanced settings

* adv settings delete

* Update en.json

* clean up

* Update index.tsx

* fix for camera-roll on android > 30

* undo delete camera-roll images

* Update app/screens/settings/index.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* refactoring

* removed menu item

* refactored imports and getAllFilesInCachesDirectory transferred into util/files

* corrections after review

* ts fix

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-07-08 14:39:41 +04:00
Joseph Baylon
b099797a28 Detox/E2E: Recent Mentions and Saved Messages e2e tests in Gekidou 2022-07-07 16:56:32 -07:00
Shaz MJ
dcfc6e7927
[Gekidou] Groups + group-memberships deferred fetch (#6370)
* WIP

* Actions updated to fetch remote first, and local on error

* Groups fetch and save

* PR Feedback: prepare vs store and undefined fix

* Forgot to add file

* Groups Mention WIP

* Groups highlight!

* Merge, PR Feedback

* PR Feedback

* PR Feedback: Try/Catch blocks

* PR Feedback

* Rebased with PR feedback

* Exclusion fix, plus id order

* Tidies up iterations

* Loops updated

* Update app/database/operator/server_data_operator/handlers/group.ts

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

* PR Feedback: Remove unnecessary prepare/store methods

* Newline ESLint error

* Extracts out id generation for group-associations

* Batches if not fetchOnly

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-07-07 12:20:06 +02:00
Daniel Espino García
e481c07630
Fix at mention that triggers ephemeral message (#6458)
* Fix at mention that triggers ephemeral message

* Properly handle failed posts
2022-07-07 12:12:31 +02:00
Joseph Baylon
6a3c600c8a
Detox/E2E: Messaging (at-mentions, channel mentions, autocomplete etc) e2e tests in Gekidou (#6428)
* Detox/E2E: Messaging (at-mentions, channel mentions, autocomplete etc) e2e tests in Gekidou

* Enable other failing tests so they're visible

* Detox/E2E: Messaging markdown e2e tests in Gekidou (#6450)

* Detox/E2E: Messaging markdown e2e tests in Gekidou

* Added zephyr test ids

* Added markdown smoke test

* Enable disabled tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-05 10:01:46 -07:00
Elias Nahum
f1665fa0ee
Fix touch not responding on some posts (#6447) 2022-06-30 11:14:40 -04:00
Elias Nahum
136b796ac3
Fix theming and navigation stack tracking (#6443) 2022-06-30 11:14:07 -04:00
Daniel Espino García
82c514013c
Fix links to channels closing the channel (#6446) 2022-06-30 11:13:28 -04:00
Elias Nahum
330dc0b9ad
Do not show expired custom status in userItem (#6439) 2022-06-30 11:13:14 -04:00
Jason Frerich
6c18cc8b38
[Gekidou - MM-44928] Search Screen - Search Modifiers (#6393) 2022-06-30 09:52:26 -05:00
Anurag Shivarathri
eaa150cb4b
include latex (#6434) 2022-06-29 22:02:30 +05:30
Shaz MJ
f8140f2117
[Gekidou] Groups mentions / highlights in messages (posts) (#6338)
* WIP

* Actions updated to fetch remote first, and local on error

* Groups fetch and save

* PR Feedback: prepare vs store and undefined fix

* Forgot to add file

* Groups Mention WIP

* Groups highlight!

* Merge, PR Feedback

* PR Feedback

* PR Feedback: Try/Catch blocks

* PR Feedback
2022-06-29 07:47:37 +10:00
Daniel Espino García
d2e2cf3ec1
Substitute all console.x by an appropiate log util function (#6427)
* Substitute all console.x by an appropiate log util function

* Address feedback
2022-06-24 10:26:40 -04:00
Avinash Lingaloo
fe3f0cc892
MM-39711 - Gekidou Settings Timezone (#6384) 2022-06-24 06:52:05 -04:00