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

[#16755] - Network routing component #17457

Merged
merged 24 commits into from
Oct 26, 2023
Merged

Conversation

ulisesmac
Copy link
Contributor

fixes #16755

Summary

Implement the network routing component with its animation to select a new amount and supports any amount of networks.

Designs
Video of the animation

Supoort for different bars:
image
image
image

Video using 4 bars (sorry, bad video quality):
Screencast from 2023-09-29 19-13-22.webm

Testing notes

This PR is not implementing the tooltip on top of the bar since it's only presented in the animation video, not in the figma componet file. It'll be added separately.

Additionally, I'm faking a call to get new amounts for each network, so:

  • The call takes a random time to return (between 750ms and 5secs), to simulate a network delay
  • The call sometimes returns negative amounts, it will break the component, it's not important since the real call won't do it, so please, keep it in mind while testing.
  • This call is only used in the preview screen, so adding more effort on making it better doesn't worth it.

Platforms

  • Android
  • iOS

Steps to test

  • Open Status
  • Go to Preview Components -> Wallet -> Network routing
  • Test with different amount of networks

status: ready

@ulisesmac ulisesmac self-assigned this Sep 29, 2023
@ulisesmac ulisesmac force-pushed the 16755-network-routing-component branch from c827b5a to f5b4fb2 Compare September 29, 2023 10:19
@status-im-auto
Copy link
Member

status-im-auto commented Sep 29, 2023

Jenkins Builds

Click to see older builds (38)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f5b4fb2 #2 2023-09-29 10:25:45 ~5 min android 🤖apk 📲
✔️ f5b4fb2 #2 2023-09-29 10:26:24 ~6 min android-e2e 🤖apk 📲
✔️ f5b4fb2 #2 2023-09-29 10:28:43 ~8 min tests 📄log
✔️ f2acbbf #3 2023-10-02 11:50:24 ~5 min android-e2e 🤖apk 📲
✔️ f2acbbf #3 2023-10-02 11:50:40 ~5 min android 🤖apk 📲
✔️ f2acbbf #3 2023-10-02 11:51:43 ~6 min ios 📱ipa 📲
✔️ f2acbbf #3 2023-10-02 11:53:53 ~9 min tests 📄log
✔️ cd1847f #4 2023-10-02 12:51:58 ~6 min android-e2e 🤖apk 📲
✔️ cd1847f #4 2023-10-02 12:52:15 ~6 min android 🤖apk 📲
✔️ cd1847f #4 2023-10-02 12:53:32 ~7 min ios 📱ipa 📲
✔️ cd1847f #4 2023-10-02 12:56:18 ~10 min tests 📄log
✔️ 49199d4 #5 2023-10-02 13:11:19 ~6 min android-e2e 🤖apk 📲
✔️ 49199d4 #5 2023-10-02 13:11:20 ~6 min android 🤖apk 📲
✔️ 49199d4 #5 2023-10-02 13:12:12 ~7 min ios 📱ipa 📲
✔️ 49199d4 #5 2023-10-02 13:16:47 ~11 min tests 📄log
✔️ e439128 #6 2023-10-03 07:01:56 ~6 min android-e2e 🤖apk 📲
✔️ e439128 #6 2023-10-03 07:01:59 ~6 min android 🤖apk 📲
✔️ e439128 #6 2023-10-03 07:02:19 ~6 min ios 📱ipa 📲
✔️ e439128 #6 2023-10-03 07:04:36 ~8 min tests 📄log
✔️ 2c1e13c #7 2023-10-14 00:48:52 ~6 min android-e2e 🤖apk 📲
✔️ 2c1e13c #7 2023-10-14 00:48:59 ~6 min android 🤖apk 📲
✔️ 2c1e13c #7 2023-10-14 00:51:24 ~8 min tests 📄log
✔️ 2c1e13c #7 2023-10-14 00:53:52 ~11 min ios 📱ipa 📲
✔️ ae2b48c #8 2023-10-16 23:26:19 ~6 min android-e2e 🤖apk 📲
✔️ ae2b48c #8 2023-10-16 23:26:28 ~6 min android 🤖apk 📲
✔️ ae2b48c #8 2023-10-16 23:30:07 ~9 min ios 📱ipa 📲
✔️ 3e149e0 #9 2023-10-16 23:41:43 ~9 min android 🤖apk 📲
✔️ 3e149e0 #9 2023-10-16 23:41:55 ~9 min android-e2e 🤖apk 📲
✔️ 3e149e0 #9 2023-10-16 23:43:13 ~10 min tests 📄log
✔️ 3e149e0 #9 2023-10-16 23:44:28 ~12 min ios 📱ipa 📲
✔️ eba504b #10 2023-10-17 23:36:47 ~6 min android-e2e 🤖apk 📲
✔️ eba504b #10 2023-10-17 23:36:53 ~6 min android 🤖apk 📲
✔️ eba504b #10 2023-10-17 23:39:15 ~8 min tests 📄log
✔️ eba504b #10 2023-10-17 23:41:52 ~11 min ios 📱ipa 📲
✔️ e43efb5 #11 2023-10-25 20:34:04 ~5 min ios 📱ipa 📲
✔️ e43efb5 #11 2023-10-25 20:34:22 ~6 min android-e2e 🤖apk 📲
✔️ e43efb5 #11 2023-10-25 20:34:30 ~6 min android 🤖apk 📲
✔️ e43efb5 #11 2023-10-25 20:38:48 ~10 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f896f54 #12 2023-10-25 22:03:32 ~6 min android-e2e 🤖apk 📲
✔️ f896f54 #12 2023-10-25 22:04:48 ~7 min android 🤖apk 📲
✔️ f896f54 #12 2023-10-25 22:08:16 ~10 min tests 📄log
✔️ f896f54 #12 2023-10-25 22:08:19 ~10 min ios 📱ipa 📲
✔️ 10f7c00 #13 2023-10-26 21:29:04 ~5 min ios 📱ipa 📲
✔️ 10f7c00 #13 2023-10-26 21:32:59 ~9 min android-e2e 🤖apk 📲
✔️ 10f7c00 #13 2023-10-26 21:33:12 ~9 min android 🤖apk 📲
✔️ 10f7c00 #13 2023-10-26 21:34:02 ~10 min tests 📄log

@ulisesmac
Copy link
Contributor Author

A comment for reviewers:

I've noticed this component has increaased its complexity A LOT just by adding the animations, its design is pretty simple but animations make a big change in the code and logic.

So maybe we should create the components with animations included from the beginning, our delivery time will increase, but now I have the feeling that when we add a component without animations, we are adding a big technical debt.

Anyway, I tried to make this code more readable, separate the animations in another namespace and give a meaninful name to them, I hope this PR is not too complex. 😅

Comment on lines 103 to 109
(js/setTimeout
(fn []
(align-bars-off-screen {:new-network-values new-network-values
:network-bars network-bars
:amount->width amount->width})
(reset-values-fn)
(js/setTimeout #(reset-bars-positions network-bars unlock-press-fn) 100))
Copy link
Member

@briansztamfater briansztamfater Sep 29, 2023

Choose a reason for hiding this comment

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

IMO we should store a reference and cancel timers before creating new ones, also cancel them when component unmounts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are very short living, but I agree 🤔 maybe we could create a common way to clean and set timeouts.

I've just added a mechanisms to track timeouts for this component and also to clean them once they have been used or just before we try to relaunch them.

Could you please check it and provide feedback?
thanks! :)

@briansztamfater
Copy link
Member

briansztamfater commented Sep 29, 2023

@ulisesmac thanks for your amazing work! This component is complex and required many animations, seems you came up with great results 🎉

Based on our requirements I think this PR is missing component tests. Given that this component is complex, testing for basic render and event triggering would be fine.

I added some comments so far, but I'll try the branch locally so I can provide better feedback.

So maybe we should create the components with animations included from the beginning, our delivery time will increase, but now I have the feeling that when we add a component without animations, we are adding a big technical debt.

@ulisesmac In my opinion, it's fine to take extra time to add animations and improve the quality delivered. Of course, we should be smart enough to decide if it's worth the effort, and in this instance, I believe it's worth the effort. In summary, whenever we can raise the quality bar for our components, it's always appreciated. 💪

@ulisesmac
Copy link
Contributor Author

@ulisesmac thanks for your amazing work! This component is complex and required many animations, seems you came up with great results 🎉

Based on our requirements I think this PR is missing component tests. Given that this component is complex, testing for basic render and event triggering would be fine.

I added some comments so far, but I'll try the branch locally so I can provide better feedback.

So maybe we should create the components with animations included from the beginning, our delivery time will increase, but now I have the feeling that when we add a component without animations, we are adding a big technical debt.

@ulisesmac In my opinion, it's fine to take extra time to add animations and improve the quality delivered. Of course, we should be smart enough to decide if it's worth the effort, and in this instance, I believe it's worth the effort. In summary, whenever we can raise the quality bar for our components, it's always appreciated. 💪

Thanks for your review @briansztamfater !

I will add component tests

@ulisesmac ulisesmac requested a review from tumanov-alex October 2, 2023 09:21
@ulisesmac ulisesmac force-pushed the 16755-network-routing-component branch from f5b4fb2 to f2acbbf Compare October 2, 2023 11:44
@ulisesmac
Copy link
Contributor Author

@briansztamfater I solved the comments, could you please review again?
thanks!

@ulisesmac ulisesmac force-pushed the 16755-network-routing-component branch from 49199d4 to e439128 Compare October 3, 2023 06:55
@status-im-auto
Copy link
Member

44% of end-end tests have passed

Total executed tests: 43
Failed tests: 24
Passed tests: 19
IDs of failed tests: 703194,702859,702732,702957,702840,703495,703086,702948,702894,702783,702850,703503,702936,702855,702786,702839,702947,702838,702844,702843,702731,702808,702958,702841 

Failed tests (24)

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_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:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     New messages counter near chats tab button is 1 after unmute, but should be 2
    



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

    [[Data delivery issue]]

    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Device 1: Tap on found: Button
    Device 1: Swiping up

    critical/test_public_chat_browsing.py:359: in test_community_discovery
        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))]))
     Element show-request-to-join-screen-button is different from expected template discovery_join_button.png! 
    

    [[Request to Join Community button color issue: https://github.com//issues/17295]]

    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855

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

    critical/chats/test_1_1_public_chats.py:1192: in test_1_1_chat_edit_message
        self.chat_2.chat_element_by_text(message_before_edit_1_1).wait_for_status_to_be("Delivered")
    ../views/chat_view.py:235: in wait_for_status_to_be
        raise TimeoutException("Message status was not changed to %s, it's %s" % (expected_status, current_status))
     Message status was not changed to Delivered, it's Sent
    



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

    1. test_community_hashtag_links_to_community_channels, id: 702948

    # STEP: Device 1 sends a message with hashtag in the dogs channel
    Device 1: Sending message '#cats'

    critical/test_public_chat_browsing.py:1276: in test_community_hashtag_links_to_community_channels
        self.channel_1.send_message(message_with_hashtag)
    ../views/chat_view.py:995: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:121: 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; 
     RemoteDisconnected
    



    Device sessions

    2. test_community_mentions_push_notification, id: 702786

    Device 2: Find ChatMessageInput by accessibility id: chat-message-input
    Device 2: Type @ to ChatMessageInput

    ../views/chat_view.py:1211: in mention_user
        self.mentions_list.wait_for_element()
    ../views/base_element.py:121: in wait_for_element
        raise TimeoutException(
     Device `2`: `BaseElement` by` accessibility id`: `mentions-list` is not found on the screen after wait_for_element
    
    During handling of the above exception, another exception occurred:
    critical/test_public_chat_browsing.py:1099: in test_community_mentions_push_notification
        self.channel_2.mention_user(self.username_1)
    ../views/chat_view.py:1214: in mention_user
        self.driver.fail("Mentions list is not shown")
    base_test_case.py:179: in fail
        pytest.fail('Device %s: %s' % (self.number, text))
    E   Failed: Device 2: Mentions list is not shown 
    

    [[Issue with username in PN, https://github.com//issues/17396]]

    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

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

    medium/test_activity_center.py:77: in test_activity_center_contact_request_decline
        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))]))
     Username is not shown on 'Add contact' page after entering valid public key
    



    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936

    Device 2: Find Button by xpath: //*[@content-desc='password-input']/../following-sibling::*//*[@text='Join Community']
    Device 2: Tap on found: Button

    Test setup failed: medium/test_activity_center.py:175: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:424: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947

    Test setup failed: medium/test_activity_center.py:175: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:424: in join_community
        self.community_status_joined.wait_for_visibility_of_element(60)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Text by accessibility id:`status-tag-positive` is not found on the screen after wait_for_visibility_of_element
    



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

    [[Data delivery issue]]

    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957

    Device 2: Looking for a message by text: open community
    Device 2: Find BaseElement by xpath: //*[starts-with(@text,'open community')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@text='View']

    Test setup failed: medium/test_activity_center.py:322: in prepare_devices
        self.chat_2.chat_element_by_text(self.community_name).view_community_button.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: BaseElement by xpath: `//*[starts-with(@text,'open community')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@text='View']` 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

    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: medium/test_activity_center.py:322: in prepare_devices
        self.chat_2.chat_element_by_text(self.community_name).view_community_button.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: BaseElement by xpath: `//*[starts-with(@text,'open community')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@text='View']` 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
    



    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    2. test_community_one_image_send_reply, id: 702859

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    3. test_community_emoji_send_copy_paste_reply, id: 702840

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    4. test_community_mark_all_messages_as_read, id: 703086

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    5. test_community_contact_block_unblock_offline, id: 702894

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element 
    

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

    6. test_community_message_delete, id: 702839

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    7. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Attempt 0 is successful clicking close-activity-center
    Device 1: Looking for chat: 'user_2'

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    9. test_community_message_edit, id: 702843

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    10. test_community_unread_messages_badge, id: 702841

    Test setup failed: critical/test_public_chat_browsing.py:574: in prepare_devices
        self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElement by xpath:`//*[@content-desc='author-primary-name'][starts-with(@text,'user_2')]/..` is not found on the screen after wait_for_visibility_of_element
    



    Passed tests (19)

    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

    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 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_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_leave, id: 702845
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    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

    @ilmotta
    Copy link
    Contributor

    ilmotta commented Oct 3, 2023

    A comment for reviewers:

    I've noticed this component has increaased its complexity A LOT just by adding the animations, its design is pretty simple but animations make a big change in the code and logic.

    So maybe we should create the components with animations included from the beginning, our delivery time will increase, but now I have the feeling that when we add a component without animations, we are adding a big technical debt.

    Anyway, I tried to make this code more readable, separate the animations in another namespace and give a meaninful name to them, I hope this PR is not too complex. 😅

    Very good point @ulisesmac.

    In general, I've noticed in status-mobile that animated code often reduces the quality of the UX unless very carefully done. The opposite of higher quality. The added code complexity leads to bugs that are hard to catch, and there have been many fixes merged due to incorrect or bad animations. The increased frequency at which mutations are made to local state tends to reduce the overall performance of the app because more re-renders can be triggered.

    Also, animations tend (not always) to be highly subjective and can change in an instant if designers changes their mind, which is something I think we should be careful at the MVP stage because it causes rework.

    It would be a good idea to counter-balance these forces with a focus on performance from the get go too. In most PRs (not necessarily this one), I see performance as an after thought, even though there are many low hanging fruits. Performant code can't be sprinkled on top of existing code, just as animations can't be easily added on top. See Death by a thousand cuts.

    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.

    @ulisesmac, I noticed some issues with the component, probably due to animations, which just adds to the comment #17457 (comment) I made that I think animations tend to lower the quality of the app .

    1. Drag until the end between two sections and an exception is thrown.

    bug.webm

    2. Weird behavior

    I don't understand the cause, but as I pressed on the component I started to see some animation artifacts, like the red section blinking first.

    device-2023-10-03-085336.webm

    3. The gap can be inconsistent at times

    4. I don't know how, but I managed to see two sliders

    5. Another animation artifact

    Notice the border at the end looks weird after the animation finishes.

    animation.bug.webm

    @ulisesmac ulisesmac force-pushed the 16755-network-routing-component branch from f896f54 to 10f7c00 Compare October 26, 2023 21:23
    @ulisesmac ulisesmac merged commit 1f71883 into develop Oct 26, 2023
    2 checks passed
    @ulisesmac ulisesmac deleted the 16755-network-routing-component branch October 26, 2023 22:07
    @ulisesmac
    Copy link
    Contributor Author

    Merged. More animation issues will be reported in a separate issue with the video provided by designers

    yevh-berdnyk pushed a commit that referenced this pull request Dec 8, 2023
    * Add network routing component & animations
    * Add basic tests and accessibility labels
    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 Wallet: Network Routing component
    10 participants