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

[15569] Select recent tab on messages home when double tapping messages icon #15604

Merged
merged 19 commits into from
Apr 20, 2023

Conversation

ibrkhalil
Copy link
Contributor

@ibrkhalil ibrkhalil commented Apr 8, 2023

fixes #15569

Summary

This PR uses GestureHandler to select the recent tab on the messages home screen, This was achievable by moving the selected tab atom to app-db and not to be local state inside the UI component to make it accessible from anywhere.

Review notes

I didn't write tests for the event because it was really simply, Just associng a keyword.

Testing notes

Double tap on the bottom navigation's messages icon and see if recent tab is selected.

Platforms

  • Android
  • iOS

Steps to test

  • Open Status
  • Navigate to the messages tab using the bottom nav
  • Select any tab but recent, Like contacts or groups
  • Double tap on the messages tab on the bottom navigation, And see if recent tab is selected or not

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Apr 8, 2023

Jenkins Builds

Click to see older builds (52)
Commit #️⃣ Finished (UTC) Duration Platform Result
d4e76d0 #1 2023-04-08 13:15:39 ~3 min tests 📄log
✔️ d4e76d0 #1 2023-04-08 13:19:24 ~6 min ios 📱ipa 📲
✔️ d4e76d0 #1 2023-04-08 13:20:35 ~8 min android-e2e 🤖apk 📲
✔️ d4e76d0 #1 2023-04-08 13:25:25 ~13 min android 🤖apk 📲
✔️ e21579c #2 2023-04-08 14:00:14 ~6 min tests 📄log
✔️ e21579c #2 2023-04-08 14:01:09 ~7 min ios 📱ipa 📲
✔️ e21579c #2 2023-04-08 14:01:49 ~7 min android-e2e 🤖apk 📲
✔️ e21579c #2 2023-04-08 14:02:04 ~8 min android 🤖apk 📲
✔️ 6c6c05c #3 2023-04-08 14:23:30 ~7 min ios 📱ipa 📲
✔️ 6c6c05c #3 2023-04-08 14:24:14 ~7 min android-e2e 🤖apk 📲
✔️ 6c6c05c #3 2023-04-08 14:24:41 ~8 min android 🤖apk 📲
✔️ 6c6c05c #3 2023-04-08 14:25:09 ~8 min tests 📄log
d7282ff #5 2023-04-10 13:01:35 ~3 min tests 📄log
✔️ d7282ff #5 2023-04-10 13:05:48 ~7 min ios 📱ipa 📲
✔️ d7282ff #5 2023-04-10 13:06:09 ~7 min android-e2e 🤖apk 📲
✔️ d7282ff #5 2023-04-10 13:06:33 ~8 min android 🤖apk 📲
406b517 #6 2023-04-10 13:34:42 ~11 sec ios 📄log
406b517 #6 2023-04-10 13:34:43 ~12 sec android 📄log
406b517 #6 2023-04-10 13:34:43 ~12 sec android-e2e 📄log
406b517 #6 2023-04-10 13:34:44 ~12 sec tests 📄log
✔️ 7185952 #8 2023-04-10 13:48:36 ~6 min ios 📱ipa 📲
✔️ 7185952 #8 2023-04-10 13:49:44 ~7 min android-e2e 🤖apk 📲
✔️ 7185952 #8 2023-04-10 13:49:58 ~7 min android 🤖apk 📲
✔️ 7185952 #8 2023-04-10 13:50:15 ~8 min tests 📄log
✔️ 3da4fda #9 2023-04-11 08:19:28 ~7 min android-e2e 🤖apk 📲
✔️ 3da4fda #9 2023-04-11 08:20:33 ~8 min tests 📄log
✔️ 3da4fda #9 2023-04-11 08:25:04 ~13 min android 🤖apk 📲
✔️ 3da4fda #9 2023-04-11 08:25:10 ~13 min ios 📱ipa 📲
✔️ e64f18e #10 2023-04-16 16:50:40 ~5 min android-e2e 🤖apk 📲
✔️ e64f18e #10 2023-04-16 16:51:54 ~7 min ios 📱ipa 📲
✔️ e64f18e #10 2023-04-16 16:52:22 ~7 min tests 📄log
✔️ e64f18e #10 2023-04-16 16:52:27 ~7 min android 🤖apk 📲
✔️ 49f4f98 #11 2023-04-16 17:00:20 ~5 min android-e2e 🤖apk 📲
✔️ 49f4f98 #11 2023-04-16 17:00:24 ~5 min android 🤖apk 📲
✔️ 49f4f98 #11 2023-04-16 17:01:09 ~6 min tests 📄log
✔️ 49f4f98 #11 2023-04-16 17:02:31 ~7 min ios 📱ipa 📲
2d8d9d7 #13 2023-04-17 10:28:32 ~3 min tests 📄log
✔️ 2d8d9d7 #13 2023-04-17 10:31:03 ~5 min android-e2e 🤖apk 📲
✔️ 2d8d9d7 #13 2023-04-17 10:31:53 ~6 min android 🤖apk 📲
✔️ 2d8d9d7 #13 2023-04-17 10:36:19 ~10 min ios 📱ipa 📲
✔️ 428ca61 #14 2023-04-17 11:36:01 ~5 min android 🤖apk 📲
✔️ 428ca61 #14 2023-04-17 11:37:41 ~7 min android-e2e 🤖apk 📲
✔️ 428ca61 #14 2023-04-17 11:37:47 ~7 min tests 📄log
✔️ 428ca61 #14 2023-04-17 11:37:50 ~7 min ios 📱ipa 📲
✔️ 186793c #15 2023-04-17 12:02:18 ~5 min android 🤖apk 📲
✔️ 186793c #15 2023-04-17 12:03:22 ~6 min android-e2e 🤖apk 📲
✔️ 186793c #15 2023-04-17 12:03:29 ~6 min tests 📄log
✔️ 186793c #15 2023-04-17 12:03:43 ~6 min ios 📱ipa 📲
✔️ 7863ff0 #16 2023-04-17 17:30:54 ~5 min android-e2e 🤖apk 📲
✔️ 7863ff0 #16 2023-04-17 17:31:34 ~6 min android 🤖apk 📲
✔️ 7863ff0 #16 2023-04-17 17:31:55 ~6 min tests 📄log
✔️ 7863ff0 #16 2023-04-17 17:34:59 ~9 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e99d52f #17 2023-04-17 22:38:21 ~5 min android-e2e 🤖apk 📲
✔️ e99d52f #17 2023-04-17 22:38:31 ~6 min tests 📄log
✔️ e99d52f #17 2023-04-17 22:39:10 ~6 min android 🤖apk 📲
✔️ e99d52f #17 2023-04-17 22:48:52 ~16 min ios 📱ipa 📲
✔️ 30efb92 #18 2023-04-20 07:29:29 ~6 min android 🤖apk 📲
✔️ 30efb92 #18 2023-04-20 07:29:40 ~6 min android-e2e 🤖apk 📲
✔️ 30efb92 #18 2023-04-20 07:29:42 ~6 min tests 📄log
✔️ 30efb92 #18 2023-04-20 07:29:51 ~6 min ios 📱ipa 📲

