* Further cleanup and fixes
Tests clean-up
Tests fixed?
Plays nicely with threads
Tests fixed
Fixes ESR and show experimental flags
Failing test fixed
DM Fix
WIP: Bottom bar UX
Fixes for unreads
Failing test
Always show current channel
Create a channel in a category!
* Unreads on top
* Various fixes
* Improves category collapsing
* Passes correct ID through
* Tests cleanup
* Redo unreads and unread-button
* Reverts to just using ids
* More unreads back to using ids
* Uses appropriate selectors for pref updates
* Unreads sorted by recency
* Fixes test for recency
* Fixes re-rendering bug
* Code review updates, websocket event debounced
* Updated the way to fetch dependeny from a GIT Repo
Using a standard way to define dependency via a git repository.
In few system if someone doesn't use SSH way to clone repos then "github:" protocol gives out an error.
* Updated package-lock.json
* 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
* 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>
* [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>
* Downgrade RNN to avoid bug that cuts off permalink view on iOS
* Bring back permalink view on search/recent mentions/pinned and saved posts
* fix test snapshot
* 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>
* Update dependencies
* Fix lint, use npm@6
* Fix unit tests
* Dowgrade Fastlane
* Fix Fastlane script
* use android:api-29-node ci image
* Infer gradle json file from apk output folder
* Fastlane to Parse new version of gradle output-metadata.json
* Open/Close Gallery transitions
* Include postId in file info & disable opening the gallery in some cases
* Add progress bar component
* Transition to gallery based on platform
* Improve getting the filename for non attachments
* Patch RNFetchBlob TS definition
* Add gallery types
* fix unit tests for message and post attachment
* add getLocalPath method
* Add react-native-share dependency
* Re-style gallery footer
* Refactor Gallery screen
* Double tap zoom in/out and translate
* Make android activity "transparent"
* Do not animate to height on dismissing gallery
* Open gallery for file uploads
* Fix borderRadius for gallery action button
* Use progress bar for file uploads
* Replace progress bar for file attachment document
* Upgrade RNN to 7.1.0 to fix share elements transitions
* Fix Gallery unit tests
* translate down when popping screen on iOS
* Swipe, Pan & Tap fixes
* fix gallery footer avatar eslint
* Fix gallery snapshot tests
* Use CompassIcon in Gallery
* Feedback from UX review
* Fix gallery UI for other file types
* Set other file type gallery button to 48pt
*Summary*
- This PR adds storybook into the mobile repo, and adds a sample story for the existing "loading" component.
- In the root of the repo run `npm run storybook`. This step automatically scans and loads all stories. A new browser tab will open with the storybook interface. You can configure the storybook host url by updating the .env file in the root of the repo. This might be required if you're using a real device. When running in an emulator, the code tries to use the default network values.
- Then run the usual `npm run android` (or `npm run ios`) and `npm run start` commands
- Storybook has been integrated into the react-native-dev-menu. When the app is running in the emulator press CTRL+M or CMD+M to open the dev menu and select "Storybook". If running on a real device, shaking the device will bring up the react-native dev menu. You can also press d in the terminal where you ran npm run start to get the app running.
- The storybook interface will open in the mobile app. The stories can be controlled either through the desktop browser storybook UI or the mobile browser storybook UI. Both will render the component on the device.
*Ticket Link*
https://mattermost.atlassian.net/browse/MM-28845
*Device Information*
This PR was tested on:
Iphone 11 emulator running ios 13.7
Pixel 3XL emulator running Android 10