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

Update UI for Sign In by Syncing and Add Scan or Enter pairing Code to in app syncing flow #15623

Merged
merged 1 commit into from
May 15, 2023

Conversation

J-Son89
Copy link
Contributor

@J-Son89 J-Son89 commented Apr 12, 2023

The Onboarding Syncing flow and In app syncing flow is the same except for the background.
This pr refactors the onboarding syncing screens so that it can be reused for both onboarding and in app syncing flows.

Also I adjust the onboarding syncing page as the background was not showing correctly.

To test:
Ensure the onboarding Syncing flows are working as expect. (i.e "sign in")

Also you can test the syncing flows by going
profile -> Syncing -> big blue "+" button and then "Scan or enter pairing code" button at the bottom of the "Pair devices to sync" page.

Screenshot 2023-04-11 at 14 30 12

@J-Son89 J-Son89 changed the title Jc/sync auth 3 WIP: Jc/sync auth 3 Apr 12, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Apr 12, 2023

Jenkins Builds

Click to see older builds (48)
Commit #️⃣ Finished (UTC) Duration Platform Result
e0be444 #1 2023-04-12 09:48:00 ~27 sec android 📄log
e0be444 #1 2023-04-12 09:48:29 ~56 sec android-e2e 📄log
e0be444 #1 2023-04-12 09:49:11 ~1 min tests 📄log
e0be444 #1 2023-04-12 10:05:57 ~18 min ios 📄log
6c16b04 #2 2023-04-12 10:14:41 ~3 min tests 📄log
✔️ 6c16b04 #2 2023-04-12 10:17:26 ~5 min android 🤖apk 📲
✔️ 6c16b04 #2 2023-04-12 10:17:32 ~6 min android-e2e 🤖apk 📲
✔️ 6c16b04 #2 2023-04-12 10:21:51 ~10 min ios 📱ipa 📲
fbe11a5 #3 2023-04-12 13:29:33 ~4 min tests 📄log
✔️ fbe11a5 #3 2023-04-12 13:30:59 ~5 min android 🤖apk 📲
✔️ fbe11a5 #3 2023-04-12 13:31:41 ~6 min android-e2e 🤖apk 📲
✔️ fbe11a5 #3 2023-04-12 13:32:11 ~7 min ios 📱ipa 📲
2e244f3 #4 2023-04-12 21:51:57 ~3 min tests 📄log
✔️ 2e244f3 #4 2023-04-12 21:53:39 ~5 min android-e2e 🤖apk 📲
✔️ 2e244f3 #4 2023-04-12 21:53:39 ~5 min android 🤖apk 📲
✔️ 2e244f3 #4 2023-04-12 21:55:33 ~7 min ios 📱ipa 📲
9301aa5 #5 2023-04-12 22:16:14 ~3 min tests 📄log
✔️ 9301aa5 #5 2023-04-12 22:17:39 ~5 min android 🤖apk 📲
✔️ 9301aa5 #5 2023-04-12 22:17:50 ~5 min android-e2e 🤖apk 📲
✔️ 9301aa5 #5 2023-04-12 22:19:11 ~6 min ios 📱ipa 📲
9f5b161 #6 2023-04-12 23:04:58 ~4 min tests 📄log
✔️ 9f5b161 #6 2023-04-12 23:06:18 ~5 min android-e2e 🤖apk 📲
✔️ 9f5b161 #6 2023-04-12 23:06:21 ~5 min android 🤖apk 📲
✔️ 9f5b161 #6 2023-04-12 23:07:58 ~7 min ios 📱ipa 📲
0aec045 #7 2023-04-14 09:27:37 ~3 min tests 📄log
✔️ 0aec045 #7 2023-04-14 09:29:33 ~5 min android-e2e 🤖apk 📲
✔️ 0aec045 #7 2023-04-14 09:29:50 ~5 min android 🤖apk 📲
✔️ 0aec045 #7 2023-04-14 09:30:47 ~6 min ios 📱ipa 📲
703967c #8 2023-04-14 09:36:29 ~3 min tests 📄log
✔️ 703967c #8 2023-04-14 09:39:31 ~6 min android 🤖apk 📲
✔️ 703967c #8 2023-04-14 09:39:32 ~6 min android-e2e 🤖apk 📲
✔️ 703967c #8 2023-04-14 09:40:04 ~6 min ios 📱ipa 📲
✔️ 09e00e8 #9 2023-04-21 14:19:44 ~5 min android 🤖apk 📲
✔️ 09e00e8 #9 2023-04-21 14:20:01 ~6 min tests 📄log
✔️ 09e00e8 #9 2023-04-21 14:20:45 ~6 min ios 📱ipa 📲
✔️ 09e00e8 #9 2023-04-21 14:21:39 ~7 min android-e2e 🤖apk 📲
✔️ 33859bb #10 2023-04-21 14:31:28 ~5 min android-e2e 🤖apk 📲
✔️ 33859bb #10 2023-04-21 14:31:35 ~5 min android 🤖apk 📲
✔️ 33859bb #10 2023-04-21 14:32:20 ~6 min ios 📱ipa 📲
✔️ 33859bb #10 2023-04-21 14:32:50 ~6 min tests 📄log
✔️ 424be00 #11 2023-04-24 09:12:44 ~5 min android 🤖apk 📲
✔️ 424be00 #11 2023-04-24 09:13:07 ~5 min android-e2e 🤖apk 📲
✔️ 424be00 #11 2023-04-24 09:13:16 ~5 min tests 📄log
✔️ 424be00 #11 2023-04-24 09:13:48 ~6 min ios 📱ipa 📲
✔️ 02de8c2 #13 2023-05-10 10:02:44 ~6 min ios 📱ipa 📲
✔️ 02de8c2 #13 2023-05-10 10:09:33 ~13 min tests 📄log
✔️ 02de8c2 #13 2023-05-10 10:12:06 ~15 min android 🤖apk 📲
✔️ 02de8c2 #13 2023-05-10 10:12:34 ~16 min android-e2e 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 14ef0d7 #14 2023-05-15 10:29:45 ~5 min android 🤖apk 📲
✔️ 14ef0d7 #14 2023-05-15 10:30:30 ~6 min android-e2e 🤖apk 📲
✔️ 14ef0d7 #14 2023-05-15 10:31:15 ~7 min ios 📱ipa 📲
✔️ 14ef0d7 #14 2023-05-15 10:31:27 ~7 min tests 📄log
✔️ fb96453 #15 2023-05-15 17:01:09 ~6 min android 🤖apk 📲
✔️ fb96453 #15 2023-05-15 17:01:29 ~6 min android-e2e 🤖apk 📲
✔️ fb96453 #15 2023-05-15 17:01:45 ~6 min tests 📄log
✔️ fb96453 #15 2023-05-15 17:03:03 ~7 min ios 📱ipa 📲

