Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Scroll to bottom on editing a message #16630

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

smohamedjavid
Copy link
Member

fixes #16496

Summary

This PR fixes (by skipping) the scroll to the bottom of messages when the user edits any message from the top of the chat.

Platforms

  • Android
  • iOS

Steps to test

Prerequisites: Have at least one contact and a chat history with that contact.

  • Open Status
  • Open a chat with a long list of messages
  • Try to edit a message from the top of the list
  • Send the edited message
  • Check whether the chat scrolls to the bottom.

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Jul 14, 2023

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c6e4cae #1 2023-07-14 10:15:39 ~6 min ios 📱ipa 📲
✔️ c6e4cae #1 2023-07-14 10:17:45 ~8 min tests 📄log
✔️ c6e4cae #1 2023-07-14 10:17:50 ~8 min android-e2e 🤖apk 📲
✔️ c6e4cae #1 2023-07-14 10:18:09 ~8 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 131663d #2 2023-07-19 10:10:21 ~5 min android 🤖apk 📲
✔️ 131663d #2 2023-07-19 10:13:11 ~8 min android-e2e 🤖apk 📲
✔️ 131663d #2 2023-07-19 10:13:11 ~8 min tests 📄log
✔️ 131663d #2 2023-07-19 10:18:55 ~14 min ios 📱ipa 📲
✔️ 01b14ed #3 2023-07-20 11:22:57 ~6 min android 🤖apk 📲
✔️ 01b14ed #3 2023-07-20 11:23:12 ~6 min ios 📱ipa 📲
✔️ 01b14ed #3 2023-07-20 11:24:43 ~8 min android-e2e 🤖apk 📲
✔️ 01b14ed #3 2023-07-20 11:25:11 ~8 min tests 📄log

@status-im-auto
Copy link
Member

91% of end-end tests have passed

Total executed tests: 34
Failed tests: 3
Passed tests: 31
Not executed tests: 2
IDs of not executed tests: 703391,703297 
IDs of failed tests: 702731,702732,703133 

Not executed tests (2)