@ibrkhalil ibrkhalil changed the title [15569] Select Recent tab on messages home when double tapping messages icon [15569] Select recent tab on messages home when double tapping messages icon Apr 8, 2023
src/quo2/components/navigation/bottom_nav_tab.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/chat/home/view.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/chat/home/view.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/shell/bottom_tabs.cljs Outdated Show resolved Hide resolved
This PR uses GestureHandler to select the recent tab on the messages home screen, This was achievable by moving the selected tab atom to app-db and not to be local state inside the UI component.
This PR uses GestureHandler to select the recent tab on the messages home screen, This was achievable by moving the selected tab atom to app-db and not to be local state inside the UI component.
@VolodLytvynenko
Copy link
Contributor

hi @ibrkhalil let me know please if this PR is ready for tests

@ibrkhalil
Copy link
Contributor Author

hi @ibrkhalil let me know please if this PR is ready for tests

It's ready now @VladimrLitvinenko

@VolodLytvynenko VolodLytvynenko self-assigned this Apr 10, 2023
@status-im-auto
Copy link
Member

90% of end-end tests have passed

Total executed tests: 29
Failed tests: 3
Passed tests: 26
IDs of failed tests: 702850,702851,702838 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:418: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:923: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

    Device 1: Tap on found: Button
    Device 1: Find Text by xpath: //*[@content-desc="pending-contact-requests-count"]/android.widget.TextView

    medium/test_activity_center.py:126: in test_activity_center_contact_request_decline
        if self.home_1.pending_contact_request_text.text != '1':
    ../views/base_element.py:391: in text
        text = self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: Text by xpath: `//*[@content-desc="pending-contact-requests-count"]/android.widget.TextView` is not found on the screen 
    

    [[Blocked by 15500]]

    Device sessions

    2. 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:176: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.errors.verify_no_errors()
    base_test_case.py:184: 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

    Passed tests (26)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    9. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    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 TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    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_leave, id: 702845
    Device sessions

    6. test_community_unread_messages_badge, id: 702841
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    4. test_activity_center_mentions, id: 702957
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    hi @ibrkhalil. Thank you for PR. Here a list of found issues:

    ISSUE 1: The "pending contact" requests and mutual contacts are not shown in the 'Contacts' tap after CR is sent

    Steps to reproduce:

    1. Send CR as User_A to User_B
    2. Open the 'Contacts' tab as User_A and User_B (now the pending contact should appear in the contacts tab)
    3. User_B: Accept CR
    4. Check 'Contacts'

    Actual result

    'Pending request' and added contacts are not shown into the 'Contact request' tab
    image

    Expected result

    • Pending CR should be shown in the 'Contacts' tab after CR is sent for both users
      image

    • Added contact should be shown in the 'contacts' tab after CR is accepted
      image

    @VolodLytvynenko
    Copy link
    Contributor

    ISSUE 2: The 1-1 chats and group chats shown in all tabs

    Steps to reproduce:

    1. Create 1-1 chat
    2. Create a Group chat
    3. Open 'Groups chat' tab -> Check chats
    4. Open 'Contacts' tab -> Check chats

    Actual result:

    • In 'Groups' and 'Contacts' tabs 1-1 and groups chats are shown
    groups.mp4

    Expected result:

    • In 'Groups' tab only group chats are shown
    • In 'Contacts' data related to contacts is shown

    @@ -281,3 +283,6 @@
    (reg-root-key-sub :messenger/started? :messenger/started?)

    (reg-root-key-sub :information-box-states :information-box-states)

    ; Messages home view -> tabs
    (reg-root-key-sub :messages-home/selected-tab :messages-home/selected-tab :tab/recent)
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    this logic shouldn't be hidden in the key registration, this should be implemented on the view level

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Done

    :left 51
    :position :absolute
    :background-color colors/primary-50}}]))]]
    double-tap-gesture (conj [gesture/gesture-detector {:gesture double-tap-gesture}]))))])
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    are we sure we want to add this into component? why don't just have this in the view level?

    [gesture/gesture-detector {:gesture double-tap-gesture}
      [bottom-nav-tab

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Done

    (animation/load-stack @animation/selected-stack-id)
    (reanimated/set-shared-value (:pass-through? shared-values) pass-through?)
    [reanimated/view {:style animated-style}
    (when pass-through?
    [blur/view (blur-overlay-params style/bottom-tabs-blur-overlay)])
    [rn/view {:style (style/bottom-tabs)}
    [bottom-tab :i/communities :communities-stack shared-values notifications-data]
    [bottom-tab :i/messages :chats-stack shared-values notifications-data]
    [bottom-tab :i/messages :chats-stack shared-values notifications-data
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    its better and simpler to do not implement this into the component, but just wrap bottom-tab here into gesture

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Done

    @status-im-auto
    Copy link
    Member

    86% of end-end tests have passed

    Total executed tests: 29
    Failed tests: 4
    Passed tests: 25
    
    IDs of failed tests: 702745,702850,702731,702838 
    

    Failed tests (4)

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Looking for a message by text: hello
    Device 2: Find `TimeStampText` by `xpath`: `//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-timestamp']`

    critical/chats/test_1_1_public_chats.py:1118: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        timestamp = self.chat_2.chat_element_by_text(messages[0]).timestamp
    ../views/chat_view.py:162: in timestamp
        return TimeStampText(self.driver, self.locator).text
    ../views/base_element.py:209: in text
        return self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: TimeStampText by xpath: `//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-timestamp']` is not found on the screen
    



    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731

    Device 2: Looking for a message by text: Message 2
    Device 2: Find ChatElementByText by xpath: //*[starts-with(@text,'Message 2')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']

    critical/chats/test_1_1_public_chats.py:1022: in test_1_1_chat_pin_messages
        self.chat_2.pin_message(self.message_2, 'pin-to-chat')
    ../views/chat_view.py:947: in pin_message
        self.chat_element_by_text(message).long_press_until_element_is_shown(element)
    ../views/base_element.py:298: in long_press_until_element_is_shown
        element = self.find_element()
    ../views/chat_view.py:134: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'Message 2')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:418: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:923: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

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

    medium/test_activity_center.py:142: in test_activity_center_contact_request_decline
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Username is not shown on 'Add contact' page after entering valid public key 
    

    [[Blocked by 15500]]

    Device sessions

    Passed tests (25)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    5. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    6. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    4. test_activity_center_mentions, id: 702957
    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 TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    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_leave, id: 702845
    Device sessions

    6. test_community_unread_messages_badge, id: 702841
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    @status-im-auto
    Copy link
    Member

    100% of end-end tests have passed

    Total executed tests: 1
    Failed tests: 0
    Passed tests: 1
    

    Passed tests (1)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @ibrkhalil thank you for fixes. Issue 1,2 are fixed. PR is ready to be merged

    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
    5 participants