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

feat: send button and system messge icon based on chat/contact customization color #19558

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

yqrashawn
Copy link
Contributor

@yqrashawn yqrashawn commented Apr 8, 2024

fixes #19503
fxies #18829

Summary

follow up of PR #19087

update system icon color based on chat contexts

  • in group/community channel, use group/channel color
  • in one-to-one chat, use contact customization color

CleanShot 2024-04-08 at 15 42 27

Testing notes

I've tested one-one, group and community channel on iOS simulator

Platforms

  • Android
  • iOS

Areas that maybe impacted

system message and send button color

status: ready

@yqrashawn yqrashawn self-assigned this Apr 8, 2024
@yqrashawn yqrashawn requested review from alwx and clauxx April 8, 2024 07:45
@yqrashawn yqrashawn added the anothers-profile https://www.notion.so/Silhouettes-08d57f036b43473b904bfd3f1b2a76aa label Apr 8, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Apr 8, 2024

Jenkins Builds

Click to see older builds (23)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 486558a #1 2024-04-08 07:50:06 ~4 min tests 📄log
✔️ 486558a #1 2024-04-08 07:53:46 ~8 min android-e2e 🤖apk 📲
✔️ 486558a #1 2024-04-08 07:53:50 ~8 min android 🤖apk 📲
✔️ 486558a #1 2024-04-08 07:55:13 ~10 min ios 📱ipa 📲
✔️ b7ba08e #2 2024-04-08 11:28:39 ~4 min tests 📄log
✔️ b7ba08e #2 2024-04-08 11:31:31 ~7 min android 🤖apk 📲
✔️ b7ba08e #2 2024-04-08 11:31:37 ~7 min android-e2e 🤖apk 📲
✔️ b7ba08e #2 2024-04-08 11:36:49 ~12 min ios 📱ipa 📲
✔️ 8d262f5 #3 2024-04-08 12:13:08 ~8 min android-e2e 🤖apk 📲
✔️ 8d262f5 #3 2024-04-08 12:13:18 ~8 min android 🤖apk 📲
✔️ 8d262f5 #3 2024-04-08 12:15:33 ~10 min ios 📱ipa 📲
✔️ 8d262f5 #4 2024-04-09 01:19:26 ~3 min tests 📄log
✔️ 5f7a859 #4 2024-04-09 06:18:57 ~8 min android-e2e 🤖apk 📲
✔️ 5f7a859 #4 2024-04-09 06:18:59 ~8 min android 🤖apk 📲
✔️ 5f7a859 #4 2024-04-09 06:20:39 ~9 min ios 📱ipa 📲
✔️ 5f7a859 #6 2024-04-09 08:41:06 ~4 min tests 📄log
✔️ 6c28d1e #7 2024-04-09 11:00:39 ~4 min tests 📄log
✔️ 6c28d1e #5 2024-04-09 11:02:44 ~6 min android-e2e 🤖apk 📲
✔️ 6c28d1e #5 2024-04-09 11:03:23 ~7 min android 🤖apk 📲
✔️ 6c28d1e #5 2024-04-09 11:10:40 ~14 min ios 📱ipa 📲
✔️ 40f5d6d #6 2024-04-11 07:29:42 ~7 min android-e2e 🤖apk 📲
✔️ 40f5d6d #6 2024-04-11 07:29:48 ~8 min android 🤖apk 📲
✔️ 40f5d6d #6 2024-04-11 07:31:21 ~9 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3d997b8 #9 2024-04-12 00:11:19 ~4 min tests 📄log
✔️ 3d997b8 #7 2024-04-12 00:15:11 ~8 min android 🤖apk 📲
✔️ 3d997b8 #7 2024-04-12 00:15:12 ~8 min android-e2e 🤖apk 📲
✔️ 3d997b8 #7 2024-04-12 00:17:11 ~10 min ios 📱ipa 📲
✔️ 592dd6a #10 2024-04-12 12:31:02 ~4 min tests 📄log
✔️ 592dd6a #8 2024-04-12 12:32:39 ~6 min android 🤖apk 📲
✔️ 592dd6a #8 2024-04-12 12:33:34 ~6 min android-e2e 🤖apk 📲
✔️ 592dd6a #8 2024-04-12 12:40:43 ~14 min ios 📱ipa 📲