Click to expand
  • Rerun not executed tests
  • Failed tests (3)

    Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find `Button` by `accessibility id`: `show-profiles`
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:433: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact(s) was (were) not restored from backup: MyCustomNickname!
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Passed tests (31)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    6. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    7. test_1_1_chat_edit_message, id: 702855
    Device sessions

    8. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_mentions, id: 702957
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_one_image_send_reply, id: 702859
    Device sessions

    2. test_community_message_edit, id: 702843
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    6. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_several_images_send_reply, id: 703194
    Device sessions

    9. test_community_leave, id: 702845
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    11. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    12. test_community_message_delete, id: 702839
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_offline_pn, id: 702808
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    @cammellos cammellos removed the chat label Jul 14, 2023
    @ibrkhalil ibrkhalil requested a review from alwx July 16, 2023 11:20
    @pavloburykh pavloburykh self-assigned this Jul 19, 2023
    @status-im-auto
    Copy link
    Member

    83% of end-end tests have passed

    Total executed tests: 36
    Failed tests: 6
    Passed tests: 30
    
    IDs of failed tests: 702731,702851,702783,702745,702732,703133 
    

    Failed tests (6)

    Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 2: Find `Button` by `accessibility id`: `tab-contacts`
    Device 2: Tap on found: Button

    medium/test_activity_center.py:111: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact was not added to contact list after accepting contact request (as receiver)
    E    Contact was not added to contact list after accepting contact request (as sender)
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Device 2: Find Text by xpath: //*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/chats/test_1_1_public_chats.py:1379: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message status was not changed to Delivered, it's Sent after back up online!
    



    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Find MemberPhoto by xpath: //*[starts-with(@text,'profile_photo')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='user-avatar']
    Device 2: Image differs from template to 6.488826976102942 percents

    critical/chats/test_1_1_public_chats.py:1129: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Image of user in 1-1 chat is too different from template!
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find Button by accessibility id: show-profiles
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:433: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact(s) was (were) not restored from backup: MyCustomNickname!
    



    Device sessions

    Passed tests (30)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    5. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    6. test_1_1_chat_edit_message, id: 702855
    Device sessions

    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_one_image_send_reply, id: 702859
    Device sessions

    2. test_community_message_edit, id: 702843
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    6. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_several_images_send_reply, id: 703194
    Device sessions

    9. test_community_leave, id: 702845
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    11. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    12. test_community_message_delete, id: 702839
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_mentions, id: 702957
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    @status-im-auto
    Copy link
    Member

    0% of end-end tests have passed

    Total executed tests: 2
    Failed tests: 2
    Passed tests: 0
    Not executed tests: 34
    
    IDs of not executed tests: 702730,702782,702745,702813,702855,702733,702783,702784,703391,702807,702808,703202,703297,702838,702843,702839,702859,703194,702840,702841,702844,702894,702845,702786,703086,702846,702742,703133,702850,702851,702936,702947,702957,702958 
    
    IDs of failed tests: 702731,702732 
    

    Not executed tests (34)

    Click to expand
  • Rerun not executed tests
  • Failed tests (2)

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    @pavloburykh
    Copy link
    Contributor

    @smohamedjavid thanx for the PR! Tested and ready for merge.

    Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
    @smohamedjavid smohamedjavid merged commit b14757b into develop Jul 20, 2023
    2 checks passed
    @smohamedjavid smohamedjavid deleted the fix/scroll-on-edit-message branch July 20, 2023 11:27
    @tumanov-alex tumanov-alex mentioned this pull request Aug 3, 2023
    J-Son89 pushed a commit that referenced this pull request Aug 8, 2023
    Add locked input component, tests, styles
    Add translations
    Add duration icons
    
    Remove extra code
    
    Use theme from context
    
    Add missing code
    
    Update styles
    Update gas icon (previous was not reacting to size change)
    Use text from components instead of rn/text
    
    Fix styling for transaction sheet preview, locked input & account selector components
    Fix purple 50 color since it doesn't match design
    
    Work on PR suggestions
    Fix style to be pixel-perfect
    
    Comment-in tests
    
    Fix style
    
    Add docs for locked-input component
    
    Remove extra code
    
    Fixed design discrepancies
    
    Fix font-weight
    
    Fix purple color in account selector
    
    Remove unused icons
    
    Fix linter
    
    Fix tests
    
    fix for airplane mode
    
    [161108] Optimize message styling when there's multiple mentions on top of each other (#16505)
    
    Fix failing mute till test (#16453)
    
    fix navigation to community from discover communities screen (#16702)
    
    Update version to 0.162.3
    
    [#16703] The display name is not resolved in chats for user sender after relogin (#16704)
    
    Mute community
    
    * mute and unmute community
    
    status-im/status-go@dfdaa72...e6187ae
    
    * mute and unmute community and all community chats
    
    status-im/status-go@dfdaa72...3abc86e
    
    * updated statu-go
    
    status-im/status-go@dfdaa72...919123e
    
    * refactored mute chat drawer
    
    status-im/status-go@d3e650d...3af0b17
    
    * refactored mute chat drawer
    
    status-im/status-go@dfdaa72...3af0b17
    
    * fixing mute channels
    
    * fixed mute community channels
    
    * update community chats mute status
    
    status-im/status-go@dfdaa72...dc50ac2
    
    * added mute and unmute community toast
    
    status-im/status-go@dfdaa72...c06f7a6
    
    * unmute community when atleast one community channel is unmuted
    
    status-im/status-go@dfdaa72...e691c47
    
    * updated status-go
    
    status-im/status-go@b2e56f5...c52718c
    
    * updated status-go version v0.162.5
    
    [Fix] Scroll to bottom on editing message (#16630)
    
    This commit fixes (by skipping) the scroll to the bottom of messages when the user edits a message and sends it.
    
    Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
    
    Refactor `Bottom Sheet` to use Theme Context (#16710)
    
    This commit updates "Bottom Sheet" to use the theme (for theme provider) provided on the bottom sheet args when dispatching. This will ensure the theme is passed down to its child components where it can consume and render based on the theme.
    
    Changes done:
    
    In Bottom Sheet:
     - Fix Bottom Sheet to use the correct background colour (neutral-95) for dark mode (as per Figma)
     - Fix the Icon colour for danger in light mode
     - Updated Quo2 Preview to provide an option for the bottom sheet theme
    
    In Action Drawer:
     - Refactor the Action Drawer component to consume theme context
    
    Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
    
    Revert extra commits
    
    Revert extra commits
    
    Revert extra changes
    J-Son89 pushed a commit that referenced this pull request Aug 8, 2023
    Add locked input component, tests, styles
    Add translations
    Add duration icons
    
    Remove extra code
    
    Use theme from context
    
    Add missing code
    
    Update styles
    Update gas icon (previous was not reacting to size change)
    Use text from components instead of rn/text
    
    Fix styling for transaction sheet preview, locked input & account selector components
    Fix purple 50 color since it doesn't match design
    
    Work on PR suggestions
    Fix style to be pixel-perfect
    
    Comment-in tests
    
    Fix style
    
    Add docs for locked-input component
    
    Remove extra code
    
    Fixed design discrepancies
    
    Fix font-weight
    
    Fix purple color in account selector
    
    Remove unused icons
    
    Fix linter
    
    Fix tests
    
    fix for airplane mode
    
    [161108] Optimize message styling when there's multiple mentions on top of each other (#16505)
    
    Fix failing mute till test (#16453)
    
    fix navigation to community from discover communities screen (#16702)
    
    Update version to 0.162.3
    
    [#16703] The display name is not resolved in chats for user sender after relogin (#16704)
    
    Mute community
    
    * mute and unmute community
    
    status-im/status-go@dfdaa72...e6187ae
    
    * mute and unmute community and all community chats
    
    status-im/status-go@dfdaa72...3abc86e
    
    * updated statu-go
    
    status-im/status-go@dfdaa72...919123e
    
    * refactored mute chat drawer
    
    status-im/status-go@d3e650d...3af0b17
    
    * refactored mute chat drawer
    
    status-im/status-go@dfdaa72...3af0b17
    
    * fixing mute channels
    
    * fixed mute community channels
    
    * update community chats mute status
    
    status-im/status-go@dfdaa72...dc50ac2
    
    * added mute and unmute community toast
    
    status-im/status-go@dfdaa72...c06f7a6
    
    * unmute community when atleast one community channel is unmuted
    
    status-im/status-go@dfdaa72...e691c47
    
    * updated status-go
    
    status-im/status-go@b2e56f5...c52718c
    
    * updated status-go version v0.162.5
    
    [Fix] Scroll to bottom on editing message (#16630)
    
    This commit fixes (by skipping) the scroll to the bottom of messages when the user edits a message and sends it.
    
    Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
    
    Refactor `Bottom Sheet` to use Theme Context (#16710)
    
    This commit updates "Bottom Sheet" to use the theme (for theme provider) provided on the bottom sheet args when dispatching. This will ensure the theme is passed down to its child components where it can consume and render based on the theme.
    
    Changes done:
    
    In Bottom Sheet:
     - Fix Bottom Sheet to use the correct background colour (neutral-95) for dark mode (as per Figma)
     - Fix the Icon colour for danger in light mode
     - Updated Quo2 Preview to provide an option for the bottom sheet theme
    
    In Action Drawer:
     - Refactor the Action Drawer component to consume theme context
    
    Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
    
    Revert extra commits
    
    Revert extra commits
    
    Revert extra changes
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    User is scrolled to the bottom of the chat after sending edited message
    6 participants