@J-Son89 J-Son89 force-pushed the jc/sync-auth-3 branch 2 times, most recently from 6c16b04 to fbe11a5 Compare April 12, 2023 13:24
@J-Son89 J-Son89 force-pushed the jc/sync-auth-3 branch 5 times, most recently from 0aec045 to 703967c Compare April 14, 2023 09:32
@flexsurfer flexsurfer changed the title WIP: Jc/sync auth 3 [WIP] Jc/sync auth 3 Apr 17, 2023
@J-Son89 J-Son89 changed the title [WIP] Jc/sync auth 3 Update UI for Sign In by Syncing and Add Scan or Enter pairing Code to in app syncing flow Apr 21, 2023
:camera-options {:zoomMode :off}
:scan-barcode true
:on-read-code on-read-code}]]
[rn/view {:width size :height size :justify-content :space-between}
Copy link
Contributor

Choose a reason for hiding this comment

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

this alignment looks weird

Copy link
Member

Choose a reason for hiding this comment

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

should set styles in :style prop

:text (i18n/label
:t/camera-permission-denied)}])}]))]
[:f>
(fn []
Copy link
Member

Choose a reason for hiding this comment

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

(fn [] should be never used in the hiccup. for proper usage, you have to rename view to f-view and used it with [:f>

(defn- border
[border1 border2 corner]
[rn/view
(assoc {:border-color colors/white :width 80 :height 80} border1 2 border2 2 corner 16)])
Copy link
Member

Choose a reason for hiding this comment

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

{:style

Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

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

@J-Son89 - The PR looks good!

I have one question regarding the behaviour of the Camera.

The camera renders within the viewfinder which is different to current UI behaviour of rendering the camera in fullscreen behind the blur. Is this a expected?

Existing behaviour New change

If we don't need to render the camera fullscreen, we can remove the holeview usage and qr-view-finder calculation.

@J-Son89
Copy link
Contributor Author

J-Son89 commented Apr 24, 2023

@J-Son89 - The PR looks good!

I have one question regarding the behaviour of the Camera.

The camera renders within the viewfinder which is different to current UI behaviour of rendering the camera in fullscreen behind the blur. Is this a expected?

Existing behaviour New change

If we don't need to render the camera fullscreen, we can remove the holeview usage and qr-view-finder calculation.

Thanks @smohamedjavid, you are right. However I think both of these versions are incorrect.
In this pr's version when the camera is not enabled it looks correct (as far as the other onboarding screens look)

However in both current and this pr version when the camera is enabled it is a bit different in the designs.
I think you are correct that it should render in full screen but it's the blur color which is not matching in the designs.
I will try to get it to match closer to designs and if not I will sync with design team and give them their options :)

{:borderRadius 16})]}
background]
background)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

