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: implement quo2 code-snippet-preview component #17235

Merged

Conversation

codemaster115
Copy link
Contributor

fixes #17233

Summary

Quo2/Code Snippet Preview component
Design: https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile?type=design&node-id=28894-24838&mode=design&t=eNCyL8Y9Z2aVfVsk-4

Platforms

  • Android
  • iOS

Steps to test

You can check it on the preview screen

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Sep 8, 2023

Jenkins Builds

Click to see older builds (61)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d797bb4 #1 2023-09-08 14:05:56 ~9 min android 🤖apk 📲
✔️ d797bb4 #1 2023-09-08 14:06:10 ~10 min android-e2e 🤖apk 📲
✔️ d797bb4 #1 2023-09-08 14:06:48 ~10 min ios 📱ipa 📲
✔️ d797bb4 #1 2023-09-08 14:07:00 ~10 min tests 📄log
✔️ 9230994 #2 2023-09-13 18:11:58 ~6 min ios 📱ipa 📲
✔️ 9230994 #2 2023-09-13 18:12:05 ~6 min android-e2e 🤖apk 📲
✔️ 9230994 #2 2023-09-13 18:12:06 ~6 min android 🤖apk 📲
✔️ 9230994 #2 2023-09-13 18:15:08 ~9 min tests 📄log
✔️ b3e02ed #3 2023-09-14 17:35:59 ~6 min ios 📱ipa 📲
✔️ b3e02ed #3 2023-09-14 17:37:42 ~7 min android 🤖apk 📲
✔️ b3e02ed #3 2023-09-14 17:37:53 ~7 min android-e2e 🤖apk 📲
✔️ b3e02ed #3 2023-09-14 17:39:19 ~9 min tests 📄log
✔️ 80d78d3 #4 2023-09-15 12:04:30 ~6 min ios 📱ipa 📲
✔️ 80d78d3 #4 2023-09-15 12:04:51 ~6 min android-e2e 🤖apk 📲
✔️ 80d78d3 #4 2023-09-15 12:04:55 ~6 min android 🤖apk 📲
✔️ 80d78d3 #4 2023-09-15 12:07:57 ~9 min tests 📄log
✔️ 0cf9538 #5 2023-09-18 14:48:37 ~5 min android-e2e 🤖apk 📲
✔️ 0cf9538 #5 2023-09-18 14:49:05 ~5 min ios 📱ipa 📲
✔️ 0cf9538 #5 2023-09-18 14:51:07 ~8 min android 🤖apk 📲
✔️ 0cf9538 #5 2023-09-18 14:52:27 ~9 min tests 📄log
✔️ 65d7a95 #6 2023-09-18 23:42:21 ~6 min ios 📱ipa 📲
✔️ 65d7a95 #6 2023-09-18 23:45:43 ~9 min android-e2e 🤖apk 📲
✔️ 65d7a95 #6 2023-09-18 23:45:56 ~10 min android 🤖apk 📲
✔️ 65d7a95 #6 2023-09-18 23:46:24 ~10 min tests 📄log
✔️ 970b5ae #7 2023-09-19 13:53:46 ~6 min android-e2e 🤖apk 📲
✔️ 970b5ae #7 2023-09-19 13:55:33 ~7 min ios 📱ipa 📲
✔️ 970b5ae #7 2023-09-19 13:56:14 ~8 min android 🤖apk 📲
✔️ 970b5ae #7 2023-09-19 13:57:56 ~10 min tests 📄log
1c04301 #9 2023-09-19 16:24:27 ~2 min tests 📄log
✔️ 1c04301 #9 2023-09-19 16:27:27 ~5 min android-e2e 🤖apk 📲
✔️ 1c04301 #9 2023-09-19 16:27:38 ~5 min android 🤖apk 📲
✔️ 1c04301 #9 2023-09-19 16:27:56 ~6 min ios 📱ipa 📲
3d144e4 #10 2023-09-19 16:44:04 ~2 min tests 📄log
✔️ 3d144e4 #10 2023-09-19 16:47:38 ~6 min android-e2e 🤖apk 📲
✔️ 3d144e4 #10 2023-09-19 16:47:55 ~6 min ios 📱ipa 📲
✔️ 3d144e4 #10 2023-09-19 16:48:00 ~6 min android 🤖apk 📲
✔️ 3d144e4 #11 2023-09-19 17:03:32 ~8 min tests 📄log
✔️ 2bbaa09 #11 2023-09-20 11:43:38 ~6 min android-e2e 🤖apk 📲
✔️ 2bbaa09 #11 2023-09-20 11:43:46 ~6 min android 🤖apk 📲
✔️ 2bbaa09 #11 2023-09-20 11:43:53 ~6 min ios 📱ipa 📲
✔️ 2bbaa09 #12 2023-09-20 11:46:00 ~8 min tests 📄log
✔️ bd78b3e #12 2023-09-20 12:26:34 ~6 min android 🤖apk 📲
✔️ bd78b3e #12 2023-09-20 12:28:17 ~7 min ios 📱ipa 📲
✔️ bd78b3e #12 2023-09-20 12:28:38 ~8 min android-e2e 🤖apk 📲
✔️ bd78b3e #13 2023-09-20 12:29:48 ~9 min tests 📄log
✔️ fb02e5c #13 2023-09-20 14:01:47 ~6 min android-e2e 🤖apk 📲
✔️ fb02e5c #13 2023-09-20 14:01:50 ~6 min android 🤖apk 📲
✔️ fb02e5c #13 2023-09-20 14:02:45 ~7 min ios 📱ipa 📲
✔️ fb02e5c #14 2023-09-20 14:04:14 ~8 min tests 📄log
✔️ 313dbc7 #15 2023-09-21 13:02:07 ~5 min android-e2e 🤖apk 📲
✔️ 313dbc7 #15 2023-09-21 13:04:50 ~8 min android 🤖apk 📲
✔️ 313dbc7 #15 2023-09-21 13:05:56 ~9 min ios 📱ipa 📲
✔️ 313dbc7 #16 2023-09-21 13:07:26 ~10 min tests 📄log
✔️ c0242e3 #16 2023-09-21 18:50:18 ~6 min android-e2e 🤖apk 📲
✔️ c0242e3 #16 2023-09-21 18:50:21 ~6 min android 🤖apk 📲
✔️ c0242e3 #17 2023-09-21 18:53:15 ~9 min tests 📄log
✔️ c0242e3 #16 2023-09-21 18:53:54 ~10 min ios 📱ipa 📲
✔️ 493ffed #18 2023-09-25 13:34:05 ~6 min android-e2e 🤖apk 📲
✔️ 493ffed #18 2023-09-25 13:34:08 ~6 min android 🤖apk 📲
✔️ 493ffed #18 2023-09-25 13:34:50 ~6 min ios 📱ipa 📲
✔️ 493ffed #19 2023-09-25 13:37:31 ~9 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3e58f78 #19 2023-09-25 18:31:43 ~5 min ios 📱ipa 📲
✔️ 3e58f78 #19 2023-09-25 18:35:14 ~9 min android-e2e 🤖apk 📲
✔️ 3e58f78 #19 2023-09-25 18:35:29 ~9 min android 🤖apk 📲
✔️ 3e58f78 #20 2023-09-25 18:36:23 ~10 min tests 📄log
✔️ 0ff956f #20 2023-09-26 20:47:51 ~6 min android 🤖apk 📲
✔️ 0ff956f #20 2023-09-26 20:47:55 ~6 min android-e2e 🤖apk 📲
✔️ 0ff956f #20 2023-09-26 20:48:01 ~6 min ios 📱ipa 📲
✔️ 0ff956f #21 2023-09-26 20:50:11 ~8 min tests 📄log

