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: remove uses of override theme prop #16570

Merged
merged 2 commits into from
Jul 28, 2023
Merged

chore: remove uses of override theme prop #16570

merged 2 commits into from
Jul 28, 2023

Conversation

J-Son89
Copy link
Contributor

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

one further step towards: #16400

updates the usage of theme prop in
user_avatar
documentation_drawers
input
recovery phrase
preview list
filter selector
segmented tab
status tags

and removes the usage of override-theme for these components within the app

To Test:
This affects the theming of components so a quick walk through of the app and ensuring the theme is correct on components is correct should be enough here.

@status-im-auto
Copy link
Member

status-im-auto commented Jul 12, 2023

Jenkins Builds

Click to see older builds (28)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0501329 #1 2023-07-12 11:37:39 ~6 min android 🤖apk 📲
✔️ 0501329 #1 2023-07-12 11:37:50 ~6 min android-e2e 🤖apk 📲
0501329 #1 2023-07-12 11:39:28 ~7 min tests 📄log
✔️ 0501329 #1 2023-07-12 11:41:28 ~10 min ios 📱ipa 📲
✔️ 23c47d7 #2 2023-07-18 08:55:36 ~6 min android-e2e 🤖apk 📲
✔️ 23c47d7 #2 2023-07-18 08:55:37 ~6 min android 🤖apk 📲
✔️ 23c47d7 #2 2023-07-18 08:56:10 ~6 min ios 📱ipa 📲
23c47d7 #2 2023-07-18 08:57:26 ~8 min tests 📄log
✔️ 8403b82 #3 2023-07-21 15:37:55 ~6 min android-e2e 🤖apk 📲
✔️ 8403b82 #3 2023-07-21 15:37:59 ~6 min android 🤖apk 📲
✔️ 8403b82 #3 2023-07-21 15:39:20 ~7 min ios 📱ipa 📲
8403b82 #3 2023-07-21 15:39:35 ~7 min tests 📄log
✔️ 6d9cb96 #4 2023-07-24 10:01:22 ~5 min android-e2e 🤖apk 📲
✔️ 6d9cb96 #4 2023-07-24 10:01:58 ~6 min android 🤖apk 📲
✔️ 6d9cb96 #4 2023-07-24 10:02:21 ~6 min ios 📱ipa 📲
6d9cb96 #4 2023-07-24 10:03:29 ~8 min tests 📄log
✔️ 68ff1c4 #5 2023-07-25 11:09:32 ~7 min android-e2e 🤖apk 📲
✔️ 68ff1c4 #5 2023-07-25 11:09:39 ~8 min ios 📱ipa 📲
✔️ 68ff1c4 #5 2023-07-25 11:09:47 ~8 min android 🤖apk 📲
68ff1c4 #5 2023-07-25 11:10:12 ~8 min tests 📄log
✔️ 9092df3 #6 2023-07-25 11:47:08 ~5 min android-e2e 🤖apk 📲
✔️ 9092df3 #6 2023-07-25 11:49:05 ~7 min ios 📱ipa 📲
✔️ 9092df3 #6 2023-07-25 11:49:27 ~8 min android 🤖apk 📲
✔️ 9092df3 #6 2023-07-25 11:50:33 ~9 min tests 📄log
13988c5 #7 2023-07-27 14:48:42 ~2 min tests 📄log
✔️ 13988c5 #7 2023-07-27 14:51:42 ~5 min android-e2e 🤖apk 📲
✔️ 13988c5 #7 2023-07-27 14:51:47 ~5 min android 🤖apk 📲
✔️ 13988c5 #7 2023-07-27 14:56:43 ~10 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
2f0e484 #8 2023-07-28 07:51:32 ~2 min tests 📄log
✔️ 2f0e484 #8 2023-07-28 07:54:16 ~5 min android 🤖apk 📲
✔️ 2f0e484 #8 2023-07-28 07:54:23 ~5 min android-e2e 🤖apk 📲
✔️ 2f0e484 #8 2023-07-28 08:01:22 ~12 min ios 📱ipa 📲
✔️ e1c81e7 #9 2023-07-28 08:55:33 ~5 min android 🤖apk 📲
✔️ e1c81e7 #9 2023-07-28 08:57:19 ~7 min android-e2e 🤖apk 📲
✔️ e1c81e7 #9 2023-07-28 08:58:48 ~8 min tests 📄log
✔️ e1c81e7 #9 2023-07-28 08:59:28 ~9 min ios 📱ipa 📲

