Commit graph

80 commits

Author SHA1 Message Date
Daniel Espino García
4c8594d330
Add linter rules for import order and type member delimiters (#5514)
* Add linter rules for import order and type member delimiters

* Remove unneeded group

* Group all app/* imports before the internal imports

* Move app/ imports before parent imports

* Separate @node_modules imports into a different group

* Substitute app paths by aliases

* Fix @node_modules import order and add test related modules

* Add aliases for types and test, and group import types
2021-07-23 11:06:04 +02:00
Manoj Malik
14d377e713
MM-36917 Custom status expiry (#5434)
* Started with the custom status feature
Added custom status actions and API integration
Added custom status selectors and types
Added custom status emoji component
Added EnableCustomStatuses flag in config
Added Set a status option in the settings sidebar

* Fixed emoji and added clear button
Fixed the default emoji in the set a status in the settings sidebar
Made a custom status label component to match the styling of rest of the drawer items
Fixed the bug in the selectors
Added localization id in en.json

* Added icon for clear button
Fixed the custom status label issue
Added styling and icon for the clear button
Fixed order of the localization ids

* Made custom status modal with suggestions
Fixed the long custom status overflowing in the sidebar with ellipses
Added the functionality to open custom status modal from sidebar
Made the constants for custom status
Made the custom status suggestion functional component
Made the custom status modal functional component
Made the selector for the recent custom statuses
Added some localization ids

* Changed the custom status modal to class component
Added recent custom statuses in the modal
Fixed the styling of titles
Fixed lint errors except one

* Fix types and use i18n translations

* Update types

* Refactored some code and made clear button component
Refactored the code of the custom status label to a different file and used it everywhere
Made a separate component for clear button and added it in recents and sidebar
Fixed the styling of the custom status text according to the new figma designs

* Added emojipicker in custom status modal
Fixed the Done button in custom status modal
Added the functionality to clear status from inside the modal

* Added custom status in user profile and post header and review fixes
Added custom status in user profile page
Added custom status emoji in post header
Added functionality to preventDoubleTap everywhere
Added localization ids
Review fixes

* Fixed several issues
Increased touch area of clear button everywhere
Fixed the event propagation issue in clearing suggestions
Fixed the center alignment issue of title in custom status modal
Added clear button in user profile page
Review fixes

* Fix types for custom status modal

* Fix tsc

* Fixed types and separated functions for Recent and suggestions in custom status modal

* Update app/components/sidebars/settings/settings_sidebar_base.js

* Updated localization id in settings sidebar

* Changed the method in removeRecentCustomStatus API call
Changed names of some variables

* Fixed the input height issue in ios and modalContext issue in ios

* Fixed various issues
Fixed clear button border radius issue in ios
Changed the method to post in removeRecentCustomStatus API call
Made the custom status modal input single line and fixed the height
Changed the height of iconContainer in custom status suggestion

* Fixed the event propagation issue without use of PanResponder

* Unit tests

Added unit tests for custom status emoji component
Added unit tests for custom status text component
Added unit tests for clear button component
Added unit tests for custom status suggestion component
Added unit tests for custom status modal component
Added tests and updated snapshtots in user profile screen

* Added custom status in several new locations
Added custom status emoji in LHS channel list
Added custom status emoji in channel header
Added custom status in channel info header
Modified the styles of some components

* Fixed width issue in LHS channel list and channel title (#8)

Added one check in channel info header

* E2E tests for custom status (#6)

* Completed MM-T3890, MM-T3891, MM-T3892, MM-T3893 e2e tests

Added EnableCustomUserStatuses in default config of detox
Added several testIDs in custom status modal and clear button components
Modified settings_sidebar ui component in detox support
Made custom status screen ui screen in detox support
Added testIDs in custom status suggestion and clear buttons
Modified custom status ui screen component in detox support
Added appropriate comments in the tests
Modified custom status emoji component to accept styling and added testID
Modified the custom status emoji styling in post header, user profile, LHS channel list, channel info header, channel title
Made user profile screen in detox support
Added testID prop in custom status emoji component
Added testIDs in channel info header and user profile and user profile row components

* Added unit tests for new components and updated tests for custom status emoji

Updated snapshots for existing components
Added new tests for channel title and LHS channel item
Added new tests for channel info and channel info header
Updated snapshots

* Fixed styles and emoji opacity in custom status input in modal

* Fixed the color of text and emoji in custom status suggestions
* Fixed the color of emoji and font size in the custom status input in modal

* Updated snapshots

* Fix the MM-T3893 E2E test case

* Update detox/e2e/test/smoke_test/custom_status.e2e.js

* Apply suggestions from code review

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>

* Updated snapshots and moved the custom status e2e test to different location

* Fix styles

* Fix ios styles

* Update snapshots

* Updated styles and localization ids

* Changed the API call for the remove recent custom status action (#12)

* Fix styles for ios

* Fixed styles in Android
Fixed the styling of clear button everywhere
Fixed the separator not showing issue in custom status suggestion
Fixed the emoji positioning issue in custom status suggestion

* Fixed tests and updated snapshots

* Fix stylessss for ios

* Updated snapshots

* Added close button and title in emojipicker screen opened from custom status modal

* Fixed the delay issue in clearing and setting the custom status in settings sidebar (#13)

* Fixed the delay issue in clearing the custom status in settings sidebar
Modified the unsetCustomStatus action to use request statuses
Modified the settings sidebar to use the request status to show or hide custom status
Made proper types and reducers for the unset custom status request

* Added the Retry message for setting and clearing the custom status
Made set custom status request action types and reducers
Modified the setCustomStatus action to dispatch request status actions
Made the retryMessage component
Added the logic for when to show the retry message

* Modified set custom status action to dispatch Update me action with the new custom status

* Modified the settings sidebar to use componentDidUpdate for the delay issue in custom status clearing and setting

* Modified componentDidUpdate and made a new function for handling request status change

* Modified handleRequestStatusChange function to two separate functions

* Code refactoring

* Updated tests

* Fixed the issue for custom status not updating in settings sidebar when changed from another client

* Fixed the issue for custom status not updating in settings sidebar when changed from another client
* Fixed the IOS UI issues
    - Fixed the font-weight of the channel header custom status
    - Fixed the extra space added on typing in input issue
* Fix custom status e2e tests

* Fixed the custom status input click area issue

* Fix custom status input touchable area

* added expiry time to custom status

* removed spaces from en.json

* Updated snapshots

* Updated snapshots

* added some ui changes to expiry stuff in custom status

* Apply suggestions from code review

Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>

* Review fixes (#15)

* Review fixes
Sorted the import order in all files
Modified removeRecentCustomStatus action not to use bindClientFunction
Added types for custom status client functions
Added containerSize prop in clear button component
Removed the check for custom status enabled from custom status emoji and added it in post_header, channel_title, channel_item
Modified getCustomStatusSelector to return undefined if custom status does not exist
Modified settings_sidebar, channel_info, channel_info_header, custom_status_modal, user_profile to handle undefined custom status
Removed the text wrapper from the custom status emoji in channel_info_header
Added check for identifying the navigation button pressed in custom status modal

* Added server version check in isCustomStatusEnabled selector

* Refactored some code and added types in style in custom status modal
Added type in custom status suggestion functions in custom status modal
Refactored some code

* Fixed failing tests and updated snapshots

* Expiry Time functionality added

* Updated snapshot for clear button component

* ran npm run fix

* Added timezone functionality to custom status expiry

* Merged custom status into test-1230

* Review fixes

Removed logic for tracking requests for setting and unsetting custom status
Added logic for clearing status without delay in settings sidebar
Added event for set custom status failure and attached listener in settings sidebar
Added feature in custom status text component to accept string or FormattedText as prop and ellipsizeMode and numberOfLines as well
Removed labelSibling and failureText props from drawer item
Passed clearButton and retryMessage in labelComponent from settings sidebar to drawer item
Replaced Text with CustomStatusText in channel info header
Added localization in the custom status suggestions
Added exception handling in the getRecentCustomStatuses selector

* Fixed drawer item unit tests and updated snapshots

* Fixed UI issues for IOS in settings sidebar and main sidebar

* Updated snapshots

* Refactored duration code in custom status suggestion

* Review fixes
Removed check for user null or undefined from setCustomStatus action
Refactored some code in custom status emoji and post header
Memoized handleClear in custom status suggestion
Made stylesheet in settings_sidebar and added all styles there
Consolidated openCustomStatusModal function inside goToCustomStatusScreen

* Refactored some code
Refactored some code in set custom status action
Updated name of a unit test in drawer item and updated snapshot

* added ui fixes to date time picker component and displayExpiryTime
component

* Removed server version check for testing

* bug fix with timezone and statusSame

* Review UI fixes (#18)

Changed the padding for custom status both in settings sidebar and custom status suggestions
Changed the position of clear button in the settings sidebar

* UI fix in user profile screen
Fixed the call to apiGetChannelByName in custom status e2e test

* Added server version check for custom status feature

* Updated snapshots

* modified testIDs, output rendering logic

* Review fixes
Converted mapStateToProps to makeMapStateToProps and moved makeGetCustomStatus call inside them in several components

* Removed the server version check and fixed showing custom status in user profile bug

* Updated datetime picker version and fixed timezone issue
Fixed the memoization issue in getCurrentUserTimezone selector
Refactored the getCurrentDateTimeForTimezone to getCurrentMomentForTimezone
Added the timezoneOffsetInMinutes prop to the datetime picker

* Fixed ios UI issues
Fixed the positioning of Clear after in custom status modal in ios
Fixed the positioning of spinner date time picker in ios

* expiry time now showing in custom status,clear after modals

* Fixed the custom status not showing in user profile of other users if own status is not set

* Changed the emoji size in the channel title

* Updated snapshots

* Added custom status emoji in post header
Fixed the lint errors and type check errors

* Updated snapshots
Fixed the prop type isMilitaryTime for user_profile screen

* UI fixes and code refactoring (#19)

* added date time picker, fixed spacing in some components

* UI fixes, added isCustomStatusExpired selector

* removed extra spaces from package-lock.json

* Review Fixes, upgraded datetimepicker version

* Refactored some code

* Refactored some code

* Added server version check for the custom status feature

* Merge master into custom-status-expiry

* Review fixes and corrected import order

* Resolved tsc errors, corrected intl usage

* Code refactoring and minor bug fixes
Fixed the default value of isCustomStatusExpired in mapStateToProps from false to true in all components
Changed the ids of various expiry dropdown texts
Fixed the order of ids in en.json

* Changed date time format in front of Custom option in Clear after modal (#20)

* Corrected 'check' usage in front of 'Custom' in clear-after-modal

* Renamed clear_after_suggestions to clear_after_menu_item. removed unused
code

* Added unit tests and e2e tests

* Review fixes
Removed custom status clear after modal as a connected component

* Updated failing snapshot

* Review UI fixes
Changed the size of expiry time in channel header and fixed the width of custom status text along with the position of the emoji
Fixed the divider between custom status input and Clear after in the custom status modal
Changed the size of expiry time in custom status suggestions
Fixed the position of the tick in the clear after modal

* Updated snapshots

* Review fixes: Code refactoring

* Updated snapshots

* Code refactoring and fixed several issues
Updated and added unit tests for custom_status_expiry component
Refactored some code in custom_status_modal and clear_after_modal
Increased the size of the back icon in the Clear after modal
Added the logic for showing Clear after option only when the status is set
Added 30 minute intervals in the timepicker

* Custom status expiry review fixes (#24)

* Added server version check for custom status expiry and review fixes
Made an isCustomStatusExpirySupported selector for checking server version
Modified custom status modal not to show clear after row if expiry not supported
Fixed the bug of status not setting if expiry not supported
Added the logic for hiding the duratiion from suggestions if expiry not supported
Changed the transitioning of opening Clear After modal to open in the same stack level
Added the expiry supported check in settings sidebar and channel info screen and fixed the UI issues
Code refactoring

* Fixed the Back icon in the Clear after modal

* Fixed the Clear after flow and e2e tests
Fixed the Set status modal closing issue on closing Clear after modal
Added the feature to show Today in the custom status expiry component
Refactored and fixed the e2e tests for custom status expiry
Refactored some code in the Clear After modal

* Fixed unit tests and updated snapshots

* Fixed the bug showing invalid date in the Clear after field in the Set status modal

* Updated package-lock.json

* Code refactoring

* UI fixes in the user profile page
Added isExpirySupported check in the user profile page

* Fixed unit test and updated snapshot

* Updated snapshot for user_profile

* Review fixes: Code refactoring

* Fixed failing snapshots

* Fixed the MM-T4092 e2e test for ios (#25)

* Review fixes: Code refactoring
Deleted app/screens/custom_status_clear_after/index.ts file and changed import paths

* Code refactoring in e2e tests and updated eslint no shadow rule

* Disallowed the selection of past time in custom status date time picker

Co-authored-by: Chetanya Kandhari <chetanya.kandhari@brightscout.com>
Co-authored-by: Manoj <77336594+manojosh@users.noreply.github.com>
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Chetanya Kandhari <availchet@gmail.com>
Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
2021-07-23 04:02:19 +08:00
Anurag Shivarathri
fedf636b2f
Feat crt (#5455)
* [MM-31133]: participants screen component (#5116)

* Fixed imports

* Misc fixes

* Added i18n string

* Moved '(you)' after the name

* [MM-30386][MM-30387] Client and redux changes for collapsed reply threads (#5175)

* [MM-30386][MM-30387] Client and redux changes for collapsed reply threads

* fix tests

* add and use flat shim

* use test helper function

* use test helper function

* revert crt changes to unused client and action functions

* use toEqual

* incorporate code review feedback

* don't assume server success

* batch actions

* clearer code

* WIP in changes, websockets and more redux changes

* Added mark thread as read and mark all as read in a team

* Added isCollapsedThreadEnabled entity

* Fixed loading global screens on load if it's the last visited screen

* Added root count and websocker and redux events related to threads

* Fixed Message, Mention count root count on init and decrement actions

* Moved old client to new client/rest

* Misc fix

* Misc fix

* Misc.

* Old redux test cases fix

* Added polyfill back for array flat

* Fixes mark as unread and pariticipants error in thread

* Fixed initial load when CRT not enabled

* Handling CRT preference change

* Get threads fallsback to search in posts in case of unfollowed or unloaded threads

* Gets threads on reconnect

* DM, Channel counter fix

* Added threads redux tests

* Fixed channel dot issue when child post is arrived channel not active

* Cleaning up threads on load, not letting posts included in threads getting deleted which can trigger many posts to be loaded at once

* Fixed crash on team switch, partly fixed enable/disable from webapp

* Fix when viewing a post from notification, to prevent from navigating back to global threads

* Fixed when preferences are changed before app is launched

* Fixed issue of NO THREADS appearing on reconnect

* Excludes CRT handling for newly logged in users

* Fixed unread dot showing even when all messages are read

* Update app/mm-redux/selectors/entities/threads.ts

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

* Not viewing threads action is pushed only when suer is in Global Threads

* Fixed cleanup to exclude current team when cleanup starts on app going to background

* Dispatch is not passed as param, misc code fixes

* Preferences check and handling code refactored

* added redux-mock-store

* Preference change fix

* Removed user login dispatch when handling crt change

* Fixed fallback thread support

* Return getThread

* Added threads to sidebar, moved teamId logic to action

* [MM-29106, MM-34847, MM-34843, MM-34846] Collapsed reply threads, Global Threads & In Channel experience UI implementation (#5376)

* feat: global threads screen

* Refactored global thread menu and misc design fixes

* Added empty states for threads, unread. Removing markdown from thread messages.

* Added friendly date, fixed long usernames & channel names in threads view.

* Mark thread as read

* Added intl, refactored code, seperated thread footer from thread item

* Added intl to global threads, added global threads to android

* Added Follow button to thread view

* Added thread badges

* In Channel experience .. WIP

* Clean posts in channel incase CRT is enabled.

* Added follow button, deleted messages doesnot have footer and design is now according to figma

* Removed old post and post header

* Added for follow/unfollow thread and fixed old one

* MISC design & code fixes

* Added options-follow/unfollow to the post's long press menu

* Shows ORIGINAL MESSAGE DELETED in thread when root post gets deleted

* Post list ts fix

* Old testcases fix

* Eslint fix

* Added custom status emoji in at mention autocomplete

* Fixed the width of the displayname and username

* Changed the max width for the full name and username in the autocomplete item

* Review fixes
Changed the behaviour of ellipses for long names

* Removed safearea bottom

* Fixes Mark and unread and thread header theme

* Fixes mark as unread and pariticipants error in thread

* Unfollowing post fix and misc

* Merge with master fix

* Added fallback to get thread from posts in case of not following/unloaded threads

* Refactored code and added tests for screens

* Loads threads from  global threads screen, marks thread as marked on new thread posts

* Fixed tabs render on no threads, threads footer items styling and tests

* Loads threads based on tab and items according to constant

* Added infinite loading, unreads based on redux and not active thread list

* Fixed the username cutting off after truncating display name issue

* Changed avatars to touchableOpacity and added prop for parent component to style

* Fixed infinite loading, tab switching scroll to top, misc styles, team switching, scroll indicator insets

* Added follow button to DMs, moved follow button further right only on ios

* Snapshot updated

* Moved from useSelector to connect HOC

* Scrolls to top on team change, changed thread constant from mm-redux

* Fix merge issue

* Test case fix

* Fixed participants list

* Update app/components/global_threads/global_threads.tsx

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

* Update app/components/global_threads/thread_footer/thread_footer.tsx

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

* Update app/components/sidebars/main/channels_list/channel_item/index.js

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

* Update app/screens/thread/index.js

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

* Moved date numbers to constants

* Fixed global threads component issues

* Thread item display logic moved to redux

* Misc fixes

* Reverted to TouchableWithFeedback with opacity

* Removed obselete snapshots

* Removing currentTeamId as we aregetting it in action

* Moved to connect component from useSelect for sidebar

* Thread read issue fix

* Removed react-native-navigation mock

Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Manoj <manoj@brightscout.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Manoj <manoj@brightscout.com>

Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Manoj <manoj@brightscout.com>
2021-07-21 22:58:04 +05:30
Guillermo Vayá
2754b00f83
use user skin preferences for emoji (#5502) 2021-07-06 19:56:53 +02:00
Guillermo Vayá
1f843ddb4f
[MM-35909] Support for emoji 13 (#5497)
* support for emoji 13

* fix some tests

* more test fixed

* fix typo

* rename system to standard

* remove unused functions

* fix +1 emojis
2021-06-30 00:41:11 +02:00
Elias Nahum
15a311fcec
MM-17135 ignore at sign when searching for users (#5491) 2021-06-29 14:33:04 -04:00
Chetanya Kandhari
e442275c6f
MM-34586 Custom status feature (#5220) 2021-06-04 08:54:31 -04:00
Elias Nahum
9f238d5ef4
Post List & post components refactored (#5409)
* Update transform to make Android's post list scroll smooth

* set start since metric when appStarted is false

* Refactor Formatted components

* Downgrade RNN to 7.13.0 & patch XCDYouTube to allow video playback

* Refactor Post list and all related components

* review suggestion rename hour12 to isMilitaryTime

* feedback review use aliases

* feedback review deconstruct actions in markdown_link

* feedback review simplify if/else statement in combined_used_activity

* Simplify if statement for consecutive posts

* Specify npm version to build iOS on CI

* Refactor network_indicator

* render Icon in file gallery with transparent background

* Increase timeout to scroll to bottom when posting a new message

* fix: scroll when tapping on the new messages bar

* fix: dismiss all modals

* fix navigation tests

* Handle dismissAllModals for iOS to prevent blank screens

* Prevent modal from dismissing when showing the thread screen in the stack

* Update app/components/image_viewport.tsx

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/utils/post.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* fix: rename selector and prop

* Fix XCDYouTube patch

* Fix posting from a thread in the right channel

* do not render reply bar on the thread screen

* close previous permalink before showing a new one

* move XCDYouTube patch to ios/patches folder

* closePermalink directly instead of using an onClose prop

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2021-06-03 11:12:15 -07:00
Anurag Shivarathri
6e23fbe7a7
MM-32921 shared channels (#5241)
* Unable to open previews from search, pinned and mentions

* Updated Compass Icons

* Added Icon to LHS and Channel Info

* Added Icons to Manage/View Members list

* Added Icon to shared users in posts

* Added icon to channel header, fixed header style

* Added Icons in autocomplete

* WIP: Add shared shannels to browse

* Adding Shared Channels string to i18n

* Added remote organization to remote user profile

* Updated snapshot for channel header

* Added browsing shared channels

* Removed the exmpty line

* Added snapshot when user is remote

* Reverted compass icons and added icons only needed for shared channels

* Fixed i18n swapped

* Copied compass-icons from webapp

* Fixed showing shared channels as deleted after browsing them

* Added new compass ttf to android & fixed icon style for browse channel listing

* Fixed search for shared channels

* user profile snapshot updated with testId

* User list row snapshot updated with testID

* Moved shared user check to util function

* Fixed required props warning for ChannelIcon component

* Update app/screens/user_profile/index.js

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Removed Request related redux

* Reverted client4

* Added rest calls

* Updated snapshot

* Reverted files

* Adding back shared channels stuff to channel icon & showing shared channels only when enabled in browse channels

* Fixed misc issues

* moved empty array outside the function to avoid re-render

* Removed renaming fields

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-05-24 16:07:47 +05:30
Elias Nahum
6ea6366e1c
MM-35384 Add country variant localization support (#5397) 2021-05-20 11:58:53 -04:00
Elias Nahum
288c847518
Add Perf metrics, some cleanup & dep updates (#5378) 2021-05-12 08:48:20 -04:00
Elias Nahum
9131b25310
MM-27849 render emojis with appended skin tone (#5297) 2021-04-15 11:26:03 -04:00
Elias Nahum
5381062bfa
MM-31990 fix limit reacting to a post to 40 different emojis (#5121)
* MM-31990 fix limit reacting to a post to 40 different emojis

* Fix selector
2021-01-21 12:14:49 -07:00
Ashish Bhate
aaba9fa472
[MM-30976] fix viewing/joining archived channels using channel links (#5106) 2021-01-11 15:51:14 -07:00
Joseph Baylon
67398d83cb
Add eslint eol-last to require newline at end of files (#4985) 2020-11-30 21:46:05 -07:00
Ed Trist
cff81f168e
[MM-22366] Make user autocomplete also match on spaces (#4880)
* [MM-22366] Make user autocomplete also match on spaces

* Move template string to fullName variable

* Add Detox E2E tests for user autocomplete

* Add TM4J IDs

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>

* Add test for keyword not associated with user

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-19 10:15:18 -03:00
Miguel Alatzar
57d60649f8
[MM-22959] Use Compass icons (#4847)
* Use Compass icons

* Update ChannelInfo and AdvancedSettings

* Fix search modifiers

* Fix Autocomplete item

* Remove VectorIcon component

* Unlink react-native-vector-icons

* Revert ProgressiveImage changes

* Update Mark as Unread icon

* Apply review suggestion

* Replace extension icons

* Update video control button style

* Replace (un)flag with (un)save

* Replace (un)flag with (un)save - take 2

* Use bookmark-outline icon

Co-authored-by: Miguel Alatzar <miguel@Miguels-MacBook-Pro.local>
2020-10-15 15:34:24 -07:00
Ashish Bhate
0210cc4761
[MM-15477][MM-27540][MM-27541]: fix search inconsistencies using in:@ / in: (#4704)
* [MM-15477] reorder search suggest results

* allow searching dms and gms with 'in:@'

* fix sort order for private before public

* faster than regex

* remove server minimum version prop and checks
2020-09-01 10:08:17 -07:00
Elias Nahum
48f1875cf1
MM-23090 MM-26078 && MM-26876 Refactor post draft component (#4621)
* Refactor post draft component
Re-styled ReadOnly channels
Remove filename from upload error

* Update canSubmit based on file attachment changes

* Fix error message for max file size

* Fix select autocomplete values on iOS

* Style readonly and refactor accessory view for iOS

* Make PostDraft scrollViewNativeID prop not required

* Update ReadOnly to have a background with 0.40 opacity

* Update max file size error message

* Fix shift+enter with HW keyboard
2020-08-06 19:39:25 -04:00
Elias Nahum
1568e08055
MM-25470 Fix emoji autocomplete results (#4344)
* Fix emoji autocomplete results

* Rename selectors with "select" prefix
2020-05-26 16:03:11 -04:00
Elias Nahum
d3a6e166ad
MM-15758 Update dependencies including Fastlane (#4272)
* Update dependencies including Fastlane and disable Flipper on iOS

* Remove EventEmitter for previous doc-viewer

* Fix android crash when setting more channels buttons

* Downgrade fuse.js

* Upgrade deps to latest

* Update Podfile.lock

* Downgrade RNN to 6.4.0

* QA Review #2

* Upgrade fuse.js to 6.0.0
2020-05-18 11:24:47 -07:00
Elias Nahum
36e55c95a2
MM-23570 Migrate from Segment to Rudder (#4293)
* Replace Segment with Rudder (ios not working)

* Update @assets reference and fix tests
2020-05-13 16:54:07 -04:00
Elias Nahum
fda4948c8c
MM-23848 consolidate store, upgrade mmkv and fix logout (#4145)
* MM-23848 consolidate store, upgrade mmkv and fix logout

* Feedback review

* Add store.ts to modulesPath
2020-04-16 09:02:47 -04:00
shred86
717350adc6
[MM-23755] Add nickname as searchable property (#4099)
* Add nickname search functionality

* Add username property to test

* Fix parentheses out of place

* Add nickname property to additional tests

* Added ability to truncate long names

* Minor clean up

* More minor clean up
2020-04-06 17:48:06 -04:00
Miguel Alatzar
ee4b85edcf
[MM-23520] Port mattermost-redux (#4088)
* Remove mattermost-redux

* Move mm-redux files into app/redux

* Add @redux path to tsconfig.json

* Fix imports

* Install missing dependencies

* Fix tsc errors

* Fix i18n_utils test

* Fix more imports

* Remove redux websocket

* Fix tests

* Rename @redux

* Apply changes from mattermost-redux PR 1103

* Remove mattermost-redux mention in template

* Add missing imports

* Rename app/redux/ to app/mm-redux/

* Remove test file

* Fix fetching Sidebar GM profiles

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-31 11:09:26 -07:00
Amit Uttam
36c7cf4014 MM-21723 Handle deep link errors to inaccessible teams, channels & permalinks (#3815)
* Consolidated error handling for a user's reachable teams.
* Consolidated error handling for a user's reachable channels.
2020-01-21 14:43:24 -03:00
Elias Nahum
7c09334dc4
Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Chris Dobson
ce53a7ac29 MM-18571: Include self user in autocomplete (#3761)
* Include current user in search

* Removed unused parameters

* Include new text in i18n

* Update autocomplete tests to include current user

* Use FormattedText

* Update app/selectors/autocomplete.test.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-01-09 19:47:40 +08:00
Elias Nahum
12c028ae73
Fix Hamburger and iOS App Icon badge number when marking channel as unread (#3705)
* Fix Hamburger and App Icon badge number when marking channel as unread

* Temp mm-redux commit hash

* Update mm-redux commit hash
2019-12-16 07:30:04 -03:00
Elias Nahum
b2e657b159 MM-19991 Filtering search by channel should also show the channel name and not only its ID (#3561) 2019-11-18 23:56:01 +08:00
Elias Nahum
f16d8baf46 MM-19731 Fix at-channel autocomplete to return out of channel mentions (#3477)
* MM-19731 Fix at-channel autocomplete to return out of channel mentions

* profiles not in channel test deleted use case

* fix typo
2019-10-29 22:22:28 -04:00
Elias Nahum
ecb9bde1fd MM-18740 Sync app badge number when opening a push notification (#3322) 2019-09-25 10:31:44 -07:00
Elias Nahum
0ef2156b3f MM-17953 Do not show deactivated users in autocomplete (#3251)
* MM-17953 Do not show deactivated users in autocomplete

* feedback review
2019-09-16 16:02:52 -04:00
Elias Nahum
06e333dc52
MM-10193 Apply SafeAreaView to Landscape views (#3003) (#3081)
* MM-10193 for landscape Feature

Commit for MM-10193 to the landscape feature with latest pull.
This is the initial commit with SafeAreaView in place, but should not be merged into master as this is step one and not suitable for production.
Another commit will be following with adjustments to allow SafeAreaView to display correctly for users.

* MM-10193 for landscape Feature

Commit for MM-10193 to the landscape feature with latest pull.
This is the initial commit with SafeAreaView in place, but should not be merged into master as this is step one and not suitable for production.
Another commit will be following with adjustments to allow SafeAreaView to display correctly for users.

* MM-10193 Extend design elements for iPhoneX SafeAreaViews

This is the second portion of the MM-10193 changes for the landscape feature. This item was to extend the design elements for the application into the SafeAreaView so the application looks uniform on the iPhoneX.

* MM-10193 Patch for Snapshot tests and eslint

* MM-10193 Re-Patch

These chanbes mistakenly got reverted from last Patch

* MM-10193 Updates for PR

Fixed the 4 screens from the text box that were missed.
Updated the padding to run from a method.

* Revert "MM-10193 Updates for PR"

This reverts commit fe8d650ce3ca2828d8c94e4af470649aa2582ec1.

* MM-10193 Updates for PR

This reverts commit 4966d83d5401720d26ca22a55cf8f92f1657b7e2.
Applied Updated Snapshots

* MM-10193 Updated Modifier for iphone_x_spacing

Updated Modifier for iphone_x_spacing

* MM-10193 Updates for Review

Review changes for Post Textbox and a few states that were unavailable.

* MM-10193 Fix Longpress padding

Fixed longpress padding for Channel Info and Edit Post views.

* MM-10193 Update isLandscape

Updated isLandscape to pull directly from dimensions.
Updated padding for Recent Mentions and Flagged Posts.

* MM-10193 Updates for review longpost

Updated for longpost padding.
Fixed issue with notifications not padding right correctly.

* MM-10193 Update with Cleanup

Reverted Cocoapods back to 1.5.3.
Cleaned up spacing in two files.

* MM-10193 Merge Conflict Updates

Updates to resolve merge conflicts
2019-08-09 11:14:38 -04:00
Harrison Healey
9c53852128
Reorganize post state and make postsInChannel into a sparse array (#2693)
* MM-13957 Reorganize post actions (#2553)

* MM-13957 Reorganize post actions

* Update mattermost-redux

* Update mattermost-redux

* Update package-lock.json to resolve build issues

* MM-13958/MM-13959 Make postsInChannel into a sparse array (#2600)

* MM-13960 Re-add combined system messages (#2637)

* MM-13960 Re-add combined system messages

* Pass entire post to PostOptions

* Update mattermost-redux

* Update mattermost-redux

* Address feedback

* Update mattermost-redux
2019-04-15 17:20:23 -04:00
Jesse Hallam
692953e860
MM-14461: make @-mentions (and searches) case insensitive (#2641) 2019-03-13 09:37:56 -04:00
Elias Nahum
2184696e65
post menu and file attachments (#2414)
* post menu and file attachments

* Fix post list selector test

* Use new Gesture handler to avoid gesture conflicts in post menu and reaction list

* Allow reaction list to scroll the header on Android

* Feedback review

* Add some comments

* Fix eslint
2018-12-05 14:59:41 -03:00
Chris Duarte
7c711caf2d Theme selection screen (#2320)
* Theme selection screen (initial commit)

PR Review changes

Add custom theme option for users who are already using a custom theme

Fix for limited allowed themes

Selected item case fix

Memoized available themes request, other optimizations

updated snapshots

* Custom theme option changes - title. spacing, save option on state for life-cycle of screen
2018-11-23 14:49:28 -03:00
Jesús Espino
8097764d87 MM-12959: Fix autocomplete archived channels visibility (#2367)
* MM-12959: Fix autocomplete archived channels visibility

* Remove unneeded getDeletedPublicChannels
2018-11-23 12:25:46 -05:00
Saturnino Abril
bc54c6e0dd
[MM-12550] Fix hangup on permalink view when user deleted the post in it (#2228)
* fix hangup on permalink view when user deleted the post in it

* return null when no need to change state on getDerivedStateFromProps
2018-10-08 23:13:41 +08:00
Jesús Espino
9bd89930b7
MM-11567: Autocomplete search in: for DMs and GMs (#2133)
* MM-11567: Autocomplete search in: for DMs and GMs

* More robust behavior on older versions and a fix on autocompletion

* Moving get display_name for search to a selector
2018-09-27 18:38:07 +02:00
Elias Nahum
2567b7dc04
Add draft indicator to the channel item (#2150)
* Add draft indicator to the channel item

* Feedback review
2018-09-26 12:17:54 -03:00
Joram Wilander
1d37f9bbec Close channel autocomplete if multiple tildes are typed (#2138) 2018-09-20 12:36:37 -04:00
Jesús Espino
db898694a5 MM-11725: Filter archived channels by membership on search autocomplete (#2066)
* MM-11725: Filter archived channels by membership on search autocomplete

* Fixing PR suggestions
2018-09-07 06:51:36 -03:00
Dmitry Samuylov
1ecb209712 Feature/search after before on (#2028)
* initial partial implementation of search date flags UI (on: before: after:)

* Make the calendar show correctly

* dismiss keyboard when showing the date suggestion since this type of input will primarily be entered through the calendar and later edited if needed

* fixed code style errors

* updates as per pull request comments

* fixed eslint errors

* changes as per pull request comments, removing unnecessary code

* added handling for hiding the date filter feature if the server version doesn't support it

* fixed eslint errors

* removed unnecessary property defaults and server version checks, as per PR suggestions

* this default is needed for the initial load of the component

* changed the way we capture the flag from the search string, this handles scenarios where multiple flags might be present in the search string that are handled by the same suggestion component as is the case here with date based flags

* need property declared to pass jslint rules

* eslint style fix, moved regex out into constants

* removed unused code and references

* updated as per pull request feedback

* updated to latest redux version

* changed to new search posts api that supports passing in of time zone utc offset to support date based search flags

* updated to the upcoming release version in preparation for merging to master

* Properly memoize DateSuggestion mapStateToProps

* Remove moment-timezone
2018-08-28 18:01:11 -04:00
Saturnino Abril
669f0ea1cd use profile image from local after editing a profile image (#1990) 2018-08-16 06:57:23 -07:00
Jesse Hallam
36dd3f19e2 MM-11198: avoid duplicate date line keys (#1901)
* MM-11198: avoid duplicate keys in date lines

Ensure each dateline rendered as part of search, recent mentions, or flagged post list has a unique key, even if the same date itself appears multiple times.

* update post_list.test.js to actually test date boundaries, relying on TZ=utc export in package.json

* unit test makePreparePostIdsForSearchPosts

* fix eslint issues

* try TZ=GMT

* encode date lines using timestamps instead

This requires a few extra changes to the post list proper, but largely
simplifies things anyway.
2018-07-09 18:35:43 -04:00
Harrison Healey
d9eb29a724 MM-10826 Show error when viewing permalink for locally deleted post (#1870)
* MM-10826 Show error when viewing permalink for locally deleted post

* Don't hide current user's deleted posts
2018-07-04 08:44:33 -04:00
Jesse Hallam
8372e95d4a add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
Saturnino Abril
e73ed03802 MM-10340 Fix "More New Messages Above" that appears on top of the channel after joining (#1710)
* Replace "More New Messages Above" with "New Messages" that appears on top of the channel after joining

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>

* add conditions in adding entry of start of new messages in preparing post IDs for post list

* remove post unread for user joinining the channel

* refactor and remove unnecessary conditional check

* fix and add test cases
2018-06-08 14:16:48 -04:00