Commit Graph

134 Commits

Author SHA1 Message Date
Elias Nahum
702aadfddd Not require Websocket type definition imports 2022-01-28 15:53:55 -03:00
Elias Nahum
d14ce66897 [Gekidou] Multi-Server support UI (#5912)
* Multi-Server support UI

* feedback review

* Apply suggestions from code review

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

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-01-28 09:51:30 -03:00
Avinash Lingaloo
dff4f91441 MM-40364 [Gekidou] - Image Picker for Edit Profile (#5901)
* feature edit profile screen

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* ts fixes

* revert floatingTextInput label

This reverts commit a778e1f761.

* code clean up

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* code fix

* code fix

* Adding preventDoubleTap

* rename id to fieldKey

* Update edit_profile.tsx

* wip

* navigating through fields; partly done

* navigating through fields - partly done

* navigating through fields; partly done

* completed field navigation

* added theme into dependency array

* code clean up

* revert conditions for disabling fields

* Added colorFilters prop to Loading component

* Completed loading feature on Edit Profile screen

* code clean up

* Add profile_error

* renamed valid_mime_types to  valid_image_mime_types

* added props isDisabled to email field

* refactored next field logic

* fix

* fix

* code clean up

* code clean up

* Updated ESLINT hook rules to warning instead of disabled

* code fix

* code fix

* new line within your_profile component

* added memo for Field component

* added canSave to dependency array

* update loading component - color filter

* Update app/screens/edit_profile/edit_profile.tsx

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* dependency fix

* fix to fetch my latest status

* fix to remove unnecessary user id for local action updateLocalUser

* prevents bouncing for iOS

* code revert

* Adding  textInputStyle and animatedTextStyle to FloatingTextInput component

* correction after dev session

* adding changes as per new ux

* Update edit_profile.tsx

* corrections after ux review

* ux review

* ux review

* code clean up

* Adding userProfileFields into useMemo

* Add enableSaveButton to dependency of submitUser

* Added react-native-image-picker

* fix picker util

* Added action for setDefaultProfileImage

* account outline on remove picture

* Update edit_profile.tsx

* fix image picker

* style fix

* fix image picker

* removed unused types

* mmjstool issue with integrity checksum

* perform camera permission check for Android

* fix to pull latest status

* updated ChangeProfilePicture to EditProfilePciture

* removed integrity key for mmjstool in package-lock.json

* corrections from pr review

* bumping react-native-image-picker to v4.7.1

* pod install

* update to hooks dependency

* fix profile picture component

* added event emitter from edit_profile_picture

* made hitslop a constant

* code clean up

* uploadProfilePicture as a remote action

* else if profileImage removed

* removed check on isBot

* update renderProfilePicture dependencies

* extractFileInfo with try catch

* updated snappoints

* Revert "updated snappoints"

This reverts commit 6d16d480a1.

* profile picture size

* refactored renderProfilePicture into its own component

* change to if else

* platform select for hasPermissions

* unneeded comment removed

* else if on prefix in edit profile picture

* track has update user info now

* moved image_picker under edit_screen and increased actionSheets item height

* added preventDoubleTap for imagePicker

* multiple uploads

* switch the conditions

* added alert box as requested by Marina

* Revert "added alert box as requested by Marina"

This reverts commit 20735c17a8.

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* removed userInfos constant

* added useMemo for certain components on profile_picture

* converting account-outline into a constant

* added panelItem component

* adding return instead of making the function return

* eslint fix

* update i18n  desc

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* hasPictureUrl transferred to file utils

* removing excess mediaType prop

* add USER_PROFILE_PICTURE_SIZE into constant/profile

* relocate hasPictureUrl method

* relocate hasPictureUrl
* rename ImagePicker to ProfileImagePicker

* removing isDestructive property from panelTypes.

* update sectionLimit for attachFileFromPhotoGallery

* Change animation for showModalOverCurrentContext to a quick alpha on iOS

* re-create PickerUtil if intl changes

* Combine styles in edit_profile_picture component

* Split profile image component into smaller components

* useCallback for showFileAttachmentOptions

* split comment into multiple lines

* edit_profile group refs

* remove unnecessary casting

* add new line to file.d.ts

* remove extra space for utils/index.d.ts

* allowMultiSelection for attachFilesFromFiles, default is false

* Split edit profile screen into smaller components

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-01-28 16:06:50 +04:00
Elias Nahum
be63e3c780 [Gekidou] Handle gracefully teams or channels are fetch errors out (#5913) 2022-01-27 01:25:30 -03:00
Elias Nahum
dec30cb206 Recreate android fonts assets directory 2022-01-25 12:24:12 -03:00
Elias Nahum
7728ca40ac Delete android fonts assets directory 2022-01-25 12:22:55 -03:00
Daniel Espino García
1e355ee684 [Gekidou] Handle post related websocket events (#5851)
* Handle post related websocket events

* Address feedback and several fixes

* Fix lint

* Address feedback

* LastPostAt as latest post create_at, and lastViewedAt as date.now()

* Address feedback

* Change database for operator and add type imports
2022-01-24 12:43:21 +01:00
Daniel Espino García
d5228633b2 [Gekidou] Manage user websocket events (#5862)
* Manage user websocket events

* Revert ChannelMembership -> MyChannelMembership

* Address feedback

* Update channel display name when the user changes

* Minor name and refactoring changes from feedback

* Address feedback

* Address feedback

* Add line breaks for readability
2022-01-24 12:12:06 +01:00
Elias Nahum
55197b6125 update deps 2022-01-22 09:26:00 -03:00
Jason Frerich
5fd8121cf9 [Gekidou MM-39728] - Websocket Events - Preferences (#5865) 2022-01-21 20:45:32 -03:00
Elias Nahum
2013f39a61 V2 dependency updates (#5907)
* Update to RN 0.67 & dependencies

* Update server displayName if already exists

* Allow adding only one reaction

* update to rn 0.67.1
2022-01-21 08:49:04 -03:00
Shaz Amjad
5762bc93b9 Corrects SemiBold to Semibold (#5903)
* Corrects SemiBold to Semibold

* Cleans font
2022-01-20 09:28:08 -03:00
Elias Nahum
b8b51296c0 [Gekidou] post list (#5893) 2022-01-17 07:06:26 -03:00
Elias Nahum
2686633608 fix server display name input 2022-01-12 20:20:23 -03:00
Elias Nahum
6d73a14343 Fix re-login and hot reload crash (#5894) 2022-01-06 13:31:26 +02:00
Elias Nahum
73de44bc23 update mmjstool commit hash 2022-01-04 11:31:45 +02:00
Elias Nahum
fa88b86b36 downgrade from expo 44 to 43 (#5891) 2022-01-04 09:54:05 +02:00
Elias Nahum
112df5c3f8 dependency updates (#5890) 2022-01-04 08:30:55 +02:00
Elias Nahum
388a4248a0 Update dependencies (#5885) 2021-12-26 12:38:02 +02:00
Avinash Lingaloo
47e4306361 MM-39712 - Edit Profile Screen without image picker (#5849)
* feature edit profile screen

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* ts fixes

* revert floatingTextInput label

This reverts commit a778e1f761.

* code clean up

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* code fix

* code fix

* Adding preventDoubleTap

* rename id to fieldKey

* Update edit_profile.tsx

* wip

* navigating through fields; partly done

* navigating through fields - partly done

* navigating through fields; partly done

* completed field navigation

* added theme into dependency array

* code clean up

* revert conditions for disabling fields

* Added colorFilters prop to Loading component

* Completed loading feature on Edit Profile screen

* code clean up

* Add profile_error

* renamed valid_mime_types to  valid_image_mime_types

* added props isDisabled to email field

* refactored next field logic

* fix

* fix

* code clean up

* code clean up

* Updated ESLINT hook rules to warning instead of disabled

* code fix

* code fix

* new line within your_profile component

* added memo for Field component

* added canSave to dependency array

* update loading component - color filter

* Update app/screens/edit_profile/edit_profile.tsx

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* dependency fix

* fix to fetch my latest status

* fix to remove unnecessary user id for local action updateLocalUser

* prevents bouncing for iOS

* code revert

* Adding  textInputStyle and animatedTextStyle to FloatingTextInput component

* correction after dev session

* adding changes as per new ux

* Update edit_profile.tsx

* corrections after ux review

* ux review

* ux review

* code clean up

* Adding userProfileFields into useMemo

* Add enableSaveButton to dependency of submitUser

* Revert fetching status on userProfile

* EditProfile enable extraScrollHeight on iOS only

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-12-23 15:16:55 +04:00
Daniel Espino García
b49b4050ac [Gekidou] Add is_unread to MyChannel model (#5878)
* Make message_count become has_unreads

* Fix lint

* Re-add the message count

* rename has_unreads to is_unread and address feedback

* fix query with is_unread

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-12-22 14:37:14 +02:00
Elias Nahum
7e6248dfb3 [Gekidou] - Channel Intro (#5846)
* Channel Intro

* Move avatar margins to post component per feedback review

* Channel intro redesign

* Fix preferences unit test

* Change group intro sizes

* Add Bot tag to DM Intro if they have it

* fix channel isTablet layout on split screen

* update snapshot
2021-12-21 17:44:00 +02:00
Kyriakos Z
675d8495b3 [Gekidou]: MM-39757 - Recent mentions (#5823)
* [Gekidou]: MM-39757 - Recent mentions

* Refactor channel_info to a separate component

* Fixes schema tests

* Fixes channel_info theme color

* Removes RECEIVED_MENTIONS table and model

Removes RECEIVED_MENTIONS table and model and saves recent_mentions in
the SYSTEM table under the recentMentions ID.

* Cleanup recent_mentions handler

* Adds i18n in recent_mentions screen

* Observe changes on the post messages

* Addresses review comments

* Batches records

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Addresses review comments

* Fetches channels and users needed for mentions

Fetching mentions from all teams might result in missing info like user
profiles, and channels missing from the DB.
This commit fetches all missing users and channels.

* Adds empty state for recent mentions

* Prepares all missing models for channels

* Addresses review comments

* Fixes mention keys for recent mentions

User mention keys when asking for mentions should not include general
purpose ones, like @channel, @all, @here.

Fixes ActivityIndicator color in recent mentions screen.

* Removes top margin of mention message

* Addresses review comments

* Fixes group.name undefined
2021-12-16 12:26:43 +02:00
Daniel Espino García
13c67348eb [Gekidou] Add color to loading spinners (#5872)
* Add color to loading spinners

* Move style to stylesheet
2021-12-14 14:09:11 +01:00
Elias Nahum
b250746c72 update snapshot 2021-12-14 11:57:14 +02:00
Elias Nahum
442159ab78 Fix navigation 2021-12-14 11:45:12 +02:00
Elias Nahum
86dfcf0515 Fix android build 2021-12-12 13:22:16 +02:00
Elias Nahum
fb01c18143 [Gekidou] update dependencies (#5871)
* update dependencies

* Remove storybook env type def
2021-12-10 14:40:21 +02:00
Jesús Espino
3f91c3a47d [Gekidou] Adding logic to hide the list of teams on the teams sidebar when needed (#5790) 2021-12-01 09:07:04 +02:00
Elias Nahum
3a8f1f1946 Update pods (#5857) 2021-11-30 11:43:35 +02:00
Elias Nahum
7c2e6198c8 Fix android broken build cause by rudderstack 2021-11-30 09:58:08 +02:00
Elias Nahum
42f193c70c Upgrade deps (#5850) 2021-11-29 23:19:39 +02:00
Shaz Amjad
5419758a5f Channel List Header Data from DB (#5807)
* Renames header

* Adds Server Display Name Context

* Adds server and team name to header

* Snapshot fail fixed

* rename serverUrl context to server and include displayName

* Add server display name and use only team display name in channel list header

* Improve channel_list test

* Fix channel list on tablets when team sidebar is present

* Fix Server icon color

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-11-25 17:56:50 +02:00
Elias Nahum
7da324de99 Fix login form theming and fields tracking (#5838) 2021-11-23 07:16:15 +01:00
Jason Frerich
520a28962b [Gekidou] MM-39736 Login Flow (#5799) 2021-11-18 22:07:41 +01:00
Elias Nahum
9af1c16147 [Gekidou] - Custom navigation header (#5820)
* Custom navigation header

* Add Search props to header

* Add Search props to header

* Simplify example

* Set large subtitle opacity to 80%

* Add extra spacing on large title
2021-11-10 10:16:58 -03:00
Elias Nahum
880cfbb7ac Upgrade unimodules with expo to use expo-file-system 2021-11-06 18:08:22 -03:00
Elias Nahum
604b6facf2 remove duplicate async-storage dep 2021-11-06 16:59:02 -03:00
Elias Nahum
39982a4280 Gekidou deps (#5815)
* upgrade dependencies

* async-storage upgrade
2021-11-06 16:24:53 -03:00
Shaz Amjad
1c1d0e36aa MM-38682: Gekidou Homepage (Static) (#5756)
* Home page first pass

* Adds missing static elements, introduces button component

* Removes inlines styles

* Various clean ups and button component added

* Updates typography, and adds button util

* Removes button component

* Uses stylesheet.create for memoization

* Snapshots updated

* Podfile update / fix

* Flatlist!

* Tests updated

* Moves out server icon, styling fixes

* Sneaky buttons added, compass-icons list, and server_icon removed

* Snapshots

* Adds chevron to header

* Removes unnecessary files

* Tidies up header and error

* Address feedback

* Compass Icon const removed
2021-11-04 10:32:35 -03:00
Elias Nahum
f19c3b3b6c Enable Hermes on iOS (#5800) 2021-11-03 11:14:00 -03:00
Elias Nahum
9372bb7c04 [Gekidou] Unique servers (#5798)
* Disallow the same server from being added the twice

* Add Default Server name config & EMM managed config

* Update android/app/src/main/res/values/strings.xml

Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>

Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
2021-11-03 11:12:52 -03:00
Jason Frerich
a5254992d3 Draft - Add Server Screen Gekidou Updates (#5663)
* initial checkin

* all text is added

* add fonts

* wip

* get fonts from differnt site suggestion from matt

* use actual apostrophe

* add react-native-paper dependency

* wip

* add project info for metropolis fonts

* correct the display name help text alignment with stretch
use paper theme to color and make the the placeholder opaque
remove placeholder prop because spec wants the box to be empty on focus

* fix Metropolis font reference

* Add more styling.  Clean up code later

* input box text theme color

* separate padding for two textinput boxes
share the input theme

* Use ActivityIndicator from react-native-paper

* wrap formatText components in a view so they scroll up inline with the
text inputs and button

* clean up styles section. no empty lines and no comments

* Use Colors library instead of harcoding #FFFFFF

* Move error message into helper directly under the server url input box

* need to handle the error so it can be presented in the modal

* set state for button is disabled or not
reset errors before every connect attempt

* when url is not valid show the error message and disable the connect
button until some text in display or the url input changes

* s/generic/default/

* group formatted messages together

* Add icon to the error message
fix clipped helper messages

* when urlError is not '', make the input border red
after connecting creates an error, typing in the input boxes will
   * enable the connect button
   * reset the error messages
   * change outline from red to blue

* After connecting and the server url has an error, allow the user to
click the display input and keep the url border red.  The only time the
red border and error reset is when the user types in that field again

* remove duplicate button component. only get the prop values and
construct after all values defined

* use correct icon and add spacing between icon and text

* fix styling for Android
New styling from figma

* initial add of background svg.  RHS is off a bit

* sync with gekidou changes

* sync with gekidou

* sync with gekidou

* sync with gekidou

* sync with gekidou

* use new FloatingTextInput component

* Added widgets/text_settings

* wip

* wip

* Update index.tsx

* work in progress

* fix text settings component

* fix text settings component

* crash fix

* code clean up

* Update index.tsx

* Fix testSettings

* Wrap with View so the text moves with the text inputs when keyboard
appears

* update styling
when user starts typing in server url after a failed connect, dismiss
the error

* use utils/buttonStyles

* leave as it was to minimize irrelevant PR diffs

* nit

* Align all components
Add vertical margin to styles
Add subcontainer and container props to text_setting component
Use FormattedText for choosing a display name text instead of
text_setting helper text

* revert midnight change

* reset the connecing error when a user starts modifying the server url

* formatting
remove svg
repalce <Text> with <FormattedText>

* fix lint

* remove svg file

* Listening for appearance to set the theme for non connected screens

* Pass the theme as a prop for TextSettings

* Fix Server screen layout and pass the displayName for DB creation

* Tablet layout

* Persist keyboard on tap

* Change position & opacity for app version

* added background SVG

* Fix non theme control screens status bar color

* Split Server screen into smaller components

* fixed svg background layout for tablet

* Bring back form & header and remove some extra background color and styles

* Remove duplicate font reference in Info.plist

* Final UI tweaks

* Fix error display on url field

* margin bottom to app version

* Add ClientError utility to extract error

* update snapshot

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2021-10-29 19:14:55 -03:00
Elias Nahum
c8d7d4c528 Upgrade deps (#5796) 2021-10-29 14:38:20 -03:00
Elias Nahum
fbd8b92194 [Gekidou] Avoid technical debt (#5795)
* Apply Status bar color

* useIsTablet hook instead of useSplitView in combination with the constant

* Constants clean up
2021-10-28 10:15:17 -03:00
Elias Nahum
f62822fe52 Adjust the selected team border radius 2021-10-27 18:11:10 -03:00
Elias Nahum
790b1beb22 [Gekidou] push notifications (#5779)
* Push notifications entry point

* Process android notification natively only if RN is not initialized

* Database changes to store local channel viewed_at

* EphemeralStore wait until screen removed

* Move schedule session notification to utility

* Fix channel remote & local actions + added actions for markChannelAsViewed & fetchMyChannel

* Add fetchMyTeam remote action

* Add dismissAllModalsAndPopToScreen to navigation

* Improve post list component & add app state to re-trigger queries

* Improve WS implementation

* Handle push notification events

* Fix postsInChannel since handler

* Handle in-app notifications

* Post list to listen to column changes

* Track selected bottom tab in ephemeral store

* add useIsTablet hook

* in-app notifications on tablets
2021-10-27 17:53:11 -03:00
Elias Nahum
c01bcb7559 Generic badge & fixes to home tab & team sidebar items (#5794) 2021-10-27 17:50:41 -03:00
Elias Nahum
458a006cde Properly sync teams (#5793) 2021-10-26 20:48:09 -03:00
Avinash Lingaloo
884dcb1789 Floating text input label (#5775)
* Added react-native-reanimated-text-input

* Fix TS

* removed react-native-reanimated-text-input

* Renamed as per convention

* Update index.tsx

* Review corrections

* Update Compass icon font

* Update FloatingTextInput to follow theme

* Fix android vertical alignment

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-10-25 18:29:56 -03:00