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

status timeline: set image max width to avoid overflow of horizontally long images #13211

Conversation

siddarthkay
Copy link
Contributor

[comment]: Fixes #13149

Platforms
Android
iOS
status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Mar 24, 2022

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 6cfb640 #1 2022-03-24 17:44:44 ~9 min android 📦apk 📲
✔️ 6cfb640 #1 2022-03-24 17:44:49 ~9 min android-e2e 📦apk 📲
✔️ 6cfb640 #1 2022-03-24 17:47:35 ~11 min ios 📦ipa 📲
✔️ 6cfb640 #2 2022-03-30 07:48:49 ~16 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3c23a66 #2 2022-03-31 06:37:40 ~9 min android 📦apk 📲
✔️ 3c23a66 #2 2022-03-31 06:37:41 ~9 min android-e2e 📦apk 📲
✔️ 3c23a66 #3 2022-03-31 06:44:00 ~16 min ios 📦ipa 📲
✔️ c4d2fba #3 2022-04-08 15:27:15 ~9 min android-e2e 📦apk 📲
✔️ c4d2fba #3 2022-04-08 15:27:19 ~9 min android 📦apk 📲
✔️ c4d2fba #4 2022-04-08 15:31:52 ~14 min ios 📦ipa 📲

:height image-max-dimension
:max-width :100%
Copy link
Member

Choose a reason for hiding this comment

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

could you please elaborate on how this will work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The modification here is to the container view which contains the image component.
problem : In case of horizontally long images the image width would be bigger than the device width and the image would overflow outside of the view.
Solution : set the container view to have a max-width of 100% which ensures that no matter what is the width of the image (which is in the child component) in question it would never overflow because of the max-width property.

Screenshot before fix :

sceenshot-before-fix

Screenshot after fix :

screenshot-after-fix

Copy link
Member

Choose a reason for hiding this comment

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

oh i see, but now the image is cut on the left?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its center aligned actually, Some images can be reallly long horizontally and to accommodate them there were 2 options :

  1. Either reduce the height to match the aspect ratio ( because of long length )
    OR
  2. Center align them with a fixed height
    The second one seemed more readable to me given our constraints of device width

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also when you tap on these images it opens them in a modal view in full

@status-im-auto
Copy link
Member

95% of end-end tests have passed

Total executed tests: 79
Failed tests: 4
Passed tests: 75
IDs of failed tests: 6270,5689,700737,700770 

Failed tests (4)