Comment on lines 49 to 51
{contact-customization-color
:customization-color} (when (= chat-type constants/one-to-one-chat-type)
(rf/sub [:contacts/contact-by-address chat-id]))]
Copy link
Member

Choose a reason for hiding this comment

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

seems like we're using this sub a few times to only get the contact's customization color. Might be better to have a separate sub e.g. :contacts/customization-color-by-address WDYT?

@@ -62,7 +66,7 @@
[quo/button
{:icon-only? true
:size 32
:customization-color customization-color
:customization-color (or contact-customization-color color customization-color)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm very confused by these variable names, they all seem the same. Can we change the names to provide a bit more of clarity why it's done this way?

@yqrashawn yqrashawn force-pushed the feat/sys-msg-icon-customization-color branch from b7ba08e to 8d262f5 Compare April 8, 2024 12:04
@yqrashawn
Copy link
Contributor Author

Thanks for the review @clauxx @alwx, code updated based on feedback above

@status-im-auto
Copy link
Member

88% of end-end tests have passed

Total executed tests: 52
Failed tests: 5
Expected to fail tests: 1
Passed tests: 46
IDs of failed tests: 702782,704613,702851,703297,702775 
IDs of expected to fail tests: 703503 

Failed tests (5)

Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297

    Device 3: Find `ChatsTab` by `accessibility id`: `chats-stack-tab`
    Device 3: Tap on found: ChatsTab

    critical/chats/test_group_chat.py:283: in test_group_chat_send_image_save_and_share
        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))]))
     Not expected image is shown to the admin.
    E    Not expected image is shown to the member_2.
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. 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 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 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 communtiy for e2e' was not requested to join by the url https://status.app/c/G0UAAGS9MeHbo_RoNMnOhOKTCo-fDDbgBCCyNNSN7qrzTqIgLem56TyzYYLf36askV7yGcros8muAdgB#zQ3shVWCcsH94vjf7WrFqBXx5MMAui2EPYMBme8ntACNWWVN3
    



    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 communtiy for e2e' was not requested to join by the deep link status.app://c/G0UAAGS9MeHbo_RoNMnOhOKTCo-fDDbgBCCyNNSN7qrzTqIgLem56TyzYYLf36askV7yGcros8muAdgB#zQ3shVWCcsH94vjf7WrFqBXx5MMAui2EPYMBme8ntACNWWVN3
    



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

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    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 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 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_reactions, id: 703202
    Device sessions

    4. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    5. test_group_chat_offline_pn, id: 702808
    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 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 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 TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    Device sessions

    2. test_wallet_send_eth, id: 727229
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    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

    @yqrashawn yqrashawn force-pushed the feat/sys-msg-icon-customization-color branch 3 times, most recently from 6c28d1e to 40f5d6d Compare April 11, 2024 07:21
    @mariia-skrypnyk mariia-skrypnyk self-assigned this Apr 11, 2024
    @status-im-auto
    Copy link
    Member

    60% of end-end tests have passed

    Total executed tests: 5
    Failed tests: 2
    Expected to fail tests: 0
    Passed tests: 3
    
    IDs of failed tests: 702775,704613 
    

    Failed tests (2)

    Click to expand
  • Rerun failed tests

  • Class TestDeepLinksOneDevice:

    1. 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

    2. 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

    Passed tests (3)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. 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

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    @mariia-skrypnyk
    Copy link

    Hi @yqrashawn !

    Tested - OK ✅
    E2E reviewed - not related.
    Thanks for your amazing work!
    Can be merged!

    @yqrashawn yqrashawn force-pushed the feat/sys-msg-icon-customization-color branch from 40f5d6d to 3d997b8 Compare April 12, 2024 00:06
    Signed-off-by: yqrashawn <namy.19@gmail.com>
    @yqrashawn yqrashawn force-pushed the feat/sys-msg-icon-customization-color branch from 3d997b8 to 592dd6a Compare April 12, 2024 12:26
    @yqrashawn yqrashawn merged commit 00b0755 into develop Apr 12, 2024
    6 checks passed
    @yqrashawn yqrashawn deleted the feat/sys-msg-icon-customization-color branch April 12, 2024 12:46
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    anothers-profile https://www.notion.so/Silhouettes-08d57f036b43473b904bfd3f1b2a76aa request-manual-qa test cases added Tested - OK
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    1-1 Chat elements do not Inherit contact's color
    6 participants