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: vertical align texts in multiline input on iOS #19565

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

yqrashawn
Copy link
Contributor

@yqrashawn yqrashawn commented Apr 9, 2024

fixes #17668
fixes #19263

Summary

add a 2px padding-top to rn/text-input when :multiline is true but there's only a single line in the input

not small?
CleanShot 2024-04-09 at 15 20 07

small?
CleanShot 2024-04-09 at 15 27 13

Review notes

Testing notes

Platforms

  • iOS

Areas that maybe impacted

multiline text input while contains only a single line of text

Steps to test

can be tested in the add contact view
or using the input view in quo preview and toggle the multiline on

Before and after screenshots comparison

before screen can be found at #19263

status: ready

@yqrashawn yqrashawn self-assigned this Apr 9, 2024
@yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch 2 times, most recently from a85f134 to bab91a2 Compare April 9, 2024 07:38
@yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from bab91a2 to 733d262 Compare April 9, 2024 07:42
@status-im-auto
Copy link
Member

status-im-auto commented Apr 9, 2024

Jenkins Builds

Click to see older builds (20)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 733d262 #4 2024-04-09 07:46:46 ~4 min tests 📄log
✔️ 733d262 #4 2024-04-09 07:49:50 ~7 min android-e2e 🤖apk 📲
✔️ 733d262 #4 2024-04-09 07:50:05 ~7 min android 🤖apk 📲
✔️ 733d262 #4 2024-04-09 07:52:21 ~9 min ios 📱ipa 📲
✔️ a21fb3a #5 2024-04-09 08:44:02 ~4 min tests 📄log
✔️ a21fb3a #5 2024-04-09 08:47:03 ~7 min android-e2e 🤖apk 📲
✔️ a21fb3a #5 2024-04-09 08:47:10 ~7 min android 🤖apk 📲
✔️ a21fb3a #5 2024-04-09 08:50:08 ~10 min ios 📱ipa 📲
✔️ 82b4e41 #6 2024-04-09 11:01:24 ~5 min tests 📄log
✔️ 82b4e41 #6 2024-04-09 11:04:35 ~8 min android-e2e 🤖apk 📲
✔️ 82b4e41 #6 2024-04-09 11:04:55 ~8 min android 🤖apk 📲
✔️ 82b4e41 #6 2024-04-09 11:10:34 ~14 min ios 📱ipa 📲
✔️ 0a49448 #7 2024-04-10 01:41:21 ~4 min tests 📄log
✔️ 0a49448 #7 2024-04-10 01:45:30 ~8 min android-e2e 🤖apk 📲
✔️ 0a49448 #7 2024-04-10 01:45:30 ~8 min android 🤖apk 📲
✔️ 0a49448 #7 2024-04-10 01:46:26 ~9 min ios 📱ipa 📲
✔️ dffd5bb #8 2024-04-10 06:29:26 ~4 min tests 📄log
✔️ dffd5bb #8 2024-04-10 06:33:10 ~8 min android-e2e 🤖apk 📲
✔️ dffd5bb #8 2024-04-10 06:33:21 ~8 min android 🤖apk 📲
✔️ dffd5bb #8 2024-04-10 06:34:18 ~9 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 57021bb #9 2024-04-11 13:14:52 ~7 min android-e2e 🤖apk 📲
✔️ 57021bb #9 2024-04-11 13:14:58 ~7 min android 🤖apk 📲
✔️ 57021bb #9 2024-04-11 13:16:48 ~9 min ios 📱ipa 📲
✔️ dfb485f #10 2024-04-12 00:14:31 ~4 min tests 📄log
✔️ dfb485f #10 2024-04-12 00:18:09 ~8 min android-e2e 🤖apk 📲
✔️ dfb485f #10 2024-04-12 00:18:26 ~8 min android 🤖apk 📲
✔️ dfb485f #10 2024-04-12 00:19:49 ~9 min ios 📱ipa 📲

@yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from 733d262 to a21fb3a Compare April 9, 2024 08:39
@status-im-auto
Copy link
Member

87% of end-end tests have passed

Total executed tests: 52
Failed tests: 6
Expected to fail tests: 1
Passed tests: 45
IDs of failed tests: 727230,702782,702777,704613,702851,702775 
IDs of expected to fail tests: 703503 

