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

fix (fn[]) usage in hiccup #15713

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Conversation

flexsurfer
Copy link
Member

@flexsurfer flexsurfer commented Apr 21, 2023

fixes: #15703

also safe-area replaced by constants, now it can be used in any place as
(safe-area/get-insets)

I've seen a few places where :f> (fn [] was used two times in the same component, so I'm not sure these components will work as expected after this change cc @OmarBasem

@flexsurfer flexsurfer self-assigned this Apr 21, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Apr 21, 2023

Jenkins Builds

Click to see older builds (51)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c9f7a63 #1 2023-04-21 12:28:09 ~7 min android 🤖apk 📲
✔️ c9f7a63 #1 2023-04-21 12:28:50 ~7 min android-e2e 🤖apk 📲
c9f7a63 #1 2023-04-21 12:28:53 ~7 min tests 📄log
✔️ c9f7a63 #1 2023-04-21 12:30:19 ~9 min ios 📱ipa 📲
✔️ 8ffa2ae #2 2023-04-24 10:19:28 ~5 min android-e2e 🤖apk 📲
✔️ 8ffa2ae #2 2023-04-24 10:21:16 ~7 min android 🤖apk 📲
8ffa2ae #2 2023-04-24 10:21:28 ~7 min tests 📄log
✔️ 8ffa2ae #2 2023-04-24 10:21:41 ~7 min ios 📱ipa 📲
✔️ 5cc470d #4 2023-04-24 10:49:54 ~5 min android-e2e 🤖apk 📲
✔️ 5cc470d #4 2023-04-24 10:50:01 ~5 min android 🤖apk 📲
5cc470d #4 2023-04-24 10:50:49 ~6 min tests 📄log
✔️ 5cc470d #4 2023-04-24 10:50:50 ~6 min ios 📱ipa 📲
✔️ ec38eb7 #5 2023-04-24 11:28:03 ~5 min android 🤖apk 📲
✔️ ec38eb7 #5 2023-04-24 11:28:47 ~6 min ios 📱ipa 📲
ec38eb7 #5 2023-04-24 11:29:10 ~6 min tests 📄log
✔️ ec38eb7 #5 2023-04-24 11:29:22 ~6 min android-e2e 🤖apk 📲
✔️ 179593d #6 2023-04-24 12:16:48 ~5 min android-e2e 🤖apk 📲
✔️ 179593d #6 2023-04-24 12:17:29 ~6 min ios 📱ipa 📲
✔️ 179593d #6 2023-04-24 12:17:40 ~6 min android 🤖apk 📲
179593d #6 2023-04-24 12:17:46 ~6 min tests 📄log
✔️ fa8c119 #7 2023-04-24 13:03:46 ~5 min android-e2e 🤖apk 📲
✔️ fa8c119 #7 2023-04-24 13:04:37 ~6 min android 🤖apk 📲
✔️ fa8c119 #7 2023-04-24 13:05:24 ~7 min ios 📱ipa 📲
✔️ fa8c119 #7 2023-04-24 13:05:34 ~7 min tests 📄log
76d8561 #8 2023-04-25 09:09:56 ~3 min tests 📄log
✔️ 76d8561 #8 2023-04-25 09:12:15 ~5 min android 🤖apk 📲
✔️ 76d8561 #8 2023-04-25 09:12:58 ~6 min ios 📱ipa 📲
✔️ 76d8561 #8 2023-04-25 09:13:30 ~6 min android-e2e 🤖apk 📲
✔️ a5f0853 #9 2023-04-25 09:21:08 ~5 min android 🤖apk 📲
✔️ a5f0853 #9 2023-04-25 09:21:17 ~5 min android-e2e 🤖apk 📲
✔️ a5f0853 #9 2023-04-25 09:21:20 ~5 min tests 📄log
✔️ a5f0853 #9 2023-04-25 09:21:49 ~6 min ios 📱ipa 📲
✔️ 78ff43f #11 2023-04-25 10:02:57 ~5 min tests 📄log
✔️ 78ff43f #11 2023-04-25 10:03:26 ~6 min android-e2e 🤖apk 📲
✔️ 78ff43f #11 2023-04-25 10:03:35 ~6 min android 🤖apk 📲
✔️ 78ff43f #11 2023-04-25 10:03:36 ~6 min ios 📱ipa 📲
✔️ 7b39f0c #12 2023-04-25 11:05:49 ~5 min android 🤖apk 📲
✔️ 7b39f0c #12 2023-04-25 11:06:21 ~5 min android-e2e 🤖apk 📲
✔️ 7b39f0c #12 2023-04-25 11:07:32 ~7 min tests 📄log
✔️ 7b39f0c #12 2023-04-25 11:08:46 ~8 min ios 📱ipa 📲
f7691c0 #13 2023-04-25 11:49:38 ~11 sec android-e2e 📄log
f7691c0 #13 2023-04-25 11:49:38 ~11 sec android 📄log
f7691c0 #13 2023-04-25 11:49:41 ~11 sec tests 📄log
6cc76ed #14 2023-04-25 11:51:58 ~11 sec android-e2e 📄log
6cc76ed #14 2023-04-25 11:52:03 ~12 sec android 📄log
6cc76ed #14 2023-04-25 11:52:03 ~12 sec tests 📄log
6cc76ed #14 2023-04-25 11:55:04 ~3 min ios 📄log
9267431 #15 2023-04-25 12:05:51 ~2 min ios 📄log
e4e6510 #16 2023-04-25 12:11:41 ~5 min ios 📄log
✔️ e4e6510 #16 2023-04-25 12:17:19 ~11 min android-e2e 🤖apk 📲
✔️ e4e6510 #16 2023-04-25 12:21:34 ~15 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
9f2720f #17 2023-04-25 12:24:35 ~1 min ios 📄log
✔️ 9f2720f #17 2023-04-25 12:35:32 ~12 min android 🤖apk 📲
✔️ 9f2720f #17 2023-04-25 12:35:55 ~13 min tests 📄log
✔️ 9f2720f #17 2023-04-25 12:36:32 ~13 min android-e2e 🤖apk 📲
9f2720f #18 2023-04-25 12:52:19 ~1 min ios 📄log
9f2720f #19 2023-04-25 12:55:59 ~1 min ios 📄log
9f2720f #20 2023-04-25 12:58:17 ~1 min ios 📄log
2cca524 #21 2023-04-25 13:03:17 ~2 min ios 📄log
✔️ 2cca524 #18 2023-04-25 13:06:42 ~5 min tests 📄log
✔️ 2cca524 #18 2023-04-25 13:07:13 ~6 min android 🤖apk 📲
✔️ 2cca524 #18 2023-04-25 13:07:14 ~6 min android-e2e 🤖apk 📲