@codemaster115 codemaster115 changed the title feat: implement quo2 code snippet preview component feat: implement quo2 code-snippet-preview component Sep 8, 2023
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.

Hi @codemaster115
Thanks for the PR! :)

I added a comment about code structure, I think it's important to solve so I will mark this as "request changes"

@codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch 4 times, most recently from 80d78d3 to 0cf9538 Compare September 18, 2023 14:42
@codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from f8756e0 to 970b5ae Compare September 19, 2023 13:47
@codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch 4 times, most recently from bd78b3e to fb02e5c Compare September 20, 2023 13:55
Copy link
Member

@Parveshdhull Parveshdhull left a comment

Choose a reason for hiding this comment

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

lgtm

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.

Thanks for the PR! :)

src/quo2/components/code/common/view.cljs Outdated Show resolved Hide resolved
src/quo2/components/code/snippet/view.cljs Show resolved Hide resolved
src/quo2/components/code/snippet_preview/view.cljs Outdated Show resolved Hide resolved
@codemaster115
Copy link
Contributor Author

codemaster115 commented Sep 21, 2023

Thanks for the PR! :)

All resolved in this PR. @ulisesmac

@codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from 3564f7f to 313dbc7 Compare September 21, 2023 12:56
@codemaster115
Copy link
Contributor Author

@Francesca-G I am asking for design review directly since it's just quo2 component implementation.

@churik
Copy link
Member

churik commented Sep 21, 2023

@codemaster115
according to https://github.com/status-im/status-mobile/blob/develop/doc/pipeline_process.md :

