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

[#18595] Implement collectible header with animations #20024

Merged
merged 1 commit into from
May 17, 2024

Conversation

ulisesmac
Copy link
Contributor

fixes #18595

This PR is the continuation of:

It was merged but it lacks of e2e tests and QA. Also @mohsen-ghafouri found some issues in the compilation.

The PR had dev approvals, in this PR we want to identify and solve the compilation issues

status: WIP

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA May 14, 2024
@ulisesmac ulisesmac changed the title [# ] Implement collectible header with animations [#18595 ] Implement collectible header with animations May 14, 2024
@ulisesmac ulisesmac changed the title [#18595 ] Implement collectible header with animations [#18595] Implement collectible header with animations May 14, 2024
@ulisesmac ulisesmac moved this from REVIEW to E2E Tests in Pipeline for QA May 14, 2024
@ulisesmac
Copy link
Contributor Author

Replying to what @OmarBasem said in the previous PR:

don't we need QA or design review for this PR?

I'm not sure about QA since it is just a visual change, and we implemented this during the offsite, we had Mario's feedback and approval about the animations, behavior and timings.

cc: @J-Son89 wdyt? should we ask for QA and design review?

@ulisesmac
Copy link
Contributor Author

@ajayesivan

We had some issues compiling because of the JS worklet location, but AFAIK it was solved, now @mohsen-ghafouri found a compilation issue 🤔 any idea of what is happening?

@status-im-auto
Copy link
Member

status-im-auto commented May 14, 2024

Jenkins Builds

Click to see older builds (24)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 614a1af #2 2024-05-14 18:51:36 ~6 min tests 📄log
✔️ 614a1af #2 2024-05-14 18:53:00 ~7 min android-e2e 🤖apk 📲
✔️ 614a1af #2 2024-05-14 18:53:01 ~7 min android 🤖apk 📲
✔️ 614a1af #2 2024-05-14 18:54:23 ~8 min ios 📱ipa 📲
✔️ 9bb696a #3 2024-05-15 07:39:22 ~8 min tests 📄log
✔️ 9bb696a #3 2024-05-15 07:39:50 ~9 min ios 📱ipa 📲
✔️ 9bb696a #3 2024-05-15 07:44:40 ~14 min android-e2e 🤖apk 📲
✔️ 9bb696a #3 2024-05-15 07:44:46 ~14 min android 🤖apk 📲
✔️ d23f1c8 #4 2024-05-15 08:32:13 ~5 min tests 📄log
✔️ d23f1c8 #4 2024-05-15 08:32:21 ~6 min android 🤖apk 📲
✔️ d23f1c8 #4 2024-05-15 08:35:41 ~9 min android-e2e 🤖apk 📲
✔️ d23f1c8 #4 2024-05-15 08:35:48 ~9 min ios 📱ipa 📲
✔️ 2cb518e #5 2024-05-15 09:30:21 ~4 min tests 📄log
✔️ 2cb518e #5 2024-05-15 09:33:12 ~7 min android-e2e 🤖apk 📲
✔️ 2cb518e #5 2024-05-15 09:35:25 ~9 min android 🤖apk 📲
✔️ 2cb518e #5 2024-05-15 09:35:32 ~9 min ios 📱ipa 📲
✔️ b36d655 #6 2024-05-15 09:43:42 ~5 min android-e2e 🤖apk 📲
✔️ b36d655 #6 2024-05-15 09:44:01 ~6 min tests 📄log
✔️ b36d655 #6 2024-05-15 09:46:19 ~8 min ios 📱ipa 📲
✔️ b36d655 #6 2024-05-15 09:47:28 ~9 min android 🤖apk 📲
✔️ cdb071f #7 2024-05-15 15:43:48 ~5 min tests 📄log
✔️ cdb071f #7 2024-05-15 15:48:03 ~9 min ios 📱ipa 📲
✔️ cdb071f #7 2024-05-15 15:49:08 ~10 min android-e2e 🤖apk 📲
✔️ cdb071f #7 2024-05-15 15:49:09 ~10 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 89eaabd #8 2024-05-15 15:56:27 ~6 min tests 📄log
✔️ 89eaabd #8 2024-05-15 15:58:59 ~9 min ios 📱ipa 📲
✔️ 89eaabd #8 2024-05-15 16:01:49 ~12 min android-e2e 🤖apk 📲
✔️ 89eaabd #8 2024-05-15 16:02:03 ~12 min android 🤖apk 📲
✔️ af29ae3 #10 2024-05-17 04:06:12 ~4 min tests 📄log
✔️ af29ae3 #10 2024-05-17 04:07:22 ~5 min android 🤖apk 📲
✔️ af29ae3 #10 2024-05-17 04:08:50 ~7 min android-e2e 🤖apk 📲
✔️ af29ae3 #10 2024-05-17 04:09:57 ~8 min ios 📱ipa 📲

@status-im-auto
Copy link
Member

85% of end-end tests have passed

Total executed tests: 52
Failed tests: 6
Expected to fail tests: 2
Passed tests: 44
IDs of failed tests: 727230,704613,727229,702807,727232,702775 
IDs of expected to fail tests: 703495,703503 

Failed tests (6)

Click to expand
  • Rerun failed tests

  • Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    # STEP: Checking that the new wallet is added to the Share QR Code menu
    Device 1: Find `Button` by `accessibility id`: `show-qr-button`

    critical/test_wallet.py:197: in test_wallet_add_remove_watch_only_account
        self.home_view.show_qr_code_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: Button by accessibility id: `show-qr-button` 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

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613

    Device 1: Find Button by xpath: //*[@text="open community"]
    Device 1: Tap on found: Button

    critical/test_deep_and_universal_links.py:70: in test_links_open_universal_links_from_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Community 'Open community for e2e' was not requested to join by the url https://status.app/c/G1AAAGR0G-IRb2YJD4lRXwLusAFnGrDHGNl6Wt55MIARwVYvarnO873011-fdVSz1kHSan-qq0G96vOaMqyTRhJnQV74KCUr#zQ3shb9irJR66rhG1E8sQZX8pDU3dpGm4daYSmPVDd2e73ewE
    



    Device sessions

    2. test_links_deep_links, id: 702775

    Device 1: Find BrowserTab by accessibility id: browser-stack-tab
    Device 1: Tap on found: BrowserTab

    critical/test_deep_and_universal_links.py:114: in test_links_deep_links
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Community 'Open community for e2e' was not requested to join by the deep link status.app://c/G1AAAGR0G-IRb2YJD4lRXwLusAFnGrDHGNl6Wt55MIARwVYvarnO873011-fdVSz1kHSan-qq0G96vOaMqyTRhJnQV74KCUr#zQ3shb9irJR66rhG1E8sQZX8pDU3dpGm4daYSmPVDd2e73ewE
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    # STEP: Getting ETH amount in the wallet of the sender before transaction
    Device 1: Find WalletTab by accessibility id: wallet-stack-tab

    critical/test_wallet.py:117: in test_wallet_send_asset_from_drawer
        sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
    critical/test_wallet.py:39: in _get_balances_before_tx
        self.wallet_1.wallet_tab.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: WalletTab by accessibility id: `wallet-stack-tab` 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
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Swiping right on element SlideButton
    Device 1: Find SlideButton by xpath: //*[@resource-id='slide-button-track']

    critical/test_wallet.py:109: in test_wallet_send_eth
        self.wallet_1.send_asset(address=self.receiver['address'], asset_name='Ether', amount=amount_to_send)
    ../views/wallet_view.py:99: in send_asset
        self.confirm_transaction()
    ../views/wallet_view.py:86: in confirm_transaction
        self.slide_and_confirm_with_password()
    ../views/wallet_view.py:80: in slide_and_confirm_with_password
        self.slide_button_track.slide()
    ../views/base_view.py:257: in slide
        self.swipe_right_on_element(width_percentage=1.3, start_x=100)
    ../views/base_element.py:308: in swipe_right_on_element
        location, size = self.get_element_coordinates()
    ../views/base_element.py:294: in get_element_coordinates
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: SlideButton by xpath: `//*[@resource-id='slide-button-track']` 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 TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807

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

    critical/chats/test_group_chat.py:95: in test_group_chat_join_send_text_messages_push
        self.chats[1].chat_element_by_text(message_to_admin).wait_for_status_to_be('Delivered', timeout=120)
    ../views/chat_view.py:225: 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

    Expected to fail tests (2)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495

    # STEP: Change device time so chat will be unmuted by timer
    Device 2: Long press on ChatElement

    critical/chats/test_group_chat.py:464: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Chat is still muted after timeout 
    

    [[Chat is not unmuted after expected time: https://github.com//issues/19627]]

    Device sessions

    Passed tests (44)

    Click to expand

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

    6. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    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 TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    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_offline_pn, id: 702808
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    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_edit_delete_message_when_offline, id: 704615
    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_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    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

    @J-Son89
    Copy link
    Member

    J-Son89 commented May 14, 2024

    Replying to what @OmarBasem said in the previous PR:

    don't we need QA or design review for this PR?

    I'm not sure about QA since it is just a visual change, and we implemented this during the offsite, we had Mario's feedback and approval about the animations, behavior and timings.

    cc: @J-Son89 wdyt? should we ask for QA and design review?

    Since it's a large pr and we had design feedback already maybe it's best to get merged and we can adjust minor details as part of a larger ensign review?

    @OmarBasem
    Copy link
    Member

    OmarBasem commented May 15, 2024

    Replying to what @OmarBasem said in the previous PR:

    don't we need QA or design review for this PR?

    I'm not sure about QA since it is just a visual change, and we implemented this during the offsite, we had Mario's feedback and approval about the animations, behavior and timings.

    cc: @J-Son89 wdyt? should we ask for QA and design review?

    If the PR is just adjusting some visuals, and had no previous problems with animation performance then fine. Otherwise, better go through QA imo.

    @ajayesivan
    Copy link
    Contributor

    @ajayesivan

    We had some issues compiling because of the JS worklet location, but AFAIK it was solved, now @mohsen-ghafouri found a compilation issue 🤔 any idea of what is happening?

    Not sure whats going on. I didn't face any issues while development. I will check and update you.

    @ajayesivan ajayesivan force-pushed the 18595-collectible-header branch 2 times, most recently from 9bb696a to d23f1c8 Compare May 15, 2024 08:25
    @ajayesivan
    Copy link
    Contributor

    ajayesivan commented May 15, 2024

    Running this PR was throwing the flowing error on launch,
    image

    This issue was due to the requires in the wallet_connect/utils.cljs file being sorted incorrectly.

    (ns status-im.contexts.wallet.wallet-connect.utils
    ;; NOTE: Not sorting namespaces since @walletconnect/react-native-compat should be the first
    #_{:clj-kondo/ignore [:unsorted-required-namespaces]}
    (:require ["@walletconnect/react-native-compat"]
    ["@walletconnect/core" :refer [Core]]
    ["@walletconnect/web3wallet" :refer [Web3Wallet]]
    ["@walletconnect/utils" :refer [buildApprovedNamespaces]]
    [status-im.config :as config]
    [utils.i18n :as i18n]))

    even though #_{:clj-kondo/ignore [:unsorted-required-namespaces]} is added running make lint-fix is sorting it.

    cc: @mohsen-ghafouri

    :title collectible-name
    :description collection-name
    :theme theme}]
    [reanimated/scroll-view
    Copy link
    Member

    Choose a reason for hiding this comment

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

    hi, why this is reanimated view instead of simple view?

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Hi @Parveshdhull !

    If you are referring to the reanimated/scroll-view, the reason is we are capturing its on-scroll callback to animate a shared-value, since we wanted it to properly report the data, I thought it was better to use the reanimated one.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    hi Thank you for giving the context.
    Most probably we will not get any benefit using reanimated here, unless we are using animated-scroll-handler something like

    :on-scroll (reanimated/use-animated-scroll-handler

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Thanks for the suggestion, I'll try removing it and using a normal scroll view to check if it behaves the same 👍

    );

    export function useLayerOpacity(sharedValue, from, to) {
    return useAnimatedStyle(() => ({
    Copy link
    Member

    Choose a reason for hiding this comment

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

    This approach has few drawbacks.

    1. I am not sure if situation is changed, but changes in js code were not visible until app restarted
    2. Also for consistency we should stick to a single approach. If we use this approach everywhere we will have three files, view, simple style, and animated style, for all animations and we have several animations.

    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 am not sure if situation is changed, but changes in js code were not visible until app restarted

    It hasn't changed 😢 and I know, it's a shame that we need to restart the app, I'm not sure if the REPL works to reload the JS requires.

    Also for consistency we should stick to a single approach. If we use this approach everywhere we will have three files, view, simple style, and animated style, for all animations and we have several animations.

    Yes, I'm not a big fan of this approach too, that's why I first tried to solve it in a different way:

    although, I don't exactly like it, it solves the following existing problems:

    1. We are always transforming CLJS styles to JS (which we know is expensive)
    2. apply-animations-to-style is using a hook inside, but devs don't know it, and we can find A LOT of usages of this hook as a regular function, so it's not declared at the beginning, for example.
    3. Our interpolate-value is not just a call to reanimated's interpolate (which is just a regular function), it hides a hook (useDerivedValue) so it has the same problems as mentioned in 2 Additionally, we are making the code more complex, since instead of interpolate directly inside a useAnimatedStyle, we generate derived values with our interpolate. transform CLJS -> JS values, then pass them to apply-animations-to-style and transform them again.

    To show the complexity added because of our wrappers, take a look at this piece of code (taken from the PR I mentioned, it is/was used to animate the avatar size).

    With our wrappers

    (defn f-avatar
      [...]
      ;; Interpolate, which is creating a derived value, it's a hook but looks as a regular function
      (let [image-scale-animation       (reanimated/interpolate scroll-y
                                                                scroll-animation-input-range
                                                                [1 0.4]
                                                                header-extrapolation-option)
            ;; 2nd interpolate usage, CLJS->JS transform, and useDerivedValue hook implied
            image-top-margin-animation  (reanimated/interpolate scroll-y
                                                                scroll-animation-input-range
                                                                [0 20]
                                                                header-extrapolation-option)
            ;; 3rd interpolate usage, CLJS->JS transform, and useDerivedValue hook implied
            image-side-margin-animation (reanimated/interpolate scroll-y
                                                                scroll-animation-input-range
                                                                [0 -20]
                                                                header-extrapolation-option)
            theme                       (quo.theme/get-theme)]
        [reanimated/view
         ;; `style/avatar-container` Looks just as a regular function, but it is/was using
         ;; `apply-animations-to-style`, which is terrible, because that's a hook, and we
         ;; aren't declaring it at the top, also it looks as a style fn, but it does more.
         {:style (style/avatar-container theme
                                         image-scale-animation
                                         image-top-margin-animation
                                         image-side-margin-animation)}
         ...]))

    Without our wrappers

    (defn f-avatar
      [...]
      (let [theme            (quo.theme/get-theme)
            avatar-animation (worklets/use-avatar-animation scroll-y input-range #js[1 0.4] #js[0 20] #[0 -20])]
        [reanimated/view {:style [(style/avatar-container theme) ;; <- actually only styles
                                  avatar-animation]}
         ...]))
    export function useAvatarAnimation(scrollY, inputRange, range1, range2, range3) {
      return useAnimatedStyles(() => (
          {
            transform: [
    // Simplifyed calcs, maybe there were some other operations, but we can perform the interpolate here
    // No need of extra sharedValues created with `useDerivedValue`
              {scale: interpolate(scrollY.value, inputRange.value, range1)},
              {translateX: interpolate(scrollY.value, inputRange.value, range2)},
              {translateX: interpolate(scrollY.value, inputRange.value, range3)}
            ]
          })
      )
    }

    The code is smaller and more straightforward, additionally, we are following the recommended practices for hooks.

    @Parveshdhull WDYT?

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Thank you very much for sharing detailed explanation and example.

    From your example, it seems for the use case of interpolate it looks simpler to just define whole style in js.
    But for other use case, I think we should use wrapper for now.
    Otherwise we will lose the ability of hot reloading style related changes. And debugging and developing will be harder.

    apply-animations-to-style is using a hook inside, but devs don't know it, and we can find A LOT of usages of this hook as a regular function, so it's not declared at the beginning,

    I think this problem can be easily solved. We just need to communicate to devs and add to guideline.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    There's already a standard in react to prefix hooks with 'use-'

    Copy link
    Member

    Choose a reason for hiding this comment

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

    We probably should rename this wrapper then. thank you @J-Son89

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    @Parveshdhull we could:

    1. Rename the wrappers adding use-... to the ones that involve a hook and keep using them.
    2. Be aware that sometimes writing a worklet directly in JS may be cleaner and simpler in terms of code, so we can take the JS approach, for example, for complex animations (like the ones having multiple interpolations).

    wdyt?

    I've tried to create worklets in CLJS in different ways and I've got partially working results. I'm just trying to find a way to improve our animated code and API 🙃

    Copy link
    Member

    Choose a reason for hiding this comment

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

    sounds good to me. Thank you for looking into this.

    @ulisesmac
    Copy link
    Contributor Author

    @OmarBasem

    If the PR is just adjusting some visuals, and had no previous problems with animation performance then fine. Otherwise, better go through QA imo.

    The animation perf is good 👍 so yeah, let's skip QA for this one

    @ulisesmac ulisesmac marked this pull request as ready for review May 15, 2024 15:38
    @ulisesmac ulisesmac moved this from E2E Tests to REVIEW in Pipeline for QA May 15, 2024
    @ulisesmac ulisesmac moved this from REVIEW to E2E Tests in Pipeline for QA May 15, 2024
    @ulisesmac
    Copy link
    Contributor Author

    @status-im/mobile-qa We'll skip QA for this one, but could you please make sure the e2e test are passing? thanks!

    @status-im-auto
    Copy link
    Member

    71% of end-end tests have passed

    Total executed tests: 52
    Failed tests: 13
    Expected to fail tests: 2
    Passed tests: 37
    
    IDs of failed tests: 702777,702745,702731,702730,702855,702813,702733,727230,702869,703391,727229,702807,702782 
    
    IDs of expected to fail tests: 703503,703495 
    

    Failed tests (13)

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    2. test_1_1_chat_pin_messages, id: 702731

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    3. test_1_1_chat_message_reaction, id: 702730

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    4. test_1_1_chat_edit_message, id: 702855

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    5. test_1_1_chat_push_emoji, id: 702813

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    6. test_1_1_chat_text_message_delete_push_disappear, id: 702733

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    7. test_1_1_chat_send_image_save_and_share, id: 703391

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    8. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Test setup failed: critical/chats/test_1_1_public_chats.py:20: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:328: in create_shared_drivers
        raise e
    base_test_case.py:318: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 1: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 1: Text is 0.99046 ETH

    critical/test_wallet.py:129: in test_wallet_send_asset_from_drawer
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:100: in _check_balances_after_tx
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Eth amount in the receivers wallet is 0.001 but should be 0.0011
    E    Eth amount in the senders wallet is 0.9905 but should be 0.4904
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 1: Text is 0.49046 ETH

    critical/test_wallet.py:114: in test_wallet_send_eth
        self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
    critical/test_wallet.py:100: in _check_balances_after_tx
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Eth amount in the receivers wallet is 0.001 but should be 0.0011
    E    Eth amount in the senders wallet is 0.4905 but should be 0.4904
    



    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807

    Device 2: Tap on found: Text
    Device 2: Find Text by xpath: //*[starts-with(@text,'Hey, admin!')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView

    critical/chats/test_group_chat.py:95: in test_group_chat_join_send_text_messages_push
        self.chats[1].chat_element_by_text(message_to_admin).wait_for_status_to_be('Delivered', timeout=120)
    ../views/chat_view.py:221: in wait_for_status_to_be
        current_status = self.status
    ../views/chat_view.py:209: in status
        status = status_element.text
    ../views/base_element.py:416: in text
        text = self.find_element().text
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Text by xpath: `//*[starts-with(@text,'Hey, admin!')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView` 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

    Class TestCommunityOneDeviceMerged:

    1. test_community_undo_delete_message, id: 702869

    Device 1: Tap on found: Button
    Device 1: Looking for a message by text: message to delete and undo

    critical/chats/test_public_chat_browsing.py:116: in test_community_undo_delete_message
        self.channel.chat_element_by_text(message_to_delete).wait_for_visibility_of_element()
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: ChatElementByText by xpath:`//*[starts-with(@text,'message to delete and undo')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:118: in test_community_undo_delete_message
        pytest.fail("Message was not restored by clicking 'Undo' button")
    E   Failed: Message was not restored by clicking 'Undo' button
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777

    Device 2: Tap on found: LogInButton
    ## Signed in successfully!

    activity_center/test_activity_center.py:176: in test_add_contact_field_validation
        self.loop.run_until_complete(run_in_parallel(((_device_1_creates_user, {}),
    /usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
        return future.result()
    __init__.py:52: in run_in_parallel
        returns.append(await k)
    /usr/lib/python3.10/concurrent/futures/thread.py:58: in run
        result = self.fn(*self.args, **self.kwargs)
    activity_center/test_activity_center.py:166: in _device_1_creates_user
        self.profile_1.driver.reset()
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/extensions/applications.py:299: in reset
        self.execute(Command.RESET)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: Cannot start the 'im.status.ethereum.pr' application. Consider checking the driver's troubleshooting documentation. Original error: Error executing adbExec. Original error: 'Command '/home/chef/android-sdk-linux/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n im.status.ethereum.pr/im.status.ethereum.MainActivity -S' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'im.status.ethereum.pr' application. Consider checking the driver's troubleshooting documentation. Original error: Error executing adbExec. Original error: 'Command '/home/chef/android-sdk-linux/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n im.status.ethereum.pr/im.status.ethereum.MainActivity -S' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability
    E       at getResponseForW3CError (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/protocol/errors.js:1073:9)
    E       at asyncHandler (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/protocol/protocol.js:491:57)
    



    Device sessions

    Expected to fail tests (2)

    Click to expand

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495

    # STEP: Change device time so chat will be unmuted by timer
    Device 2: Long press on ChatElement

    critical/chats/test_group_chat.py:464: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:190: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Chat is still muted after timeout 
    

    [[Chat is not unmuted after expected time: https://github.com//issues/19627]]

    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Passed tests (37)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    3. test_community_message_delete, id: 702839
    Device sessions

    4. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    5. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    6. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    9. test_community_one_image_send_reply, id: 702859
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    11. test_community_message_edit, id: 702843
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_offline_pn, id: 702808
    Device sessions

    2. test_group_chat_pin_messages, id: 702732
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    4. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_mentions_push_notification, id: 702786
    Device sessions

    3. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    4. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    5. test_community_leave, id: 702845
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    2. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    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 TestCommunityOneDeviceMerged:

    1. test_community_mute_community_and_channel, id: 703382
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    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 TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    2. test_wallet_add_remove_watch_only_account, id: 727232
    Device sessions

    Copy link
    Contributor

    @ajayesivan ajayesivan left a comment

    Choose a reason for hiding this comment

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

    Tested on iOS. LGTM!

    @status-im-auto
    Copy link
    Member

    69% of end-end tests have passed

    Total executed tests: 13
    Failed tests: 4
    Expected to fail tests: 0
    Passed tests: 9
    
    IDs of failed tests: 727230,703391,727229,702807 
    

    Failed tests (4)

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_send_image_save_and_share, id: 703391

    Device 2: Click system back button
    Device 2: Looking for a message by text: test image

    critical/chats/test_1_1_public_chats.py:413: in test_1_1_chat_send_image_save_and_share
        self.chat_2.chat_element_by_text(image_description).wait_for_visibility_of_element(30)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'test image')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    # STEP: Getting ETH amount in the wallet of the sender before transaction
    Device 1: Find WalletTab by accessibility id: wallet-stack-tab

    critical/test_wallet.py:117: in test_wallet_send_asset_from_drawer
        sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
    critical/test_wallet.py:39: in _get_balances_before_tx
        self.wallet_1.wallet_tab.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: WalletTab by accessibility id: `wallet-stack-tab` 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
    



    2. test_wallet_send_eth, id: 727229

    Device 1: Swiping right on element SlideButton
    Device 1: Find SlideButton by xpath: //*[@resource-id='slide-button-track']

    critical/test_wallet.py:109: in test_wallet_send_eth
        self.wallet_1.send_asset(address=self.receiver['address'], asset_name='Ether', amount=amount_to_send)
    ../views/wallet_view.py:99: in send_asset
        self.confirm_transaction()
    ../views/wallet_view.py:86: in confirm_transaction
        self.slide_and_confirm_with_password()
    ../views/wallet_view.py:80: in slide_and_confirm_with_password
        self.slide_button_track.slide()
    ../views/base_view.py:257: in slide
        self.swipe_right_on_element(width_percentage=1.3, start_x=100)
    ../views/base_element.py:308: in swipe_right_on_element
        location, size = self.get_element_coordinates()
    ../views/base_element.py:294: in get_element_coordinates
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: SlideButton by xpath: `//*[@resource-id='slide-button-track']` 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 TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807

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

    critical/chats/test_group_chat.py:95: in test_group_chat_join_send_text_messages_push
        self.chats[1].chat_element_by_text(message_to_admin).wait_for_status_to_be('Delivered', timeout=120)
    ../views/chat_view.py:225: 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

    Passed tests (9)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_edit_message, id: 702855
    Device sessions

    5. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    6. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_undo_delete_message, id: 702869
    Device sessions

    @yevh-berdnyk
    Copy link
    Contributor

    @status-im/mobile-qa We'll skip QA for this one, but could you please make sure the e2e test are passing? thanks!

    Hi @ulisesmac, thanks for the PR! E2E failures are not related

    Co-authored-by: Ajay Sivan <ajayesivan@gmail.com>
    @ajayesivan ajayesivan merged commit e1408f2 into develop May 17, 2024
    6 checks passed
    Pipeline for QA automation moved this from E2E Tests to DONE May 17, 2024
    @ajayesivan ajayesivan deleted the 18595-collectible-header branch May 17, 2024 04:16
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Collectible scroll view header is buggy
    8 participants