mattermost-mobile/app/components
Miguel Alatzar f79f9dc697
[MM-23761] [MM-25766] Add "More Messages" button (#4526)
* Add more messages button

* Update existing tests

* Various fixes:

* Use viewAreaCoveragePercentThreshold over itemVisiblePercentThreshold
* Remove currentUserId check when adding New Message line to postIds and
  instead update the channel last viewed time when an own post is received

* Update snapshots

* Add showMoreMessagesButton prop and default to false

* Android fixes

* Add tests

* Localize more messages text

* Use FormattedText

* i18 extract

* Style fixes

* Account for network indicator

* Fix for failing tests

* Various fixes:

* Set the unreadMessageCount when POST_UNREAD_SUCCESS is dispatched
  with a positive deltaMsgs
* Hide the more messages button when the unread count decreases or
  when the new message line is removed shortly after loading the
  channel

* No need for POST_UNREAD_SUCCESS if we manually call onViewableItemsChanged

* Reset unread count if current channel on channel mount

* Animate text opacity

* Compare indeces to determine when scrolling has ended

* Fix opacity animation trigger

* try with scrolling to the last rendered item

* Add onScrollEndIndex

* Improve animations

* Don't track moreCount in state

* Use moreText over prevNewMessageLineIndex to determine firstPage

* Update intl message format and call cancel in componentDidUpdate when needed

* Fix intl format

* Remove opacity animation and countText

* Fix pressed not being reset

* No need to separate intl func

* Return after resetting

* Fix accidental removal of setState call

* Reset pressed when newLineMessageIndex changes

* Use default windowSize and lower POST_CHUNK_SIZE and delays

* Queue a cancel timer that gets cleared only when the newMessageLineIndex changes

* Define uncancel func

* Increase cancelTimer delay

* Subtract read posts from unread count and account for retry indicator

* Add retry bar indicator tests

* Use props.unreadCount

* Fix handling of newMessageLineIndex change

* Fix handling of newMessageLineIndex change take 2

* Fix handling of newMessageLineIndex change take 3

* Use 'native' TouchableWithFeedback with dark overlay

* Fix handling of manually unread

* Update chunk and window sizes

* Fix hsl

* Update text only when newMessageLineIndex/endIndex is reached

* Don't delay cancel if when no more unreads

* Fixes for when opening the app

* No need to process viewableItems when unreadCount is 0

* Remove line

* Don't show if unreadCount is 0

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-09 13:30:30 -07:00
..
__mocks__ [MM-9454] Added fade to send button (#2677) 2019-04-29 07:54:00 -07:00
__snapshots__ MM-22401 Refactor Post Draft (#4122) 2020-05-06 06:30:51 -04:00
announcement_banner Upgrade to RN 0.62.2 (#4093) 2020-04-14 16:39:51 -04:00
at_mention MM-25956 Use new mobile modal style on Other User Profile (#4507) 2020-07-09 08:34:42 +09:00
attachment_button [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
autocomplete [MM-23158] Group Mentions & Invites - Display group mentions in suggestions list in the main channel textbox (#4118) 2020-07-08 07:31:58 -04:00
autocomplete_selector [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
channel_intro MM-25956 Use new mobile modal style on Other User Profile (#4507) 2020-07-09 08:34:42 +09:00
channel_link MM-15758 Update dependencies including Fastlane (#4272) 2020-05-18 11:24:47 -07:00
channel_loader MM-15758 Update dependencies including Fastlane (#4272) 2020-05-18 11:24:47 -07:00
client_upgrade_listener [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
combined_system_message [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
combined_user_activity_post [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
custom_list MM-15758 Update dependencies including Fastlane (#4272) 2020-05-18 11:24:47 -07:00
edit_channel_info [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
emoji [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
emoji_picker MM-25470 Fix emoji autocomplete results (#4344) 2020-05-26 16:03:11 -04:00
error_list MM-23570 Migrate from Segment to Rudder (#4293) 2020-05-13 16:54:07 -04:00
error_text [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
failed_network_action Fix infinite skeleton in different use cases and do not scroll to messages already seen (#4304) 2020-05-19 18:54:34 -04:00
file_attachment_list MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
interactive_dialog_controller [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
layout/keyboard_layout MM-9494 & MM-13888 Tapping execute actions & interactive keyboard dismissal (#2799) 2019-05-20 12:02:00 -04:00
load_more_posts MM-19993 Fix Channel spinner is black on dark theme (#3558) 2019-11-18 22:04:52 +08:00
markdown MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
message_attachments MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
network_indicator [MM-23761] [MM-25766] Add "More Messages" button (#4526) 2020-07-09 13:30:30 -07:00
pasteable_text_input Upgrade to RN 0.62.2 (#4093) 2020-04-14 16:39:51 -04:00
post MM-25956 Use new mobile modal style on Other User Profile (#4507) 2020-07-09 08:34:42 +09:00
post_add_channel_member [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
post_attachment_image Upgrade Dependencies (#4034) 2020-03-18 19:05:49 -03:00
post_attachment_opengraph MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
post_body MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
post_body_additional_content MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
post_draft MM-25670 perform search when hitting Enter on HW keyboard (#4432) 2020-06-17 22:13:34 -04:00
post_header MM-22155 ESLint configuration updates part 1 (#4311) 2020-05-20 08:27:27 -07:00
post_list [MM-23761] [MM-25766] Add "More Messages" button (#4526) 2020-07-09 13:30:30 -07:00
post_profile_picture MM-23570 Migrate from Segment to Rudder (#4293) 2020-05-13 16:54:07 -04:00
profile_picture Do not preload images with FastImage (#4314) 2020-05-20 15:47:06 -04:00
progressive_image Do not preload images with FastImage (#4314) 2020-05-20 15:47:06 -04:00
radio_button [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
reaction_picker MM-24497 Ensuring quick reactions render within safe area (#4235) 2020-05-14 22:10:15 -04:00
reactions MM-15719 Use metadata only to render post additional content (#4386) 2020-06-29 11:28:07 -04:00
refresh_list add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
retry_bar_indicator [MM-23761] [MM-25766] Add "More Messages" button (#4526) 2020-07-09 13:30:30 -07:00
root MM-25350 Hide 'Select Team' title on modal when error occurs (#4412) 2020-06-17 20:55:18 -04:00
safe_area_view [MM-24068] Animate top bar height/padding (#4370) 2020-06-01 10:03:58 -07:00
search_bar Fix sidebar search bar (#4350) 2020-05-28 09:35:34 -07:00
show_more_button [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
sidebars MM-25956 Use new mobile modal style on Other User Profile (#4507) 2020-07-09 08:34:42 +09:00
slide_up_panel MM-25562 Fix dismiss reaction list crash (#4353) 2020-05-27 12:45:35 -04:00
start MM-18752 Rename constant to handle iPhone X and new iPhone 11 insets (#3296) 2019-09-23 13:08:32 -07:00
status_bar [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
team_icon Fix LHS team icon on team switch (#4534) 2020-07-07 11:38:01 -04:00
touchable_with_feedback MM-18236 Prevent the post menu from triggering when using the back gesture (#3319) 2019-09-26 00:19:49 +03:00
user_status [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
widgets/settings Upgrade to RN 0.62.2 (#4093) 2020-04-14 16:39:51 -04:00
app_icon.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
badge.js [MM-16593] Upgrade to RN 0.61.2 (#3455) 2019-10-28 15:04:24 -07:00
badge.test.js Deps update (#3806) 2020-01-20 13:20:03 -03:00
channel_icon.js [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
checkmark.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
conditional_touchable.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
deleted_post.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
fade.js Deps update (#3806) 2020-01-20 13:20:03 -03:00
fade.test.js Deps update (#3806) 2020-01-20 13:20:03 -03:00
formatted_date.js Migrate to moment to fix timestamps based on timezone or local time (#3126) 2019-08-15 12:32:16 -04:00
formatted_markdown_text.js Port WebSocket from mm-redux and batch actions (#4060) 2020-03-26 21:23:50 -03:00
formatted_text.js fix warnings in running jest test (#2087) 2018-09-07 23:05:35 +08:00
formatted_time.js MM-21961 Fix Incorrect Timestamp on Android Mobile App (#3861) 2020-01-27 12:57:22 -07:00
formatted_time.test.js MM-21961 Fix Incorrect Timestamp on Android Mobile App (#3861) 2020-01-27 12:57:22 -07:00
image_viewport.js MM-24285 Use FastImage instead of Image (#4218) 2020-04-28 23:23:39 +08:00
loading.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
no_results.js MM-13953 Channel Info screen transition (#3812) 2020-01-15 09:29:57 -07:00
post_list_retry.js MM-18236 Prevent the post menu from triggering when using the back gesture (#3319) 2019-09-26 00:19:49 +03:00
post_separator.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
profile_picture_button.js [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
profile_picture_button.test.js [MM-23520] Port mattermost-redux (#4088) 2020-03-31 11:09:26 -07:00
recent_date.js MM-18466 Change recent date separators to yesterday/today (#3245) 2019-09-14 07:02:51 -03:00
recent_date.test.js MM-18466 Change recent date separators to yesterday/today (#3245) 2019-09-14 07:02:51 -03:00
remove_markdown.js MM-10012 Added Markdown rendering to expanded announcement banner (#1861) 2018-07-04 13:15:03 -04:00
reply_icon.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
swiper.js Update total to reflect number of children (#3367) 2019-10-04 15:06:22 -07:00
swiper.test.js Update total to reflect number of children (#3367) 2019-10-04 15:06:22 -07:00
tag.js MM-18603 Fix post header to prevent overlaps (#3332) 2019-09-27 17:16:36 -04:00
text_input_with_localized_placeholder.js [MM-16593] Upgrade to RN 0.61.2 (#3455) 2019-10-28 15:04:24 -07:00
vector_icon.js MM-23570 Migrate from Segment to Rudder (#4293) 2020-05-13 16:54:07 -04:00
video_controls.js [MM-18766] remove deprecated lifecycle methods from post components (#4270) 2020-06-15 10:11:21 -07:00