Commit Graph

301 Commits

Author SHA1 Message Date
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 f1fd26987e, reversing
changes made to 684ba6a19c.

* 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 ce77127cb2.

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 f9bd171a54.

* 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
Daniel Espino García
adfb90eb59 Make FloatingTextInputLabels no longer than one line (#6411) 2022-06-24 06:14:29 -04:00
Daniel Espino García
13708ab052 Minor performance improvements in post list (#6422) 2022-06-23 11:39:10 +02:00
Daniel Espino García
844f2c0393 Let ServerDatabases type hold undefined values (#6423)
* Let ServerDatabases type hold undefined values

* Avoid model.database
2022-06-22 17:51:28 -04:00
Shaz MJ
12e97e49a8 [Gekidou] [Bug] DM Icon will be 'archive-outline' if user is archived (#6415) 2022-06-21 18:46:46 -04:00
Daniel Espino García
b97fd550f1 Fix lingering draft when switching channels while never leaving the channel screen (#6417)
* Fix lingering draft when switching channels while never leaving the channel screen

* Listen to changes on missing prop
2022-06-21 12:22:41 -04:00
Daniel Espino García
0ea2873942 Remove apparently unneeded fix to improve the experience by not changing the keyboards (#6409) 2022-06-20 08:37:50 -04:00