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

chore: adjust counter to use customization-color internally #16799

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

J-Son89
Copy link
Contributor

@J-Son89 J-Son89 commented Jul 27, 2023

fixes: #16798

Counter component was using an override approach to set the colors, moved the custom color mechanism internal to the component and then updated it to best practices 👍

To test - I don't think anything is actually added here, mostly just look out for screens where the counter component is used 👍

Example:
Screenshot 2023-07-27 at 12 33 22

@J-Son89 J-Son89 changed the title Jc/counter refactor chore: adjust counter to use customization-color internally Jul 27, 2023
@@ -362,7 +361,7 @@
customization-color (rf/sub [:profile/customization-color])]
[rn/view {:style style/community-overview-container}
[community-card-page-view id]
[floating-shell-button/floating-shell-button
[quo/floating-shell-button
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated component to use quo export 👍

@status-im-auto
Copy link
Member

status-im-auto commented Jul 27, 2023

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2a97d2b #1 2023-07-27 14:33:20 ~5 min android 🤖apk 📲
✔️ 2a97d2b #1 2023-07-27 14:34:17 ~6 min ios 📱ipa 📲
✔️ 2a97d2b #1 2023-07-27 14:36:12 ~8 min android-e2e 🤖apk 📲
✔️ 2a97d2b #1 2023-07-27 14:36:35 ~8 min tests 📄log
✔️ 72372ba #2 2023-07-31 09:19:03 ~6 min android 🤖apk 📲
✔️ 72372ba #2 2023-07-31 09:19:42 ~6 min ios 📱ipa 📲
✔️ 72372ba #2 2023-07-31 09:20:40 ~7 min android-e2e 🤖apk 📲
✔️ 72372ba #2 2023-07-31 09:22:29 ~9 min tests 📄log
✔️ 78c12da #3 2023-07-31 11:02:09 ~5 min android 🤖apk 📲
✔️ 78c12da #3 2023-07-31 11:03:24 ~6 min ios 📱ipa 📲
✔️ 78c12da #3 2023-07-31 11:05:20 ~8 min android-e2e 🤖apk 📲
✔️ 78c12da #3 2023-07-31 11:05:37 ~8 min tests 📄log
✔️ f44b000 #4 2023-08-02 12:20:48 ~5 min android 🤖apk 📲
✔️ f44b000 #4 2023-08-02 12:21:05 ~5 min android-e2e 🤖apk 📲
✔️ f44b000 #4 2023-08-02 12:23:39 ~8 min tests 📄log
✔️ f44b000 #4 2023-08-02 12:30:02 ~14 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0ea4e09 #5 2023-08-02 15:12:17 ~5 min android-e2e 🤖apk 📲
✔️ 0ea4e09 #5 2023-08-02 15:14:27 ~8 min android 🤖apk 📲
✔️ 0ea4e09 #5 2023-08-02 15:18:01 ~11 min ios 📱ipa 📲
✔️ 0ea4e09 #5 2023-08-02 15:19:14 ~12 min tests 📄log
✔️ e455e6f #6 2023-08-03 10:56:57 ~5 min android-e2e 🤖apk 📲
✔️ e455e6f #6 2023-08-03 10:57:02 ~6 min android 🤖apk 📲
✔️ e455e6f #6 2023-08-03 10:59:48 ~8 min ios 📱ipa 📲
✔️ e455e6f #6 2023-08-03 11:00:39 ~9 min tests 📄log

@J-Son89 J-Son89 self-assigned this Jul 27, 2023
@status-im-auto
Copy link
Member

88% of end-end tests have passed

Total executed tests: 40
Failed tests: 5
Passed tests: 35
IDs of failed tests: 702732,703133,702851,702894,702731 

Failed tests (5)

Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 2: Tap on found: Button
    Device 2: Find `EditBox` by `accessibility id`: `profile-title-input`

    medium/test_activity_center.py:87: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.create_user(second_user=True, username=new_username)
    ../views/sign_in_view.py:234: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:218: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 2: Sending message 'I should not be in chat'
    Device 2: Find ChatMessageInput by accessibility id: chat-message-input

    critical/test_public_chat_browsing.py:874: in test_community_contact_block_unblock_offline
        self.channel_2.send_message(message_to_disappear)
    ../views/chat_view.py:969: in send_message
        self.chat_message_input.send_keys(message)
    ../views/base_element.py:348: in send_keys
        self.find_element().send_keys(value)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webelement.py:218: in send_keys
        self._execute(RemoteCommand.SEND_KEYS_TO_ELEMENT, {'text': ''.join(keys), 'value': keys})
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:633: in _execute
        return self._parent.execute(command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:31: in check_response
        raise wde
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:26: in check_response
        super().check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:242: in check_response
        raise exception_class(message, screen, stacktrace)
     androidx.test.uiautomator.StaleObjectException
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Restoring communities issue: 16787; restoring contacts issue: 15500]]

    Passed tests (35)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    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 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_mentions_push_notification, id: 702786
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_leave, id: 702845
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    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_delete_via_long_press_relogin, id: 702784
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    Device sessions

    9. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    10. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_undo_delete_message, id: 702869
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Copy link
    Contributor

    @ilmotta ilmotta left a comment

    Choose a reason for hiding this comment

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

    Looks good, no further comments :)

    :style (when (= type :default) {:color colors/white})}
    label]]))

    (def counter (quo.theme/with-theme counter-internal))
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    I don't know if the guidelines are clear, but we can just use view and view-internal in quo2, since only one component is exposed for every view namespace.

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    will update 👍

    @churik
    Copy link
    Member

    churik commented Jul 28, 2023

    @J-Son89
    counters in 1-1 chats do not inherit custom color and they are shifted:
    IMAGE 2023-07-28 17:31:26

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Jul 31, 2023

    Thanks for the early testing @churik! I'll address those issues and look across the different uses to make sure it's all good 👍

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Jul 31, 2023

    Hi @churik, this branch is ready for testing now :)

    Simulator Screenshot - iPhone 11 Pro - 2023-07-31 at 10 03 16
    Simulator Screenshot - iPhone 11 Pro - 2023-07-31 at 10 03 13

    @status-im-auto
    Copy link
    Member

    88% of end-end tests have passed

    Total executed tests: 40
    Failed tests: 5
    Passed tests: 35
    
    IDs of failed tests: 702732,703133,702851,703495,702731 
    

    Failed tests (5)

    Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Restoring communities issue: 16787; restoring contacts issue: 15500]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    2. test_group_chat_mute_chat, id: 703495

    Device 2: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 2: Looking for a message by text: Chat is unmuted now

    critical/chats/test_group_chat.py:607: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     New messages counter near chat name is not shown after unmute
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 2: Tap on found: Button
    Device 2: Find Button by accessibility id: create-new-profile

    medium/test_activity_center.py:87: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.create_user(second_user=True, username=new_username)
    ../views/sign_in_view.py:230: in create_user
        self.create_new_profile_button.click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `create-new-profile` is not found on the screen
    



    Device sessions

    Passed tests (35)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    2. test_group_chat_reactions, id: 703202
    Device sessions

    3. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    4. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    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_mentions_push_notification, id: 702786
    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_leave, id: 702845
    Device sessions

    12. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_undo_delete_message, id: 702869
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. 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_delete_via_long_press_relogin, id: 702784
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    Device sessions

    9. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    10. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    @qoqobolo qoqobolo self-assigned this Aug 2, 2023
    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 2, 2023

    Hey @J-Son89, could you rebase this one, please?

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 2, 2023

    @qoqobolo done! :)

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 2, 2023

    @J-Son89 we need another rebase after reverting that commit 😅

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 2, 2023

    Oh yeah! Doing now :)

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 2, 2023

    @qoqobolo, done! :)

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 2, 2023

    @J-Son89 q: should counters on the community itself (on the community home screen) handle the custom color?
    Now it's default blue 🤔

    Screenshot 2023-08-02 at 17 48 30

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 2, 2023

    @qoqobolo, yes definitely. I'll fix! sorry about that :/

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 2, 2023

    @J-Son89 ah no worries! I was not sure either since we have another issue for that #16784, and there are a couple more types of counters.

    So,

    1. The AC bell inherits custom color in this PR ✅
    2. Community unread you will fix ✅
    3. What about the Pending request counter
      and
    4. the dot on Contacts tab?
    Screenshot 2023-08-02 at 18 55 09

    If this PR is supposed to fix all of these counters, could you please add the issue to the PR description so we can also close it when the PR is merged?
    (I have already asked Alex to hold off on this while we clear this up)

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 3, 2023

    @J-Son89 ah and one more place - inside the activity center.
    Let me know if some of these counters are not in the PR scope, I will update the issue

    Screenshot 2023-08-03 at 11 03 57

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 3, 2023

    Thanks @qoqobolo - this pr was focused on the quo2 counter component - https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile?type=design&node-id=179-9536&mode=design&t=3m3BsbjGpxkWzybU-4

    How about I handle all issues for that here?

    and for the notification dot I can do in a follow up pr?

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 3, 2023

    this pr was focused on the quo2 counter component - https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile?type=design&node-id=179-9536&mode=design&t=3m3BsbjGpxkWzybU-4

    Gotcha! For some reason, we also call "dots" counters, although this is incorrect, sorry :)

    How about I handle all issues for that here?

    Sure, then now we neef to fix only the community and pending contact requests counters.

    and for the notification dot I can do in a follow up pr?

    @alwx is also going to work on this dots/counters colors issue: #16784

    You can decide here who would like to work on this and re-assign the issue if needed. In any case, I will update the task description so that it is only about notification dots.

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 3, 2023

    Thanks @qoqobolo, if @alwx is going to work on it that would be great. I'll leave some notes on that issue if there's anything I notice in this pr :)

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Aug 3, 2023

    @qoqobolo - should be all sorted now:

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented Aug 3, 2023

    Yay, it's a feast for the eyes🎉 Thanks for your work @J-Son89!
    PR can be merged.

    @J-Son89 J-Son89 merged commit 98085cd into develop Aug 3, 2023
    2 checks passed
    @J-Son89 J-Son89 deleted the jc/counter-refactor branch August 3, 2023 11:57
    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.

    quo2 Counter color not handling custom colors or community colors
    6 participants