Move PR to the E2E column when it is ready for testing (mandatory for all PRs). That will also trigger e2e tests run. QAs are monitoring PRs from E2E column and take it into test.

Please, follow the guidelines, thank you!

@status-im-auto
Copy link
Member

72% of end-end tests have passed

Total executed tests: 43
Failed tests: 12
Passed tests: 31
IDs of failed tests: 702732,702813,702948,702894,702745,702783,703503,703202,702786,702947,702731,702808 

Failed tests (12)

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]]

    2. test_group_chat_reactions, id: 703202

    Device 3: Adding one more 'thumbs-up' reaction or removing an added one
    Device 3: Find Button by accessibility id: emoji-reaction-2

    critical/chats/test_group_chat.py:246: in test_group_chat_reactions
        self.chats[2].add_remove_same_reaction(message=message, emoji="thumbs-up")
    ../views/chat_view.py:1076: in add_remove_same_reaction
        element.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 3: Button by accessibility id: `emoji-reaction-2` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    Device sessions

    3. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:442: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Messages PN was not fetched from offline
    E    message from old member if not shown for device 0
    E    message from new member if not shown for device 0
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_push_emoji, id: 702813

    Device 1: Tap on found: Button
    # STEP: Check Device 1 is actually on chat

    critical/chats/test_1_1_public_chats.py:1173: in test_1_1_chat_push_emoji
        self.device_1.driver.fail("Failed to open chat view after tap on PN")
    base_test_case.py:179: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
     Device 1: Failed to open chat view after tap on PN
    



    Device sessions

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

    critical/chats/test_1_1_public_chats.py:1128: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        self.errors.verify_no_errors()
    base_test_case.py:191: 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

    3. test_1_1_chat_pin_messages, id: 702731

    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 1: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 1: Looking for a message by text: Hurray! unblocked

    critical/test_public_chat_browsing.py:967: in test_community_contact_block_unblock_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Hurray! unblocked was not received in public chat after user unblock! 
    

    [[Message can be missed after unblock: https://github.com//issues/16873]]

    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_hashtag_links_to_community_channels, id: 702948

    Device 1: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 1: Looking for a message by text: #cats

    critical/test_public_chat_browsing.py:1284: in test_community_hashtag_links_to_community_channels
        self.chat_1.chat_element_by_text(message_with_hashtag).click_on_link_inside_message_body()
    ../views/chat_view.py:188: in click_on_link_inside_message_body
        self.message_body.wait_for_visibility_of_element(30)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Text by xpath:`//android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'#cats')]` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_community_mentions_push_notification, id: 702786

    # STEP: Invited member gets push notification with the mention and tap it
    Device 2: Getting PN by 'user_2'

    critical/test_public_chat_browsing.py:1149: in test_community_mentions_push_notification
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Push notification with the mention was not received by admin
    E    Can not edit a message with a mention
    E    Push notification with the mention was not received by the invited member 
    

    [[Issue with username in PN, issue #6 in 15500]]

    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] https://github.com//issues/17175]]

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947

    Device 1: Find Button by accessibility id: close-activity-center
    Device 1: Tap on found: Button

    None; 
     RemoteDisconnected
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Device 2: Find Text by xpath: //*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Delivered

    critical/chats/test_1_1_public_chats.py:1416: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message was not delivered after resending from offline
    



    Device sessions

    Passed tests (31)

    Click to expand

    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_join_send_text_messages_push, id: 702807
    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_edit_message, id: 702855
    Device sessions

    4. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    5. test_1_1_chat_message_reaction, id: 702730
    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 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_message_delete, id: 702839
    Device sessions

    6. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    7. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    9. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_leave, id: 702845
    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 TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    @codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from 313dbc7 to c0242e3 Compare September 21, 2023 18:43
    @codemaster115
    Copy link
    Contributor Author

    @churik Will you be responsible to review end-to-end test for this PR?

    @churik
    Copy link
    Member

    churik commented Sep 22, 2023

    e2e failures are known and not related to PR.

    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.

    Here's the design review :)

    @codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from 45f26d8 to 493ffed Compare September 25, 2023 13:27
    @codemaster115
    Copy link
    Contributor Author

    @Francesca-G Please review resolved implementation.

    @codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from 493ffed to 3e58f78 Compare September 25, 2023 18:25
    @codemaster115 codemaster115 force-pushed the 17233-quo2-implement-code-snippet-preview-component branch from 3e58f78 to 0ff956f Compare September 26, 2023 20:41
    @codemaster115 codemaster115 merged commit 96f476f into develop Sep 26, 2023
    6 checks passed
    @codemaster115 codemaster115 deleted the 17233-quo2-implement-code-snippet-preview-component branch September 26, 2023 21:41
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Quo2: Implement Code Snippet Preview component
    7 participants