Failed tests (6)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 2: Find `Text` by `xpath`: `//android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]`
    Device 2: `Text` is `0.41%`

    ../views/wallet_view.py:26: in get_amount
        return float(amount)
     could not convert string to float: '0.41%'
    
    During handling of the above exception, another exception occurred:
    critical/test_wallet.py:116: in test_wallet_send_asset_from_drawer
        sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
    critical/test_wallet.py:44: in _get_balances_before_tx
        eth_amount_receiver = self.wallet_2.get_asset(asset_name='Ether').get_amount()
    ../views/wallet_view.py:28: in get_amount
        pytest.fail("Cannot get %s amount" % self.asset_name)
    E   Failed: Cannot get Ether amount
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Device 1: Tap on found: SendMessageButton
    Device 2: Looking for a message by text: Test with link: https://status.im/ here should be nothing unusual.

    critical/chats/test_1_1_public_chats.py:149: in test_1_1_chat_emoji_send_reply_and_open_link
        self.chat_2.chat_element_by_text(url_message).wait_for_element(20)
    ../views/base_element.py:129: in wait_for_element
        raise TimeoutException(
     Device `2`: `ChatElementByText` by` xpath`: `//*[starts-with(@text,'Test with link: https://status.im/ here should be nothing unusual.')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_element
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777

    Device 1: Find Button by xpath: //*[@text="Paste"]
    Device 1: Tap on found: Button

    activity_center/test_activity_center.py:237: in test_add_contact_field_validation
        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))]))
     Error message is not shown for value "random string 123"
    



    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 1: Tap on found: Button
    # STEP: Device1 check that contact appeared in contact list mutually

    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    E   http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    activity_center/test_activity_center.py:141: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.just_fyi('Device1 check that contact appeared in contact list mutually')
    ../views/base_view.py:409: in just_fyi
        self.driver.execute_script("sauce:context=STEP: %s" % some_str)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:405: in execute_script
        return self.execute(command, {"script": script, "args": converted_args})["value"]
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:343: in execute
        response = self.command_executor.execute(driver_command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:291: in execute
        return self._request(command_info[0], url, body=data)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:312: in _request
        response = self._conn.request(method, url, body=body, headers=headers)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:78: in request
        return self.request_encode_body(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:170: in request_encode_body
        return self.urlopen(method, url, **extra_kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:376: in urlopen
        response = conn.urlopen(method, u.request_uri, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:787: in urlopen
        retries = retries.increment(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/util/retry.py:550: in increment
        raise six.reraise(type(error), error, _stacktrace)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/packages/six.py:769: in reraise
        raise value.with_traceback(tb)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1375: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
     ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    



    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613

    Device 1: Find Button by xpath: //*[@text="open community"]
    Device 1: Tap on found: Button

    critical/test_deep_and_universal_links.py:69: in test_links_open_universal_links_from_chat
        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))]))
     Community 'closed community' was not requested to join by the url https://status.app/c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shspPKCZ1VPVQ9dLXGufUGvGphjxVwrcZ6rkZc7S39T4b3
    



    Device sessions

    2. test_links_deep_links, id: 702775

    Device 1: Find BrowserTab by accessibility id: browser-stack-tab
    Device 1: Tap on found: BrowserTab

    critical/test_deep_and_universal_links.py:112: in test_links_deep_links
        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))]))
     Community 'closed community' was not requested to join by the deep link status.app://c/G00AAGS9TbI9mSR-ZNmFrhRjNuEeXAAbcAIUaLLJyjMOG3ACJQ12oIHD78QhzO9s_T5bUeU7rnATWJg3mGgTUemrAg==#zQ3shspPKCZ1VPVQ9dLXGufUGvGphjxVwrcZ6rkZc7S39T4b3
    



    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 (45)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    6. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    7. test_1_1_chat_message_reaction, id: 702730
    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

    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 TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    2. test_wallet_add_remove_watch_only_account, id: 727232
    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 TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229
    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 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_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    10. test_community_message_edit, id: 702843
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    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 TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    @yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from a21fb3a to 82b4e41 Compare April 9, 2024 10:56
    Copy link
    Contributor

    @ulisesmac ulisesmac left a comment

    Choose a reason for hiding this comment

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

    Thanks for this PR @yqrashawn

    Please make sure to test both on iOS and Android. Text in android has some automatically added paddings, and I'm not completely sure, but seems they vary depending on the device.

    So any change in these styles might affect android in a different way.

    @yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from 82b4e41 to 0a49448 Compare April 10, 2024 01:36
    @yqrashawn
    Copy link
    Contributor Author

    Thanks for the review @ulisesmac

    For android, it's controlled by :text-align-vertical, iOS does not support this https://reactnative.dev/docs/text-style-props#textalignvertical-android

    @yqrashawn
    Copy link
    Contributor Author

    add a minor copy change for #19263

    -    "ens-or-chat-key": "ENS or Chat key",
    +    "ens-or-chat-key": "ENS or Chatkey",

    @churik
    Copy link
    Member

    churik commented Apr 11, 2024

    Hey @yqrashawn !
    I'd substitute request-manual-qa with design review in the particular case, I believe it would be more useful in particular case, if no objections.
    The e2e results are reviewed, the failed tests are not related to the PR.
    PR can proceed to the next stage.

    @Francesca-G would you mind reviewing the related changes?
    Thanks!

    @yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from dffd5bb to 57021bb Compare April 11, 2024 13:07
    @yqrashawn
    Copy link
    Contributor Author

    rebased to latest dev

    Copy link

    @Francesca-G Francesca-G left a comment

    Choose a reason for hiding this comment

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

    Looks fixed to me ✅

    @yqrashawn yqrashawn force-pushed the fix/vertical-align-text-in-multiline-input branch from 57021bb to dfb485f Compare April 12, 2024 00:09
    @yqrashawn yqrashawn merged commit f8cc85f into develop Apr 12, 2024
    6 checks passed
    @yqrashawn yqrashawn deleted the fix/vertical-align-text-in-multiline-input branch April 12, 2024 12:25
    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.

    Messages - Add a contact screen issues Text inside multiline text inputs not vertically centered in iOS
    7 participants