@ibrkhalil
Copy link
Contributor

ibrkhalil commented Apr 24, 2023

Is it worth it creating a macro for the f-COMP function?
Personally I think it’d make it harder to miss this best practice.

Maybe to have something like

(defn my-comp [args]
(rf/create-functional-component :my-comp args))

@flexsurfer
Copy link
Member Author

Is it worth it creating a macro for the f-COMP function? Personally I think it’d make it harder to miss this best practice.

Maybe to have something like

(defn my-comp [args]
(rf/create-functional-component :my-comp args))

yes, that was my first thought, but I'm not sure

@flexsurfer flexsurfer force-pushed the feature/fix-fn-usage-in-hiccup branch from c9f7a63 to 8ffa2ae Compare April 24, 2023 10:13
@flexsurfer flexsurfer changed the title [WIP] fix (fn[]) usage in hiccup fix (fn[]) usage in hiccup Apr 24, 2023
@flexsurfer
Copy link
Member Author

cc @J-Son89 for components test

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, awesome job 🎉

src/mocks/js_dependencies.cljs Outdated Show resolved Hide resolved
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.

Great work, thanks @flexsurfer!

<rant>
It's so unfortunate that Reagent is causing this much trouble. I wish it could support functional components by default without this horrible :f> thing, just like newer libraries do, which were built for React hooks from the get-go, like Helix https://github.com/lilactown/helix/blob/master/docs/motivation.md. It's not the only problem in Reagent though...
</rant>

