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: category quo2 component #16713

Merged
merged 8 commits into from
Jul 21, 2023
Merged

feat: category quo2 component #16713

merged 8 commits into from
Jul 21, 2023

Conversation

OmarBasem
Copy link
Contributor

@OmarBasem OmarBasem commented Jul 18, 2023

fixes: #16211

Summary

This PR implements the settings category component. Opened a separate issue for reorder component: #16712

Designs.

Preview

WhatsApp Image 2023-07-18 at 1 36 00 PM
WhatsApp Image 2023-07-18 at 1 36 01 PM

@J-Son89
Copy link
Contributor

J-Son89 commented Jul 18, 2023

any chance we can add a simple component spec test here :)

@status-im-auto
Copy link
Member

status-im-auto commented Jul 18, 2023

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a3d850c #3 2023-07-18 09:41:51 ~5 min android-e2e 🤖apk 📲
✔️ a3d850c #3 2023-07-18 09:42:03 ~6 min android 🤖apk 📲
✔️ a3d850c #3 2023-07-18 09:42:06 ~6 min ios 📱ipa 📲
✔️ a3d850c #3 2023-07-18 09:44:18 ~8 min tests 📄log
✔️ eb6a3e2 #4 2023-07-18 10:46:54 ~6 min ios 📱ipa 📲
✔️ eb6a3e2 #4 2023-07-18 10:49:27 ~9 min android-e2e 🤖apk 📲
✔️ eb6a3e2 #4 2023-07-18 10:49:30 ~9 min android 🤖apk 📲
✔️ eb6a3e2 #4 2023-07-18 10:49:55 ~9 min tests 📄log
✔️ 8bd2085 #5 2023-07-18 10:58:25 ~5 min android 🤖apk 📲
✔️ 8bd2085 #5 2023-07-18 10:58:58 ~6 min ios 📱ipa 📲
✔️ 8bd2085 #5 2023-07-18 11:01:22 ~8 min android-e2e 🤖apk 📲
✔️ 8bd2085 #5 2023-07-18 11:01:56 ~9 min tests 📄log
✔️ 1f2716c #6 2023-07-18 11:24:06 ~5 min android-e2e 🤖apk 📲
✔️ 1f2716c #6 2023-07-18 11:24:31 ~5 min android 🤖apk 📲
✔️ 1f2716c #6 2023-07-18 11:24:46 ~6 min ios 📱ipa 📲
✔️ 1f2716c #6 2023-07-18 11:26:41 ~7 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 26b6860 #9 2023-07-19 07:54:32 ~5 min android 🤖apk 📲
✔️ 26b6860 #9 2023-07-19 07:55:03 ~6 min android-e2e 🤖apk 📲
✔️ 26b6860 #9 2023-07-19 07:55:14 ~6 min ios 📱ipa 📲
✔️ 26b6860 #9 2023-07-19 07:56:50 ~7 min tests 📄log
✔️ a35489d #10 2023-07-21 05:17:10 ~6 min ios 📱ipa 📲
✔️ a35489d #10 2023-07-21 05:19:54 ~9 min android-e2e 🤖apk 📲
✔️ a35489d #10 2023-07-21 05:19:58 ~9 min android 🤖apk 📲
✔️ a35489d #10 2023-07-21 05:20:25 ~9 min tests 📄log

@OmarBasem OmarBasem requested a review from J-Son89 July 18, 2023 10:51
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.

LGTM 🚀

@OmarBasem
Copy link
Contributor Author

OmarBasem commented Jul 18, 2023

Hi @Francesca-G, can I get a design review, please?

The component can be found in the Quo2.0 Preview. The component is under settings section, named category. The reorder category component will be implemented in another PR. Please let me know if you have any doubts.

Designs.

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.

@OmarBasem here's the Figma frame with the design review for the Category component.

I've also noticed that the blur style is missing, but maybe you're planning on implementing it further on. Hope this helps!

@J-Son89
Copy link
Contributor

J-Son89 commented Jul 18, 2023

Whoops @OmarBasem, @Francesca-G that was my fault about blue type as the issue says to leave it out - that was to keep the scope smaller as the issue was originally being done by an interview candidate. If possible can you include @OmarBasem 🙏

@OmarBasem
Copy link
Contributor Author

If possible can you include @OmarBasem 🙏

Oh sure I will update it now!

@status-im-auto
Copy link
Member

53% of end-end tests have passed

Total executed tests: 36
Failed tests: 17
Passed tests: 19
IDs of failed tests: 702784,702947,702733,702731,702936,702851,702730,702957,703391,702813,702783,702745,702732,703133,702855,702958,702782 