Click to expand
  • Rerun tests

  • 1. test_public_chat_mark_all_messages_as_read, id: 6270

    Device 1: Looking for chat: '#uhwthos'
    Device 1: Wait for element `Button` for max 30s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    2. test_keycard_create_account_unlock_same_seed, id: 5689

    Device 1: `Text` is `0x04ccfbf9fd5032e7c6eaccfca840c693ef324e7ac92cfde047950e988b770c0f2f92b029224a8c6165b367c41e2969427a12a457b859e22b08b4c83cb183611fa9`
    Device 1: Click system back button

    Account USD value is not 0, it is ...

    Device sessions

    3. test_public_chat_links_with_previews_github_youtube_twitter_gif_send_enable, id: 700737

    Device 1: Looking for chat: '#uhwthos'
    Device 1: Wait for element `Button` for max 30s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    4. test_keycard_wallet_recover_pairing_check_balance_after_offline_tx_history, id: 700770

    Device 1: Set `000000` value for `EditBox`
    Device 1: Find `Button` by `xpath`: `//*[@text="Pair to this device"]`

    Device 1: Button by xpath: `//*[@text="Pair to this device"]` is not found on the screen

    Device sessions

    Passed tests (75)

    Click to expand

    1. test_can_add_existing_ens_on_mainnet, id: 5502
    Device sessions

    2. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    3. test_wallet_manage_assets, id: 700758
    Device sessions

    4. test_public_chat_message_edit, id: 700734
    Device sessions

    5. test_keycard_relogin_after_restore, id: 700768
    Device sessions

    6. test_group_chat_push_system_messages_when_invited, id: 3994
    Device sessions

    7. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    8. test_send_tx_token_7_decimals, id: 700764
    Device sessions

    9. test_image_in_one_to_one_send_save_reply_timeline, id: 6305
    Device sessions

    10. test_public_chat_open_using_deep_link, id: 700739
    Device sessions

    11. test_public_chat_unread_messages_counter, id: 5360
    Device sessions

    12. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    13. test_public_chat_emoji_send_copy_paste_reply, id: 700719
    Device sessions

    14. test_browser_bookmarks_create_edit_remove, id: 702077
    Device sessions

    15. test_send_tx_eth_check_logcat, id: 700763
    Device sessions

    16. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    17. test_restore_validation_seed_phrase_field, id: 700750
    Device sessions

    18. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    19. test_public_chat_unread_messages_counter_for_mention_relogin, id: 700718
    Device sessions

    20. test_send_tx_custom_token_18_decimals_invalid_password, id: 700765
    Device sessions

    21. test_onboarding_add_new_multiaccount_username_by_position_pass_validation, id: 700747
    Device sessions

    22. test_public_chat_delete_chat_long_press, id: 5319
    Device sessions

    23. test_onboarding_home_initial_popup, id: 700742
    Device sessions

    24. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    25. test_browser_blocked_url, id: 702072
    Device sessions

    26. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    27. test_edit_delete_message_in_one_to_one_, id: 695843
    Device sessions

    28. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    29. test_send_and_open_emoji_link_in_one_to_one, id: 5373
    Device sessions

    30. test_wallet_add_hide_unhide_account_private_key, id: 700761
    Device sessions

    31. test_block_user_from_public_chat, id: 5786
    Device sessions

    32. test_keycard_send_tx_sign_message_request_stt_testdapp, id: 700769
    Device sessions

    33. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    34. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    35. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    36. test_public_chat_link_send_open, id: 700736
    Device sessions

    37. test_onboarding_share_contact_address, id: 700743
    Device sessions

    38. test_onboarding_backup_seed_phrase_restore_same_login_logcat, id: 700745
    Device sessions

    39. test_wallet_tx_history_copy_tx_hash_on_lte, id: 700756
    Device sessions

    40. test_restore_set_up_wallet_sign_phrase, id: 700749
    Device sessions

    41. test_browser_delete_close_tabs, id: 702076
    Device sessions

    42. test_browser_connection_is_secure_not_secure_warning, id: 702073
    Device sessions

    43. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    44. test_send_tx_set_recipient_options, id: 700757
    Device sessions

    45. test_onboarding_cant_sign_in_with_invalid_password_logcat, id: 700746
    Device sessions

    46. test_send_tx_sign_message_2tx_in_batch_tx_filters_request_stt_testdapp, id: 5342
    Device sessions

    47. test_group_chat_join_send_text_messages_push, id: 700731
    Device sessions

    48. test_browser_web3_permissions_testdapp, id: 702078
    Device sessions

    49. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    50. test_wallet_add_delete_watch_only_account, id: 700760
    Device sessions

    51. test_group_chat_decline_invite_chat_highligted, id: 5756
    Device sessions

    52. test_set_profile_picture, id: 6646
    Device sessions

    53. test_public_chat_tag_message, id: 700738
    Device sessions

    54. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    55. test_onboarding_share_wallet_address, id: 700744
    Device sessions

    56. test_mobile_data_usage_complex_settings, id: 6228
    Device sessions

    57. test_public_chat_navigate_to_chat_when_relaunch, id: 5396
    Device sessions

    58. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    59. test_public_chat_fetch_more_history, id: 5675
    Device sessions

    60. test_wallet_fetching_balance_after_offline_insufficient_funds_errors, id: 700766
    Device sessions

    61. test_group_chat_offline_pn, id: 3998
    Device sessions

    62. test_group_chat_add_new_member_activity_centre, id: 700732
    Device sessions

    63. test_keycard_send_tx_eth, id: 700767
    Device sessions

    64. test_browser_offline, id: 702075
    Device sessions

    65. test_browser_invalid_url, id: 702074
    Device sessions

    66. test_wallet_add_account_generate_new, id: 700759
    Device sessions

    67. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    68. test_restore_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 700748
    Device sessions

    69. test_copy_and_paste_messages, id: 5317
    Device sessions

    70. test_public_chat_message_send_check_timestamps_while_on_different_tab, id: 5313
    Device sessions

    71. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    72. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    73. test_group_chat_leave_relogin, id: 3997
    Device sessions

    74. test_public_chat_message_delete, id: 700735
    Device sessions

    75. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    @status-im-auto
    Copy link
    Member

    96% of end-end tests have passed

    Total executed tests: 79
    Failed tests: 3
    Passed tests: 76
    
    IDs of failed tests: 6270,6228,700737 
    

    Failed tests (3)

    Click to expand
  • Rerun tests

  • 1. test_public_chat_mark_all_messages_as_read, id: 6270

    Device 1: Looking for chat: '#egadwqq'
    Device 1: Wait for element `Button` for max 30s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    2. test_mobile_data_usage_complex_settings, id: 6228

    Device 2: Find `Button` by `accessibility id`: `Wi‑Fi`
    Device 2: Tap on found: Button

    Device 2: Button by accessibility id:`conn-button-mobile-sync-off` is not found on the screen

    Device sessions

    3. test_public_chat_links_with_previews_github_youtube_twitter_gif_send_enable, id: 700737

    Device 1: Looking for chat: '#egadwqq'
    Device 1: Wait for element `Button` for max 30s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    Passed tests (76)

    Click to expand

    1. test_can_add_existing_ens_on_mainnet, id: 5502
    Device sessions

    2. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    3. test_wallet_manage_assets, id: 700758
    Device sessions

    4. test_public_chat_message_edit, id: 700734
    Device sessions

    5. test_keycard_relogin_after_restore, id: 700768
    Device sessions

    6. test_group_chat_push_system_messages_when_invited, id: 3994
    Device sessions

    7. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    8. test_send_tx_token_7_decimals, id: 700764
    Device sessions

    9. test_image_in_one_to_one_send_save_reply_timeline, id: 6305
    Device sessions

    10. test_public_chat_open_using_deep_link, id: 700739
    Device sessions

    11. test_public_chat_unread_messages_counter, id: 5360
    Device sessions

    12. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    13. test_public_chat_emoji_send_copy_paste_reply, id: 700719
    Device sessions

    14. test_browser_bookmarks_create_edit_remove, id: 702077
    Device sessions

    15. test_send_tx_eth_check_logcat, id: 700763
    Device sessions

    16. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    17. test_restore_validation_seed_phrase_field, id: 700750
    Device sessions

    18. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    19. test_public_chat_unread_messages_counter_for_mention_relogin, id: 700718
    Device sessions

    20. test_send_tx_custom_token_18_decimals_invalid_password, id: 700765
    Device sessions

    21. test_onboarding_add_new_multiaccount_username_by_position_pass_validation, id: 700747
    Device sessions

    22. test_public_chat_delete_chat_long_press, id: 5319
    Device sessions

    23. test_onboarding_home_initial_popup, id: 700742
    Device sessions

    24. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    25. test_browser_blocked_url, id: 702072
    Device sessions

    26. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    27. test_edit_delete_message_in_one_to_one_, id: 695843
    Device sessions

    28. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    29. test_send_and_open_emoji_link_in_one_to_one, id: 5373
    Device sessions

    30. test_wallet_add_hide_unhide_account_private_key, id: 700761
    Device sessions

    31. test_block_user_from_public_chat, id: 5786
    Device sessions

    32. test_keycard_send_tx_sign_message_request_stt_testdapp, id: 700769
    Device sessions

    33. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    34. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    35. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    36. test_public_chat_link_send_open, id: 700736
    Device sessions

    37. test_onboarding_share_contact_address, id: 700743
    Device sessions

    38. test_onboarding_backup_seed_phrase_restore_same_login_logcat, id: 700745
    Device sessions

    39. test_wallet_tx_history_copy_tx_hash_on_lte, id: 700756
    Device sessions

    40. test_restore_set_up_wallet_sign_phrase, id: 700749
    Device sessions

    41. test_browser_delete_close_tabs, id: 702076
    Device sessions

    42. test_browser_connection_is_secure_not_secure_warning, id: 702073
    Device sessions

    43. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    44. test_send_tx_set_recipient_options, id: 700757
    Device sessions

    45. test_onboarding_cant_sign_in_with_invalid_password_logcat, id: 700746
    Device sessions

    46. test_send_tx_sign_message_2tx_in_batch_tx_filters_request_stt_testdapp, id: 5342
    Device sessions

    47. test_group_chat_join_send_text_messages_push, id: 700731
    Device sessions

    48. test_browser_web3_permissions_testdapp, id: 702078
    Device sessions

    49. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    50. test_wallet_add_delete_watch_only_account, id: 700760
    Device sessions

    51. test_group_chat_decline_invite_chat_highligted, id: 5756
    Device sessions

    52. test_set_profile_picture, id: 6646
    Device sessions

    53. test_public_chat_tag_message, id: 700738
    Device sessions

    54. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    55. test_onboarding_share_wallet_address, id: 700744
    Device sessions

    56. test_keycard_create_account_unlock_same_seed, id: 5689
    Device sessions

    57. test_public_chat_navigate_to_chat_when_relaunch, id: 5396
    Device sessions

    58. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    59. test_public_chat_fetch_more_history, id: 5675
    Device sessions

    60. test_wallet_fetching_balance_after_offline_insufficient_funds_errors, id: 700766
    Device sessions

    61. test_group_chat_offline_pn, id: 3998
    Device sessions

    62. test_group_chat_add_new_member_activity_centre, id: 700732
    Device sessions

    63. test_keycard_send_tx_eth, id: 700767
    Device sessions

    64. test_browser_offline, id: 702075
    Device sessions

    65. test_browser_invalid_url, id: 702074
    Device sessions

    66. test_wallet_add_account_generate_new, id: 700759
    Device sessions

    67. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    68. test_restore_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 700748
    Device sessions

    69. test_copy_and_paste_messages, id: 5317
    Device sessions

    70. test_public_chat_message_send_check_timestamps_while_on_different_tab, id: 5313
    Device sessions

    71. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    72. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    73. test_group_chat_leave_relogin, id: 3997
    Device sessions

    74. test_public_chat_message_delete, id: 700735
    Device sessions

    75. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    76. test_keycard_wallet_recover_pairing_check_balance_after_offline_tx_history, id: 700770
    Device sessions

    @pavloburykh pavloburykh self-assigned this Mar 29, 2022
    @pavloburykh
    Copy link
    Contributor

    @siddarthkay thank you for PR. Ready for merge.

    @flexsurfer
    Copy link
    Member

    @siddarthkay please squash commits before merge

    @siddarthkay
    Copy link
    Contributor Author

    @flexsurfer : yes I will take care from next time onwards, I messed up using the merge script with this PR :(

    @siddarthkay siddarthkay force-pushed the bug/13149-timeline-images-stretch-off-screen branch from 3c23a66 to c4d2fba Compare April 8, 2022 15:17
    @siddarthkay siddarthkay merged commit 2ddf4cf into status-im:develop Apr 8, 2022
    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.

    Timeline images stretch off screen
    4 participants