Is it worth it creating a macro for the f-COMP function?

Indeed @OmarBasem, this is quite common. In Helix there is the defnc aka defn component, which takes care of normalizing some stuff to help devs.

@flexsurfer
Copy link
Member Author

yeah, reagent needs some love from contributors, I feel like its poorly maintained after the author had abandoned it :(

@ilmotta
Copy link
Contributor

ilmotta commented Apr 24, 2023

@flexsurfer, the pattern you established here is worthy of the guidelines. Could you please add a section there?

@status-im-auto
Copy link
Member

0% of end-end tests have passed

Total executed tests: 25
Failed tests: 25
Passed tests: 0
Not executed tests: 4
IDs of not executed tests: 702846,702742,702850,702851 
IDs of failed tests: 702947,702840,702733,702958,702855,702732,702844,702745,702730,702782,702786,702894,702783,702807,702845,702841,702936,702957,702731,702839,702808,702838,702843,702813,702784 

Not executed tests (4)

Click to expand
  • Rerun not executed tests
  • Failed tests (25)

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Test setup failed: critical/chats/test_group_chat.py:153: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    2. test_group_chat_join_send_text_messages_push, id: 702807

    Device 3: EditBox element not found
    Device 3: Find EditBox by accessibility id: profile-title-input

    Test setup failed: critical/chats/test_group_chat.py:153: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Device sessions

    3. test_group_chat_offline_pn, id: 702808

    Test setup failed: critical/chats/test_group_chat.py:153: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    2. test_1_1_chat_edit_message, id: 702855

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    4. test_1_1_chat_message_reaction, id: 702730

    Device 1: EditBox element not found
    Device 1: Find EditBox by accessibility id: profile-title-input

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    7. test_1_1_chat_pin_messages, id: 702731

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    8. test_1_1_chat_push_emoji, id: 702813

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    9. test_1_1_chat_delete_via_long_press_relogin, id: 702784

    Test setup failed: critical/chats/test_1_1_public_chats.py:910: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947

    Test setup failed: medium/test_activity_center.py:186: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    2. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: medium/test_activity_center.py:186: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen 
    

    [[Blocked by 15500]]

    3. test_navigation_jump_to, id: 702936

    Device 1: EditBox element not found
    Device 1: Find EditBox by accessibility id: profile-title-input

    Test setup failed: medium/test_activity_center.py:186: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    Device sessions

    4. test_activity_center_mentions, id: 702957

    Test setup failed: medium/test_activity_center.py:186: in prepare_devices
        self.loop.run_until_complete(
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen 
    

    [[Blocked by 15500]]

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    3. test_community_mentions_push_notification, id: 702786

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    4. test_community_contact_block_unblock_offline, id: 702894

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    5. test_community_leave, id: 702845

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    6. test_community_unread_messages_badge, id: 702841

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    7. test_community_message_delete, id: 702839

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    8. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 1: EditBox element not found
    Device 1: Find EditBox by accessibility id: profile-title-input

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen 
    

    [[blocked by 14797]]

    Device sessions

    9. test_community_message_edit, id: 702843

    Test setup failed: critical/test_public_chat_browsing.py:362: in prepare_devices
        self.loop.run_until_complete(run_in_parallel(((self.device_1.create_user, {'enable_notifications': True}),
    /usr/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
        return future.result()
    __init__.py:36: 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)
    ../views/sign_in_view.py:212: in create_user
        self.set_profile(username)
    ../views/sign_in_view.py:200: in set_profile
        self.profile_your_name_edit_box.set_value(username)
    ../views/base_element.py:352: in set_value
        self.find_element().set_value(value)
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: EditBox by accessibility id: `profile-title-input` is not found on the screen
    



    @flexsurfer
    Copy link
    Member Author

    @flexsurfer, the pattern you established here is worthy of the guidelines. Could you please add a section there?

    its already here https://github.com/status-im/status-mobile/pull/15686/files#diff-b5e21cecfbe129756a13073f455833097d90938c8367957243f550fe8d76e567R39

    @ilmotta
    Copy link
    Contributor

    ilmotta commented Apr 24, 2023

    @flexsurfer, the pattern you established here is worthy of the guidelines. Could you please add a section there?

    its already here https://github.com/status-im/status-mobile/pull/15686/files#diff-b5e21cecfbe129756a13073f455833097d90938c8367957243f550fe8d76e567R39

    Sorry I didn't explain correctly. I mean in this PR you named functional components with the prefix f-. It'd be good to have this in the guidelines since it's a strong convention. In the guidelines, the name of the function example is not following the new f- prefix convention.

    @flexsurfer
    Copy link
    Member Author

    flexsurfer commented Apr 24, 2023

    so, it seems like its better to use :f> keyword, in that case, we separate components with hooks, and it's better to move ratoms outside the f- component, so we have ratoms and hooks separation

    @flexsurfer
    Copy link
    Member Author

    Sorry I didn't explain correctly. I mean in this PR you named functional components with the prefix f-. It'd be good to have this in the guidelines since it's a strong convention. In the guidelines, the name of the function example is not following the new f- prefix convention.

    done

    @flexsurfer flexsurfer force-pushed the feature/fix-fn-usage-in-hiccup branch from fa8c119 to 76d8561 Compare April 25, 2023 09:06
    @qoqobolo qoqobolo self-assigned this Apr 25, 2023
    @status-im-auto
    Copy link
    Member

    90% of end-end tests have passed

    Total executed tests: 29
    Failed tests: 3
    Passed tests: 26
    
    IDs of failed tests: 702840,702850,702838 
    

    Failed tests (3)

    Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

    Device 2: Find `Button` by `accessibility id`: `tab-recent`
    Device 2: Tap on found: Button

    medium/test_activity_center.py:142: in test_activity_center_contact_request_decline
        self.errors.verify_no_errors()
    base_test_case.py:184: 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 
    

    [[Blocked by 15500]]

    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840

    Device 1: Find RepliedMessageText by xpath: //*[starts-with(@text,'test message')]/preceding::android.widget.TextView[@content-desc='quoted-message']
    Device 1: RepliedMessageText is 🏄🏻‍♂️

    critical/test_public_chat_browsing.py:482: in test_community_emoji_send_copy_paste_reply
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Emoji message was not copied
    



    Device sessions

    2. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:418: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:923: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Passed tests (26)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    2. test_community_mentions_push_notification, id: 702786
    Device sessions

    3. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_unread_messages_badge, id: 702841
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_edit, id: 702843
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    9. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    4. test_activity_center_mentions, id: 702957
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    Comment on lines 209 to 273
    (let [{:keys [transparent? set-full-height?]} args
    shared-element-id (rf/sub [:shared-element-id])
    exit-lightbox-signal (rf/sub [:lightbox/exit-signal])
    zoom-out-signal (rf/sub [:lightbox/zoom-out-signal])
    focused? (= shared-element-id message-id)
    curr-orientation (or (rf/sub [:lightbox/orientation])
    orientation/portrait)
    portrait? (= curr-orientation orientation/portrait)
    dimensions (utils/get-dimensions
    (or image-width c/default-dimension)
    (or image-height c/default-duration)
    curr-orientation
    args)
    animations {:scale (anim/use-val c/min-scale)
    :saved-scale (anim/use-val c/min-scale)
    :pan-x-start (anim/use-val c/init-offset)
    :pan-x (anim/use-val c/init-offset)
    :pan-y-start (anim/use-val c/init-offset)
    :pan-y (anim/use-val c/init-offset)
    :pinch-x-start (anim/use-val c/init-offset)
    :pinch-x (anim/use-val c/init-offset)
    :pinch-y-start (anim/use-val c/init-offset)
    :pinch-y (anim/use-val c/init-offset)
    :pinch-x-max (anim/use-val js/Infinity)
    :pinch-y-max (anim/use-val js/Infinity)
    :rotate (anim/use-val c/init-rotation)
    :rotate-scale (anim/use-val c/min-scale)}
    props {:pan-x-enabled? (reagent/atom false)
    :pan-y-enabled? (reagent/atom false)
    :focal-x (reagent/atom nil)
    :focal-y (reagent/atom nil)}
    rescale (fn [value exit?]
    (utils/rescale-image value
    exit?
    dimensions
    animations
    props))]
    (rn/use-effect (fn []
    (js/setTimeout #(reset! set-full-height? true) 500)))
    (when platform/ios?
    (utils/handle-orientation-change curr-orientation focused? dimensions animations props)
    (utils/handle-exit-lightbox-signal exit-lightbox-signal
    index
    (anim/get-val (:scale animations))
    rescale
    set-full-height?))
    (utils/handle-zoom-out-signal zoom-out-signal index (anim/get-val (:scale animations)) rescale)
    (let [tap (tap-gesture #(on-tap portrait?))
    double-tap
    (double-tap-gesture dimensions animations rescale transparent? #(on-tap portrait?))
    pinch
    (pinch-gesture dimensions animations props rescale transparent? #(on-tap portrait?))
    pan-x (pan-x-gesture dimensions animations props rescale)
    pan-y (pan-y-gesture dimensions animations props rescale)
    composed-gestures (gesture/exclusive
    (gesture/simultaneous pinch pan-x pan-y)
    (gesture/exclusive double-tap tap))]
    [gesture/gesture-detector {:gesture composed-gestures}
    [reanimated/view
    {:style (style/container dimensions
    animations
    @set-full-height?
    (= curr-orientation orientation/portrait))}
    [reanimated/fast-image
    {:source {:uri (:image content)}
    Copy link
    Contributor

    @OmarBasem OmarBasem Apr 25, 2023

    Choose a reason for hiding this comment

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

    The component was previously two functions. It now has become one function, isn't this going to cause unnecessary re-renders?

    And we now have a second let binding in the same function, which makes it redundant, right?

    (defn lightbox
    (defn f-lightbox
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    same thing here

    Copy link
    Contributor

    @OmarBasem OmarBasem left a comment

    Choose a reason for hiding this comment

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

    I just tested the PR builds. Please roll back the parts in zoomable-image and lightbox that have nested functional components. It is not working as expected. I can refactor it in a separate issue.

    @flexsurfer flexsurfer force-pushed the feature/fix-fn-usage-in-hiccup branch from 6cc76ed to 9267431 Compare April 25, 2023 12:02
    @flexsurfer
    Copy link
    Member Author

    @OmarBasem done

    Comment on lines 110 to 111
    (defn photo-selector
    (defn f-photo-selector
    [{:keys [scroll-enabled on-scroll]}]
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    and photo-selector please

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    done

    @flexsurfer flexsurfer force-pushed the feature/fix-fn-usage-in-hiccup branch from 9f2720f to 2cca524 Compare April 25, 2023 13:00
    @flexsurfer flexsurfer merged commit cd69d04 into develop Apr 25, 2023
    @flexsurfer flexsurfer deleted the feature/fix-fn-usage-in-hiccup branch April 25, 2023 13:13
    jakubgs added a commit that referenced this pull request May 8, 2023
    Contains changes that should have been included in:
    #15713
    
    Signed-off-by: Jakub Sokołowski <jakub@status.im>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    fix all anonymous inline function in hiccup
    9 participants