Failed tests (17)

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:433: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact(s) was (were) not restored from backup: MyCustomNickname!
    



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

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947

    Test setup failed: medium/test_activity_center.py:138: in prepare_devices
        self.chat_1.send_message(self.one_to_one_message)
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    2. test_navigation_jump_to, id: 702936

    Device 1: ChatMessageInput element not found
    Device 1: Sending message 'one-t-one message'

    Test setup failed: medium/test_activity_center.py:138: in prepare_devices
        self.chat_1.send_message(self.one_to_one_message)
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    Device sessions

    3. test_activity_center_mentions, id: 702957

    Test setup failed: medium/test_activity_center.py:138: in prepare_devices
        self.chat_1.send_message(self.one_to_one_message)
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    4. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: medium/test_activity_center.py:138: in prepare_devices
        self.chat_1.send_message(self.one_to_one_message)
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    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:111: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.errors.verify_no_errors()
    base_test_case.py:182: 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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    3. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

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

    4. test_1_1_chat_message_reaction, id: 702730

    Device 1: ChatMessageInput element not found
    Device 1: Sending message 'hey'

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    Device sessions

    5. test_1_1_chat_send_image_save_and_share, id: 703391

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    6. test_1_1_chat_push_emoji, id: 702813

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    7. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    8. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    9. test_1_1_chat_edit_message, id: 702855

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    10. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Test setup failed: critical/chats/test_1_1_public_chats.py:857: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:968: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    Passed tests (19)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_one_image_send_reply, id: 702859
    Device sessions

    2. test_community_message_edit, id: 702843
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    6. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_several_images_send_reply, id: 703194
    Device sessions

    9. test_community_leave, id: 702845
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    11. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    12. test_community_message_delete, id: 702839
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    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.

    Hello @OmarBasem

    I switched to your branch, but unfortunately I couldn't test all the variants as in designs. We are usually creating preview screens that allow to customize component's parameters.

    Could you please update the preview screen to make the component customizable?
    i.e., being able to set "Label" to any text, change the list size, add icons/images at the right and left of the items in list to look as the designs, etc.

    Thanks!

    @OmarBasem
    Copy link
    Contributor Author

    Hi @ulisesmac,

    Thanks for reviewing the PR. Sure I can add some customizations to update the text label and number of items. I don't see in the designs more customizations to be added. The component that has icons/images is another component that has another issue #16712

    Just a small note, please use the "request changes" with care as it is not very flexible, especially with our very different timezones. If you see something catastrophic then sure use it :)

    Thank you!

    @ulisesmac
    Copy link
    Contributor

    Thanks for reviewing the PR. Sure I can add some customizations to update the text label and number of items. I don't see in the designs more customizations to be added. The component that has icons/images is another component that has another issue #16712

    OK! nice, please add them :)

    Just a small note, please use the "request changes" with care as it is not very flexible, especially with our very different timezones. If you see something catastrophic then sure use it :)

    Yes, I know @OmarBasem, since this PR had been already approved, I just wanted to make sure this is fixed before merging :)

    @OmarBasem
    Copy link
    Contributor Author

    OmarBasem commented Jul 19, 2023

    @OmarBasem here's the Figma frame with the design review for the Category component.

    Thanks for your review @Francesca-G !
    The blur style was initially out of scope, but I added it now.

    @OmarBasem OmarBasem requested a review from ulisesmac July 19, 2023 07:46
    Comment on lines +10 to +22

    (defn items
    [theme blur?]
    {:margin-top 12
    :border-radius 16
    :background-color (if blur?
    colors/white-opa-5
    (colors/theme-colors colors/white colors/neutral-95 theme))
    :border-width 1
    :border-color (if blur?
    colors/white-opa-5
    (colors/theme-colors colors/neutral-10 colors/neutral-80 theme))})

    Copy link
    Contributor Author

    @OmarBasem OmarBasem Jul 19, 2023

    Choose a reason for hiding this comment

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

    @J-Son89 out of scope for this PR, but I think we need to update the colors/theme-colors method to accept an optional third color as light, dark and blur as some parts of the app can have 3 themes like settings

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    I was discussing this with @ulisesmac before, he was against the idea. Do you still have the same opinion @ulisesmac ?

    Copy link
    Contributor

    @J-Son89 J-Son89 Jul 19, 2023

    Choose a reason for hiding this comment

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

    also it's 4 - light, dark light with blur, dark with blur.

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    @J-Son89 I still think it might be a little confusing, but I would accept it now.

    So, go ahead if you think is a good approach 👍

    @pavloburykh
    Copy link
    Contributor

    @OmarBasem please let us know when review comments will be resolved and and PR will be ready for manual QA. Thanx!

    @OmarBasem
    Copy link
    Contributor Author

    Hi @pavloburykh, this is just a quo2 component.

    @OmarBasem
    Copy link
    Contributor Author

    OmarBasem commented Jul 20, 2023

    @ulisesmac PR is awaiting your review

    @pavloburykh
    Copy link
    Contributor

    Hi @pavloburykh, this is just a quo2 component.

    Got it! I thought there was a label Request manual QA. But now I see there is no.

    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.

    Thank you so much @OmarBasem 👍👍👍

    @OmarBasem OmarBasem merged commit 76eea91 into develop Jul 21, 2023
    2 checks passed
    @OmarBasem OmarBasem deleted the quo2/category branch July 21, 2023 06:13
    @OmarBasem OmarBasem restored the quo2/category branch July 24, 2023 05:39
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Implement quo2 - Settings - Category component
    7 participants