The dreaded dangling parenthesis attacks again!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😅

[rn/view {:style (style/root-container (:top insets))}
[header active-tab read-qr-once? title]
(case @active-tab
1 [scan-qr-code-tab qr-view-finder request-camera-permission
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a bit better than 1 or 2 is to give meaningful names to the tabs, like :tab/scan-qr-code and :tab/enter-sync-code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep that's a good idea 👍

(defn- viewfinder
[qr-view-finder {:keys [camera-ref on-read-code]}]
(let [size (:width qr-view-finder)]
[:<>
Copy link
Contributor

Choose a reason for hiding this comment

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

This fragment :<> seems unnecessary.

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'll check it out

@J-Son89 J-Son89 force-pushed the jc/sync-auth-3 branch 2 times, most recently from a176c52 to 02de8c2 Compare May 10, 2023 09:56
Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

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

Except the minor comments from other reviewers,
Looks good to me 🚀 .

@status-im-auto
Copy link
Member

87% of end-end tests have passed

Total executed tests: 31
Failed tests: 4
Passed tests: 27
IDs of failed tests: 702786,702813,702838,702807 

Failed tests (4)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_mentions_push_notification, id: 702786

    Device 1: Tap on found: Button
    Device 1: Looking for a message by text: user_1

    critical/test_public_chat_browsing.py:759: in test_community_mentions_push_notification
        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))]))
     Channel did not open by clicking on a notification with the mention for admin 
    

    [[blocked by 15859]]

    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:456: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:927: 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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_push_emoji, id: 702813

    # STEP: Send emoji message to Device 1 while it's on background
    Device 2: Sending message 'emoji'

    critical/chats/test_1_1_public_chats.py:1172: in test_1_1_chat_push_emoji
        chat_2.send_message(emoji.emojize(emoji_message))
    ../views/chat_view.py:937: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:117: in wait_for_element
        raise TimeoutException(
     Device `2`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element 
    

    [[blocked by 15859]]

    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807

    Device 2: Text is Delivered
    Device 1: Looking for a message by text: Hey, admin!

    critical/chats/test_group_chat.py:228: in test_group_chat_join_send_text_messages_push
        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))]))
     Message Hey, admin! was not received by admin 
    

    [[blocked by 15859]]

    Device sessions

    Passed tests (27)

    Click to expand

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    2. test_activity_center_mentions, id: 702957
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    4. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    2. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    3. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_message_edit, id: 702843
    Device sessions

    6. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_unread_messages_badge, id: 702841
    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 TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    3. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    7. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    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_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    hi @J-Son89 . Thank you for PR. No issues from my side. PR is ready to be merged

    @J-Son89
    Copy link
    Contributor Author

    J-Son89 commented May 15, 2023

    hi @J-Son89 . Thank you for PR. No issues from my side. PR is ready to be merged

    thanks @VladimrLitvinenko! :)

    @J-Son89 J-Son89 merged commit 4b2d62e into develop May 15, 2023
    @J-Son89 J-Son89 deleted the jc/sync-auth-3 branch May 15, 2023 17:07
    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.

    8 participants