@@ -112,13 +112,11 @@
:component add-new-contact/new-contact}

{:name :how-to-pair
:options {:theme :dark
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed these screens phone status bar (time/battery etc) was in the wrong color for the theme

Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

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

🚀

@@ -188,3 +188,5 @@
(if (= type :password)
[password-input base-props]
[base-input base-props])))

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

Choose a reason for hiding this comment

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

When we wrap the internal component with HOCs or export components from the quo2.core namespace, the doc string is not being forwarded to the newly defined function. I'm curious if there is a way to fix this.

internal-input has a doc-string But input doesn't
Screenshot 2023-07-25 at 09 53 57 Screenshot 2023-07-25 at 09 54 05

(Not in the scope of this PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep @ibrkhalil pointed out you add docstring on the outer layer and it works. Perhaps someone can create a follow up issue to move the docstrings, and maybe even clean a few up while they're doing it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Even if we try that approach when we define the components in quo2.core like this(def input quo2.components.inputs.input.view/input), the doc string is not being preserved.

Copy link
Contributor

Choose a reason for hiding this comment

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

since the docstring is metadata, it might be possible to forward it with functions like meta, with-meta, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

@erikseppanen @J-Son89 @ajayesivan

Even if we add it as metadata, some IDEs/Editors (like IntelliJ) that perform static code analysis will not read the docstring.

@status-im-auto
Copy link
Member

87% of end-end tests have passed

Total executed tests: 39
Failed tests: 5
Passed tests: 34
IDs of failed tests: 702732,703133,702851,702731,703382 

Failed tests (5)

Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find `Button` by `accessibility id`: `show-profiles`
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:486: in test_restore_multiaccount_with_waku_backup_remove_switch
        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))]))
     admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    E    Incorrect contacts number restored: 0 instead of 2
    E    Contact(s) was (were) not restored from backup: Test_contact, MyCustomNickname!
    



    Device sessions

    2. test_community_mute_community_and_channel, id: 703382

    Device 1: Find MuteButton by accessibility id: mute-community
    Device 1: Click system back button

    critical/test_public_chat_browsing.py:402: in test_community_mute_community_and_channel
        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))]))
     Text 'Muted until 13:19 Tue 01 Aug' is not shown for a muted community channel
    



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

    1. test_group_chat_pin_messages, id: 702732

    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: Find Button by accessibility id: tab-contacts
    Device 2: Tap on found: Button

    medium/test_activity_center.py:112: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        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))]))
     Contact was not added to contact list after accepting contact request (as receiver)
    E    Contact was not added to contact list after accepting contact request (as sender)
    



    Device sessions

    Passed tests (34)

    Click to expand

    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 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_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_navigate_to_channel_when_relaunch, id: 702846
    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

    @VolodLytvynenko VolodLytvynenko self-assigned this Jul 27, 2023
    @VolodLytvynenko
    Copy link
    Contributor

    Hi @J-Son89 Could you please rebase the PR and resolve existing conflicts? After that we can perform manual testing. Thanx!

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented Jul 27, 2023

    @VolodLytvynenko - this is ready now 👍

    @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,702745,702731 
    

    Failed tests (5)

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Find MemberPhoto by xpath: //*[starts-with(@text,'profile_photo')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='user-avatar']
    Device 2: Image differs from template to 6.645244523590686 percents

    critical/chats/test_1_1_public_chats.py:1129: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        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))]))
     Image of user in 1-1 chat is too different from template!
    



    Device sessions

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

    1. test_activity_center_contact_request_decline, id: 702850
    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 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 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_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    6. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    7. test_1_1_chat_edit_message, id: 702855
    Device sessions

    8. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

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

    @VolodLytvynenko
    Copy link
    Contributor

    hi @J-Son89 thank you for PR. No issues from my side. Ready to be merged

    @J-Son89 J-Son89 merged commit a8303db into develop Jul 28, 2023
    2 checks passed
    @J-Son89 J-Son89 deleted the jc/theming-4 branch July 28, 2023 09:36
    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.

    8 participants