Commit Graph

63 Commits

Author SHA1 Message Date
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
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
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
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
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
Christopher Poile
9a89259e96 MM-48836 - Calls: handle slash commands (#6980) 2023-01-23 20:08:33 +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
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
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
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
Elias Nahum
d676568c61 Refactor NavigationStore (#6842) 2022-12-07 16:44:21 +02:00
Michael Kochell
c1f480de31 App framework - Post menu and channel info bindings, App forms (#6735) 2022-11-30 21:25:08 +02:00
Anurag Shivarathri
d20da35205 [Gekidou MM-46585] Message Priority (Phase 2 - setting message priority) (#6656) 2022-11-23 10:22:05 +01: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
Matthew Birtch
8e6c452256 change generic file icon to paperclip icon (#6739) 2022-11-07 05:09:03 +02: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
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
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
c82c634523 Hide autocomplete when the input is blurred. (#6692) 2022-10-21 10:35:59 +02:00
Elias Nahum
13464cb06b dismiss bottomSheet before opening the camera 2022-09-18 06:59:56 -04:00
Daniel Espino García
9ab4c935ef Fix autocomplete not scrolling in search in Android (#6596) 2022-09-08 04:39:15 -03: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
Christopher Poile
f61ea842af MM-45746 - Handle call_end ws event and '/call end' slash command (#6542) 2022-08-05 07:39:10 -04:00
Daniel Espino García
78f7acde87 Fix other name showing on typing (#6532) 2022-08-02 19:01:45 +02:00
Elias Nahum
4e70961303 [Gekidou] gallery footer and video (#6512) 2022-07-27 09:25:01 -04:00
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
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
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
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
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
Elias Nahum
8795ca85b5 [Gekidou] cleanup fixes (#6376)
* Separate NavigationStore from EphemeralStore

* Prevent WS to mark channel as read while switching to the channel

* Fix mark channel as unread
2022-06-13 08:07:24 -04:00
Elias Nahum
2f07b7afc8 [Gekidou] user profile (#6353)
* User profile

* Access User Profile from reaction list

* Fix threads participants list & open user profile on tap

* Extra bottom padding

* Profile long press tutorial

* Adjust heights

* Reduce label margin from 12 to 8
2022-06-06 11:27:25 -04:00
Elias Nahum
0b4980cf65 [Gekidou] multiple fixes (#6335)
* Fix navigation stack tracking

* Fix hardwareBackPress handlers

* Use user locale for formattedTime

* Show in-app notifications when in a thread but hide when in the same thread

* Fix post draft archived & read only safe area

* Do not show reply post option in thread screen

* Open permalink as full screen modal

* Fix crash when using chinese locale

* Fix team list and call handle team change
2022-06-03 07:18:29 -04:00
Daniel Espino García
a4674915c1 Better handle go to location (#6262)
* Better handle go to location

* Improve server check
2022-05-19 09:06:31 +02:00
Elias Nahum
65366e53a9 Gekidou fixes (#6274)
* Add error boundry around latex to avoid crash

* Do not update channel display name when displayName is empty

* Show Muted unread channel as muted unless it has mentions

* Video size to wrapperWidth if thumbnail is not available

* Hide Threads button in channel list when only unreads filter if it does not have any unreads or mentions

* Ensure channel_item muted state is bolded when unread

* Bump network default retry to 3 attempts

* Sort only unreads by last root post if CRT is enabled

* Default canPost to true if permission is not found

* rename to ErrorBoundary (typo fix)

* simplify filterAndSortMyChannels

* Fix channel name collision with mention badges
2022-05-17 11:07:46 -04:00
Elias Nahum
f62dcd42f7 Open Find Channels with keyboard shortcut (#6260) 2022-05-11 12:33:21 -04:00
Elias Nahum
f54f549cbd [Gekidou] bug fixes (#6249)
* Disable attempt to open User Profile screen

* Fix loading state alignment when switching servers

* Fix user is typing style and show in thread view

* Add additional space at the bottom of post list when CRT is disabled

* header back button position

* add margin bottom to typing component
2022-05-09 12:39:35 -04:00
Daniel Espino García
e6aaa586ad Fix typing (#6243)
* Fix typing

* Do not consider if it is shown to avoid race conditions

Co-authored-by: Daniel Espino <danielespino@MacBook-Pro-de-Daniel.local>
2022-05-06 10:29:16 -04:00
Malik
1996224a4c Merge pull request #6173 from mattermost/detox-channel-create-post-list 2022-04-19 08:47:51 +05:00
Daniel Espino García
14d6d53cc9 [Gekidou] Move managers (#6171)
* Move managers to their own folder

* Fix lint

* Fix unit tests

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-04-16 09:44:11 -04:00
Joseph Baylon
2e2f49f8c3 Detox/E2E: Create Channel and Channel Post List e2e in Gekidou 2022-04-12 11:50:05 -07:00
Daniel Espino García
d1322e84ce [Gekidou] Add performance and code improvements around post_list (#6113)
* Add performance and code improvements around post_list

* Fix test

* Move observers from utils to queries

* remove Flipper on iOS to fix CI build

* Fix observePermissionForChannel for DM/GM

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-04-04 08:14:55 -04:00
Daniel Espino García
328f029a93 Performance improvements on Home to Channel (#6106) 2022-03-31 10:01:22 +02:00
Elias Nahum
527bd04170 Update dependencies 2022-03-26 20:33:13 -03:00
Daniel Espino García
7c642b1e80 [Gekidou] Extract common observers to queries (#5984)
* Extract common observers to queries

* Separate also queries and more agressive refactoring

* Use query to avoid throws from findAndObserve

* Fix minor error

* Address feedback

* Address feedback

* Address feedback

* Fix model types

* Address feedback
2022-03-23 09:19:29 -03:00