Commit graph

148 commits

Author SHA1 Message Date
Elias Nahum
e741d47fc2
Fix float input label initial position (#6151)
* Fix float input label initial position

* fix focused label when field is empty
2022-04-11 12:15:44 -04:00
Elias Nahum
b530dbeb09
[Gekidou] upgrade to RN 68 (old arch) (#6138)
* upgrade to RN 68 (old arch)

* remove test setup unused & commented mock

* Android target set to 30

* Fix theme when opening app from push notification

* upgrade common mark
2022-04-08 12:40:44 -04:00
Avinash Lingaloo
9a72837f04
Gekidou - Updated Server Database Diagrams/Schema/Models (#6119)
* started with the diagrams

* removed redundant tables

next step:
1. reconstruct id ( local id vs server id )
2. annotate fields with examples
3. recreate relationship

* work in progress

* work in progress

* fix association

* update postsInChannel

* removed SlashCommands from the Server database schema

* added missing associations in the models and updated docs/database

* exported server database

* update test

* code corrections following review

* update relationship

* update docs

* removed cyclic relationship

* Revert "removed cyclic relationship"

This reverts commit 4d784efb815c0430aa3f7cc433ac4125898d2621.

* removed isOptional from Draft

* linked myChannelSettings to myChannel instead of Channel

* update diagrams

* store null instead of empty string

* update thread association

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-04-07 10:14:28 -04:00
Elias Nahum
ae3c9e2ef2
[Gekidou] bug fixes found with e2e tests (#6130)
* Fix Search users in Create Direct Message

* Fix UserListRow style for onPress

* Prevent create direct message & browse channels from being dismissed with a swipe

* Only display Edit header option when tapping in the channel intro

* Fix localization for ThreadFollowButton

* Prevent New channel screen from being dismiss with a swipe
2022-04-07 09:57:43 -04:00
Joseph Baylon
c85914f4ba
Detox/E2E: Channel List, Browse Channels, Create Direct Message e2e tests in Gekidou (#6114)
* Detox/E2E: Channel List, Browse Channels, Create Direct Message e2e tests in Gekidou

* Fix create_direct_message

* Fix channel_list snapshot test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-05 13:12:57 -07:00
Elias Nahum
2621d921d6
[Gekidou] Performance & UI fixes (#6122)
* Fix search bar style

* MM-42983 Align mention badge on channel list item

* MM-42985 polish channel intro UI

* MM-42984 update fonts on 'Show' bottom sheet

* MM-42982 Increase tap area of back button on channel view

* Set StatusBar style based on theme sidebarBg

* Reconnect other WS after 20 seconds insted of 5

* Only fetch missing profiles for DM/GMs

* Database prepare records optimization

* Do not use fallbackUsername for storing GM/DM in the database

* fix filter for fetching missing dm/gm

* remove use of indexOf inside another loop

* remove use of includes inside another loop

* remove use of find inside another loop

* Add missing translations

* disable Flipper on iOS

* Remove Flipper code from AppDelegate

* feedback review

* trim DM display name to make sure is not empty

* fixing missing direct channels display name

* UI/UX feedback

* fix WS channel viewed and mark as unread

* Remove duplicate emojis from reaction bar
2022-04-04 17:09:26 -04:00
Jason Frerich
137ba9d191
[Gekidou MM-39728] - Websocket Events - Channels (#6038)
* wip checkin

* wip checkin because my system is messed up again

* correct the add user and remove user from channel functions. THe user and channel ids sometimes come from the broudcast field, not the data object

* remove old comments

* remove old comments

* remove old comments

* add back in unarchive handler. handleChannelUpdateEvent will also update the deleteAt value for a channel, but does not get called when unarchive from the channel view, only through the system console.

* nit remove empty line

* wip

* wip

* remove handleChannelConvertedEvent

* remove handleChannelDirectAddedEvent

* wip

* wip

* wip

* Fix websockets events

* Address feedback

* Ensure categories and some refactoring

* Self review fixes

* Fix category creation bug

* Address feedback and minor improvements

* Address feedback

* Fix lint

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-04-04 14:25:42 -04: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
Elias Nahum
7e09e5dc05
PostList do not scroll to bottom after the first onEndReached (#6109) 2022-03-31 19:23:57 +02:00
Daniel Espino García
e2e54b3bca
[Gekidou MM-39733] Port Create Channel from V1 (#6067)
* copy directly from v1. will get working and then convert class to functional components

* screen showing up correctly.  Need to convert lifestyle methods

* create channel button working

* save before refactor in prep for bringing in edit_channel functionality

* change function naming

* clean up lint

* clean up for PR review

* clean up for PR review

* remove hoardcoded styles

* add edit_channel screen

* add handlePatchChannel

* add custom useFormInput hook. use edit screen for both create and edit screens. edit or create screen mode determined by channel prop passed in as a channel or null

* rename edit_channel to create_or_edit_channel

* displayname, header, and purpose are now an object with value and onChange props, created from the useFormInput hook. Now only need to pass this new FormInput Prop to the edit_channel_info component and deconstruct there to get the onChange and value

* fix some lint errors

* fix some lint errors

* remove empty line

* pass intl into utils validate functions because they are not Hooks.  add validation for displayName including translations.

* Move useFormInput hook to its own hooks file and import

* simplify

* remove editing prop.  Was used to determine if the right button was enabled. It was always true for edit_channel screen and always false for create channel screen.  The enableRightButton prop call back is was also used for the same reason.

* remove channeUrl editing references.  This was not implemented on v1

* pass editing prop back into component and add back logic. When editing one field must change.  when creating, just need to check that name is provided

* lint fixes

* fix typing issue for channel types

* scrolling ref should be fixed.  Linting should pass now

* Linting should pass now

* require id field in partial Channel. fixes tsc

* remove everything related to renaming the channel URL.  This has never been requred for mobile

* manage state with useReducer so that all actions/state in one location. This also removes the number of onXXX functions and reduces the number of functions in the component

* reorganize code. useEffects are at top.  Move type and interfaces outside of function component

* Fix lint

* nit: invert if statement checking a negative

* use cneterChannelColor. in figma this is center channel text, but I verified theme color by comparing to SSO login text color

* Simple snapshot tests as a start

* Add more tests

* update snapshot

* add snapshot tests. Add tests for button enabling and disabling

* simplify test with destructuring.

* PR feedback. formatting changes. get user and teamid from one call

* remove FormInput hook and use value/setvalue convention for controlled components

* no need to setChannelDisplayName after creating/updating channel

* Just pass the setXXX function.  Don't need to create as separate callback

* modify floatingTextInput component to allow placeholder text

* remove InteractionManager. PR nits

* mv EditChannelComponent into create_or_edit screen.  Rename component from EditChannelInfo to ChannelInfoForm

* correct import path

* add IntlShape Type to function input. Wrap screen with withServerDatabase, not withIntl

* remove state setting function calls from inside the reducer.  move close function outside of the component. remove setRightButton and rightButton and place rightbutton in initial appState

* move editing const after useX oneliners and before useCallback, useEffect, and useReducers

* rightButton
  - useMemo to memoize an object with dependencies
  - move out of the appState
emitCanSaveChannel
  - wrap with useCallback
onCreateChannel
  - wrap with useCallback
onUpdateChannel
  - wrap with useCallback
useEffect Navigation
  - use the callbacks as dependencies in stead of the depencies of those
    callbacks.

* wrap all formatted message with useMemo()
wrap all onXXXChangeText with useCallback and add deps
move all oneliner derived constants directly after useState useMemo

* remove useMemo from formatted text

* switchToCHannel is still not working.  failing at
  const channel: ChannelModel = await member.channel.fetch();

* use prepareMyChannelsForTeam to update db tables for new channel

* add placeholder text color

* Attach open edit channel screen to `Set Header` button in channel intro view
port SectionItem from V1 and us to add a Switch for setting private/public channel
hook up the plus icon in the channel list header to create a channel (temporary fix to allow debugging)
add new queryChannelsInfoById and queryCurrentChannelInfo query functions
update text for create screen text inputs

* Fix styles and fix actions

* Add autocomplete, fix patch, and address design feedback

* Address feedback

* Add margin between icon and label on Make Private

* Address feedback

* Address feedback

* Address feedback and fix channel list not updating when the channel gets created

* Address feedback and directly add the channel to the default category

* Render at-mentions as Members if no channelId is set

* Display autocomplete on iOS

Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-31 10:06:02 +02:00
Daniel Espino García
328f029a93
Performance improvements on Home to Channel (#6106) 2022-03-31 10:01:22 +02:00
Daniel Espino García
9069048aa7
[Gekidou] Address performance improvements on team switch action (#6101) 2022-03-30 08:05:31 -03:00
Elias Nahum
3650cdfc6d
fix Require cycle 2022-03-26 20:40:17 -03:00
Elias Nahum
527bd04170
Update dependencies 2022-03-26 20:33:13 -03:00
Elias Nahum
86ae1fc9cc
Handle system ephemeral post 2022-03-24 19:24:54 -03:00
Elias Nahum
b6f373df5c
Merge branch 'gekidou' into gekidou-fixes 2022-03-24 16:36:09 -03:00
Daniel Espino García
cc1c112028 Nit 2022-03-24 18:47:16 +01:00
Daniel Espino García
c1b8b0ee38 Merge branch 'gekidou' into CommandAutocomplete 2022-03-24 18:45:42 +01:00
Daniel Espino García
2393151ff0 Add integrations manager, use base-64 to handle svgs and minor improvement and fixes in the components 2022-03-24 18:40:38 +01:00
Elias Nahum
eb9e261ad4
Merge pull request #6083 from mattermost/gekidou-reactions
[Gekidou] reactions
2022-03-24 13:59:28 -03:00
Elias Nahum
ee2ef00a10
Merge pull request #6084 from mattermost/MM-42160-Mention-badge
Adds mention badges to channel list items
2022-03-24 13:49:58 -03:00
Elias Nahum
ce3ea47826
CategoryModel typing 2022-03-24 12:42:17 -03:00
Daniel Espino García
59959d041a Merge branch 'gekidou' into CommandAutocomplete 2022-03-24 16:39:25 +01:00
Anurag Shivarathri
aa4776a260
Replies count query (#6088) 2022-03-24 18:29:10 +05:30
Shaz MJ
eea5e87940 Merge branch 'gekidou' into MM-42160-Mention-badge 2022-03-24 08:24:38 +11:00
Shaz MJ
ab45851e19 Uses existing badge 2022-03-24 08:19:43 +11:00
Elias Nahum
ccb29bbce6
Merge branch 'gekidou' into gekidou-fixes 2022-03-23 17:06:10 -03:00
Elias Nahum
f08ccb2d0c
feedback review 2022-03-23 15:16:14 -03:00
Daniel Espino García
7fecf7e474 Merge branch 'gekidou' into CommandAutocomplete 2022-03-23 17:53:43 +01:00
Daniel Espino García
649681ef94 Remove bang image and use compass icon 2022-03-23 17:37:20 +01:00
Elias Nahum
ffc06bbaa3
Prevent more_messages to autoscroll more than once 2022-03-23 12:56:50 -03:00
Daniel Espino García
7382c1f4fc Address feedback 2022-03-23 16:11:58 +01:00
Elias Nahum
c9ca6cb90c
channel can be null or undefined 2022-03-23 12:03:41 -03:00
Elias Nahum
296d088ca2
channel settings can be null or undefined 2022-03-23 12:00:34 -03:00
Elias Nahum
7f9cd287fe
feedback review 2022-03-23 11:35:37 -03:00
Elias Nahum
292d72dc79
fix collapse categories dependencies and reset list on team change 2022-03-23 11:14:57 -03:00
Shaz MJ
80930477ff
Handes visibility preference setting for dm/gm (#6078)
* Handes visibility preference setting for dm/gm

* Feedback

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2022-03-23 10:41:50 -03:00
Elias Nahum
092e1d9ba5
Merge branch 'gekidou' into gekidou-reactions 2022-03-23 09:52:09 -03:00
Elias Nahum
ddd5538f23
Merge branch 'gekidou' into gekidou-fixes 2022-03-23 09:40:42 -03:00
Daniel Espino García
7c642b1e80
[Gekidou] Extract common observers to queries (#5984)
* Extract common observers to queries

* Separate also queries and more agressive refactoring

* Use query to avoid throws from findAndObserve

* Fix minor error

* Address feedback

* Address feedback

* Address feedback

* Fix model types

* Address feedback
2022-03-23 09:19:29 -03:00
Elias Nahum
65ceaed538
PR feedback 2022-03-23 09:05:20 -03:00
Daniel Espino García
7bb37297bd Merge branch 'gekidou' into CommandAutocomplete 2022-03-23 12:56:49 +01:00
Elias Nahum
98d7ca6ea4
MM-42699 Fix tap state for posts 2022-03-22 23:45:57 -03:00
Elias Nahum
52da02bc7d
Fix channel list item not to cause a crash if myChannel is not found 2022-03-22 23:44:15 -03:00
Elias Nahum
077d5b9e95
Fix post list scroll to index offset and more messages position 2022-03-22 23:43:26 -03:00
Elias Nahum
5bfc815f78
Remove padding bottom on channel list 2022-03-22 23:42:08 -03:00
Elias Nahum
2463e17e52
Fix thread_overview style on android 2022-03-22 23:40:34 -03:00
Shaz MJ
735e9a3925 Adds mention badges to channel list items 2022-03-23 12:21:53 +11:00
Shaz MJ
41d796e2f8 Feedback 2022-03-23 08:43:59 +11:00
Elias Nahum
0618a10e1c
Reactions screen 2022-03-22 14:37:39 -03:00