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: dismiss keyboard when opening a modal #19403

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

seanstrom
Copy link
Member

@seanstrom seanstrom commented Mar 26, 2024

fixes #19396

Summary

  • This PR attempts to resolve an issue on Android devices where the keyboard is not dismissed when opening a contact's profile from pressing a profile-link inside a 1-1 chat.
    • This PR modifies the existing :open-modal event handler to always dismiss the keyboard before transitioning to the modal.

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • 1-1 chats
  • Other places where modals could be opened with a keyboard already present

Steps to test

Reproduction steps are described in this issue: #19396

Before and after screenshots comparison

Before

This issue describes the existing and problematic behaviour: #19396

After

Screen.Recording.2024-03-26.at.15.04.10.mov

status: ready

@seanstrom seanstrom self-assigned this Mar 26, 2024
@seanstrom seanstrom force-pushed the seanstrom/dismiss-keyboard-when-opening-modal branch from b2e9e56 to c3e9153 Compare March 26, 2024 15:13
@status-im-auto
Copy link
Member

status-im-auto commented Mar 26, 2024

Jenkins Builds

Click to see older builds (8)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c3e9153 #2 2024-03-26 15:20:09 ~6 min android-e2e 🤖apk 📲
✔️ c3e9153 #2 2024-03-26 15:20:37 ~7 min tests 📄log
✔️ c3e9153 #2 2024-03-26 15:21:32 ~8 min android 🤖apk 📲
✔️ c3e9153 #2 2024-03-26 15:23:00 ~9 min ios 📱ipa 📲
✔️ f2393f5 #3 2024-04-03 08:10:09 ~4 min tests 📄log
✔️ f2393f5 #3 2024-04-03 08:13:28 ~7 min android 🤖apk 📲
✔️ f2393f5 #3 2024-04-03 08:13:45 ~7 min android-e2e 🤖apk 📲
✔️ f2393f5 #3 2024-04-03 08:22:25 ~16 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 08c06b5 #4 2024-04-03 11:40:45 ~4 min tests 📄log
✔️ 08c06b5 #4 2024-04-03 11:42:57 ~6 min android-e2e 🤖apk 📲
✔️ 08c06b5 #4 2024-04-03 11:43:23 ~7 min android 🤖apk 📲
✔️ 08c06b5 #4 2024-04-03 11:49:28 ~13 min ios 📱ipa 📲
✔️ 13a6bd8 #5 2024-04-04 13:56:10 ~4 min tests 📄log
✔️ 13a6bd8 #5 2024-04-04 13:59:42 ~8 min android-e2e 🤖apk 📲
✔️ 13a6bd8 #5 2024-04-04 13:59:52 ~8 min android 🤖apk 📲
✔️ 13a6bd8 #5 2024-04-04 14:01:28 ~9 min ios 📱ipa 📲

@seanstrom seanstrom marked this pull request as ready for review March 26, 2024 15:31
@status-im-auto
Copy link
Member

96% of end-end tests have passed

Total executed tests: 48
Failed tests: 1
Expected to fail tests: 1
Passed tests: 46
IDs of failed tests: 702844 
IDs of expected to fail tests: 703503 

Failed tests (1)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Device 2: Find `EmojisNumber` by `xpath`: `//*[starts-with(@text,'https://m.youtube.com/watch?v=Je7yErjEVt4')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']/../..//*[@content-desc='emoji-reaction-4']/android.widget.TextView[2]`
    Device 2: Element EmojisNumber text is equal to 1

    critical/chats/test_public_chat_browsing.py:611: in test_community_links_with_previews_github_youtube_twitter_gif_send_enable
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     No preview image is shown for https://github.com/status-im/status-mobile/pull/11707
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Passed tests (46)

    Click to expand

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_edit_message, id: 702855
    Device sessions

    6. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    5. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    6. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_mute_chat, id: 703495
    Device sessions

    3. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    5. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    6. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    @seanstrom
    Copy link
    Member Author

    @status-im/mobile-qa can you review these E2E results please? 🙏

    @pavloburykh
    Copy link
    Contributor

    @seanstrom e2e are okay!

    @pavloburykh
    Copy link
    Contributor

    @seanstrom BTW, in case PR is not skipping manual qa, there is no need to ping for e2e results review as it will be reviewed as part of manual testing once PR will be picked up by QAs.

    The main idea of pinging QAs for e2e review is to unblock merging of PRs which are skipping manual QA as they do not require additional manual qa efforts but only e2e review.

    But anyway, if for some reason you need e2e review in PRs that require manual testing - feel free to ping us, it is not a problem. Although such PR will still need to wait it's turn to be picked up for manual testing.

    Thank you!

    @seanstrom
    Copy link
    Member Author

    @pavloburykh sorry about that, I initially thought this PR would be able to skip-manual-qa, but then reconsidered that it might not.

    @pavloburykh
    Copy link
    Contributor

    @pavloburykh sorry about that, I initially thought this PR would be able to skip-manual-qa, but then reconsidered that it might not.

    no worries @seanstrom! feel free to ping us whenever needed.

    @seanstrom seanstrom force-pushed the seanstrom/dismiss-keyboard-when-opening-modal branch from c3e9153 to f2393f5 Compare April 3, 2024 08:05
    @mariia-skrypnyk mariia-skrypnyk self-assigned this Apr 3, 2024
    @mariia-skrypnyk
    Copy link

    Hi @seanstrom !

    Thanks for your fix 👍
    Now keyboard is successfully dismissed when opening a modal.
    Checked on Android and iOS.
    PR can be merged!

    @seanstrom seanstrom force-pushed the seanstrom/dismiss-keyboard-when-opening-modal branch from f2393f5 to 08c06b5 Compare April 3, 2024 11:36
    @seanstrom seanstrom force-pushed the seanstrom/dismiss-keyboard-when-opening-modal branch from 08c06b5 to 13a6bd8 Compare April 4, 2024 13:51
    @seanstrom seanstrom merged commit 3dfd9df into develop Apr 4, 2024
    6 checks passed
    @seanstrom seanstrom deleted the seanstrom/dismiss-keyboard-when-opening-modal branch April 4, 2024 14:01
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    [Android] Keyboard not closed after user is navigated to the profile
    8 participants