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

Camera extra features #16781

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Camera extra features #16781

merged 5 commits into from
Jul 31, 2023

Conversation

OmarBasem
Copy link
Contributor

fixes: #16580

This PR implements camera features: flash, front-camera, landscape.

@status-im-auto
Copy link
Member

status-im-auto commented Jul 26, 2023

Jenkins Builds

Click to see older builds (8)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ db19bdd #1 2023-07-26 05:47:55 ~7 min ios 📱ipa 📲
✔️ db19bdd #1 2023-07-26 05:49:36 ~8 min android 🤖apk 📲
✔️ db19bdd #1 2023-07-26 05:49:43 ~9 min android-e2e 🤖apk 📲
✔️ db19bdd #1 2023-07-26 05:50:34 ~9 min tests 📄log
✔️ 9de1852 #2 2023-07-26 10:00:03 ~6 min android-e2e 🤖apk 📲
✔️ 9de1852 #2 2023-07-26 10:00:07 ~6 min android 🤖apk 📲
✔️ 9de1852 #2 2023-07-26 10:01:31 ~8 min ios 📱ipa 📲
✔️ 9de1852 #2 2023-07-26 10:01:33 ~8 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 1a96e94 #3 2023-07-27 05:31:04 ~6 min ios 📱ipa 📲
✔️ 1a96e94 #3 2023-07-27 05:33:31 ~9 min android-e2e 🤖apk 📲
✔️ 1a96e94 #3 2023-07-27 05:33:37 ~9 min android 🤖apk 📲
✔️ 1a96e94 #3 2023-07-27 05:34:00 ~9 min tests 📄log
✔️ baa6727 #4 2023-07-31 04:50:46 ~9 min android-e2e 🤖apk 📲
✔️ baa6727 #4 2023-07-31 04:50:49 ~9 min android 🤖apk 📲
✔️ baa6727 #4 2023-07-31 04:51:14 ~9 min tests 📄log
✔️ baa6727 #4 2023-07-31 04:51:30 ~10 min ios 📱ipa 📲

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.

LGTM 🚀 📸

Great work! @OmarBasem !

src/status_im2/contexts/chat/camera/view.cljs Outdated Show resolved Hide resolved
src/status_im2/contexts/chat/camera/view.cljs Outdated Show resolved Hide resolved
@status-im-auto
Copy link
Member

85% of end-end tests have passed

Total executed tests: 39
Failed tests: 6
Passed tests: 33
Not executed tests: 1
IDs of not executed tests: 702869 
IDs of failed tests: 702732,703133,702851,702894,702731,703382 

Not executed tests (1)

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

    Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 2: Sending message 'I should not be in chat'
    Device 2: Find ChatMessageInput by accessibility id: chat-message-input

    critical/test_public_chat_browsing.py:852: in test_community_contact_block_unblock_offline
        self.channel_2.send_message(message_to_disappear)
    ../views/chat_view.py:969: in send_message
        self.chat_message_input.send_keys(message)
    ../views/base_element.py:348: in send_keys
        self.find_element().send_keys(value)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/webelement.py:218: in send_keys
        self._execute(RemoteCommand.SEND_KEYS_TO_ELEMENT, {'text': ''.join(keys), 'value': keys})
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:633: in _execute
        return self._parent.execute(command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:31: in check_response
        raise wde
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:26: in check_response
        super().check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:242: in check_response
        raise exception_class(message, screen, stacktrace)
     Cannot set the element to 'I should not be in chat'. Did you interact with the correct element?
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

    Device 1: Tap on found: Button
    # STEP: Device1 check that contact appeared in contact list mutually

    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1374: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    E   http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    medium/test_activity_center.py:106: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.device_2.just_fyi('Device1 check that contact appeared in contact list mutually')
    ../views/base_view.py:375: in just_fyi
        self.driver.execute_script("sauce:context=STEP: %s" % some_str)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:634: in execute_script
        return self.execute(command, {
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:319: in execute
        response = self.command_executor.execute(driver_command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:376: in execute
        return self._request(command_info[0], url, body=data)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py:399: in _request
        resp = self._conn.request(method, url, body=body, headers=headers)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:78: in request
        return self.request_encode_body(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/request.py:170: in request_encode_body
        return self.urlopen(method, url, **extra_kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/poolmanager.py:376: in urlopen
        response = conn.urlopen(method, u.request_uri, **kw)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:787: in urlopen
        retries = retries.increment(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/util/retry.py:550: in increment
        raise six.reraise(type(error), error, _stacktrace)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/packages/six.py:769: in reraise
        raise value.with_traceback(tb)
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
        httplib_response = self._make_request(
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
        six.raise_from(e, None)
    <string>:3: in raise_from
        ???
    /home/jenkins/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
        httplib_response = conn.getresponse()
    /usr/lib/python3.10/http/client.py:1374: in getresponse
        response.begin()
    /usr/lib/python3.10/http/client.py:318: in begin
        version, status, reason = self._read_status()
    /usr/lib/python3.10/http/client.py:287: in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
     ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    



    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find Button by accessibility id: show-profiles
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:486: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    E    Incorrect contacts number restored: 0 instead of 2
    E    Contact(s) was (were) not restored from backup: Test_contact, MyCustomNickname!
    



    Device sessions

    2. test_community_mute_community_and_channel, id: 703382

    Device 1: Find MuteButton by accessibility id: mute-community
    Device 1: Click system back button

    critical/test_public_chat_browsing.py:402: in test_community_mute_community_and_channel
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Text 'Muted until 10:09 Wed 02 Aug' is not shown for a muted community channel
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Passed tests (33)

    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_delete_via_long_press_relogin, id: 702784
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    Device sessions

    9. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    10. test_1_1_chat_message_reaction, id: 702730
    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_mentions_push_notification, id: 702786
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_leave, id: 702845
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    4. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    5. test_group_chat_offline_pn, id: 702808
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    @OmarBasem Thank you for PR. Take a look a found issues:

    ISSUE 1: Mirror effect after taking a picture with the Front Camera

    Steps to Reproduce:

    1. Go to the chat
    2. Switch to the front camera
    3. Take a picture of an object using the front camera.

    Actual Result:

    After taking a picture with the front camera, the image appears mirrored, causing a mirror effect. The objects in the image may appear reversed

    How the photo is pointed
    image

    How the image is shown after photo is taken
    image

    Expected Result:

    Pictures taken with the front camera should not have a mirror effect. The images should appear as they do in reality

    @VolodLytvynenko
    Copy link
    Contributor

    unfortunately there is no exact steps how to reproduce. This error just appears randomly for android device

    ISSUE 2: The 'java.lang.illegaStateException' error occurs after the photo is taken on Android

    Actual result:

    java.lang.illegaStateException occurs after the photo is taken

    Expected result:

    The photo is taken without error

    Device:

    real device: pixel 7a, Android 13

    Logs:

    Status.log
    geth.log

    @OmarBasem
    Copy link
    Contributor Author

    OmarBasem commented Jul 26, 2023

    Hi @VolodLytvynenko, thanks for your testing.

    Are you sure there shouldn't be a mirror effect? Both iPhone and Android native cameras have a mirror effect

    rotate (reanimated/use-shared-value "0deg")]
    (orientation/use-device-orientation-change (fn [result]
    (reset! current-orientation result)
    (case result
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    @OmarBasem, case should be used only with literals. Soon I'll open a PR where the linter disallows this dangerous practice (which has caused bugs in the project's history). https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#case-symbol-test-constant

    For this piece of code, cond seems to be the best alternative.

    Copy link
    Contributor Author

    @OmarBasem OmarBasem Jul 27, 2023

    Choose a reason for hiding this comment

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

    Thanks for the feedback @ilmotta

    :flash-mode (if @flash :on :off)
    :camera-type @camera-type}])
    (when-not @uri
    [rn/view {:style (style/zoom-container top insets)}
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    This component should ideally be broken down into smaller ones. This can help Reagent return cached results for certain nodes in the tree, whereas a big component will tend to be entirely recomputed and re-rendered by Reagent.

    For instance, this part here is the only one that depends on current-zoom. If you extract all these zoom-buttons into a separate component and move the current-zoom state there, then if current-zoom is mutated, the more expensive camera-screen component won't need to re-render.

    (defn zoom-buttons
      []
      (let [current-zoom (reagent/atom "1")]
        (fn [top insets rotate]
          [rn/view {:style (style/zoom-container top insets)}
           [zoom-button {:value "0.5" :current-zoom current-zoom :rotate rotate}]
           [zoom-button {:value "1" :current-zoom current-zoom :rotate rotate}]
           [zoom-button {:value "2" :current-zoom current-zoom :rotate rotate}]
           [zoom-button {:value "3" :current-zoom current-zoom :rotate rotate}]])))
    
    ;; In the camera-screen component
    (when-not @uri
      [zoom-buttons top insets rotate])

    @ulisesmac, please correct me if I'm wrong.

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Yep, your suggestion is correct @ilmotta

    Also having smaller components with a meaningful name helps to readability 👍

    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 @ilmotta. Broke it down a little bit.

    [zoom-button {:value "3" :current-zoom current-zoom :rotate rotate}]])
    [rn/view {:style (style/confirmation-container insets @uri)}
    [quo/text
    {:on-press #(retake flash uri)
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Completely optional feedback, but raising awareness nonetheless

    You can move the on-press anonymous function to the let binding at the top, where flash and uri are defined. This way, we avoid unnecessary function allocations. Not the case here, but in other cases this practice can help Reagent use cached results because the function instance would be stable across re-renders.

    The same refactoring to local binding can be applied for other anonymous functions defined in camera-screen, such as #(reset! camera-ref %) or #(reset! flash (not @flash)).

    The Reagent doc says we don't necessarily need to worry about this for the most part, but I still think it's a good practice for React based apps, especially in this restricted and slow (perf-wise) mobile world.

    [rn/view {:style (style/confirmation-container insets @uri)}
    [quo/text
    {:on-press #(retake flash uri)
    :style {:font-size 17
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    This font-size 17 is weirdly placed like this. As far as I've seen we use typography values from the foundations namespace. Could you expand a bit on this point?

    Copy link
    Contributor Author

    @OmarBasem OmarBasem Jul 27, 2023

    Choose a reason for hiding this comment

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

    That's right @ilmotta, please check this comment: #16569 (comment)

    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Thanks @OmarBasem. So it seems worth having another issue to track this problem, wdyt?

    :color colors/white}}
    (i18n/label :t/use-photo)]]
    [rn/view {:style (style/bottom-area top insets @uri)}
    [quo/text {:style style/photo-text} (i18n/label :t/PHOTO)]
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    I know I mentioned in another one of your PRs @OmarBasem, but I think it's worth reiterating, also because the fix is simple. Translation keywords in our codebase should be lowercased, for the simple reason that it's the idiomatic way in Clojure. If we already have a translation with the name :t/photo, simply give it a different name like :t/photo-header.

    It's obviously not something introduced by this PR, so no worries if you don't want to change the code.

    I'm considering adding a custom script to make lint to verify this, since it's easy and cheap.

    (i18n/label :t/retake)]
    (let [camera-ref (atom nil)
    uri (reagent/atom nil)
    current-zoom (reagent/atom "1")
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Why is the current-zoom value a string? It seems f-zoom-button can handle the number just fine. Seems more correct type-wise.

    camera-type (reagent/atom camera-kit/camera-type-back)
    flash (reagent/atom false)
    current-orientation (atom orientation/portrait)]
    [:f>
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    I believe this pattern of a form-2 component with a functional component using an anonymous function has been deprecated in the repo. It often causes rendering issues, so it's better to extract the functional component using the f-* pattern.

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    That's right, my bad

    [rn/view {:style style/screen-container}
    [reanimated/touchable-opacity
    {:active-opacity 1
    :on-press #(reset! flash (not @flash))
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Light suggestion: This is commonly done as (swap! flash not)

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @VolodLytvynenko, thanks for your testing.

    Are you sure there shouldn't be a mirror effect? Both iPhone and Android native cameras have a mirror effect

    Hi @OmarBasem , I apologize for this issue confusion.

    When I initially investigated it, I checked how it works in Telegram and Viber and they do not use a mirror effect. However, now I see that both iPhone and Android native cameras do use a mirror effect, as well as Discord.

    I have been mistaken due to the initial information from Telegram and Viber :)
    Looks like this is not a valid issue

    @VolodLytvynenko
    Copy link
    Contributor

    @OmarBasem, I just encountered issue 2 (#16781 (comment)) on the latest nightly build. I will create a separate issue for it. If this PR does not require any new commits, it can be merged. Otherwise, let me know if it needs additional testing after new commits. For now, no additional issues from my side. Thank you!

    @OmarBasem
    Copy link
    Contributor Author

    OmarBasem commented Jul 27, 2023

    Thanks for your testing @VolodLytvynenko. I made some changes, you can test it again please.

    @status-im-auto
    Copy link
    Member

    85% of end-end tests have passed

    Total executed tests: 39
    Failed tests: 6
    Passed tests: 33
    Not executed tests: 1
    
    IDs of not executed tests: 702869 
    
    IDs of failed tests: 702732,703133,702851,702894,702731,703382 
    

    Not executed tests (1)

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

    Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851

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

    medium/test_activity_center.py:112: in test_activity_center_contact_request_accept_swipe_mark_all_as_read
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact was not added to contact list after accepting contact request (as receiver)
    E    Contact was not added to contact list after accepting contact request (as sender)
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 2: Type I should not be in chat to ChatMessageInput
    Device 2: Find SendMessageButton by accessibility id: send-message-button

    critical/test_public_chat_browsing.py:852: in test_community_contact_block_unblock_offline
        self.channel_2.send_message(message_to_disappear)
    ../views/chat_view.py:970: in send_message
        self.send_message_button.click()
    ../views/base_element.py:91: in click
        self.find_element().click()
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 2: SendMessageButton by accessibility id: `send-message-button` is not found on the screen
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find Button by accessibility id: show-profiles
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:486: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    E    Incorrect contacts number restored: 0 instead of 2
    E    Contact(s) was (were) not restored from backup: Test_contact, MyCustomNickname!
    



    Device sessions

    2. test_community_mute_community_and_channel, id: 703382

    Device 1: Find MuteButton by accessibility id: mute-community
    Device 1: Click system back button

    critical/test_public_chat_browsing.py:402: in test_community_mute_community_and_channel
        self.errors.verify_no_errors()
    base_test_case.py:183: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Text 'Muted until 07:32 Thu 03 Aug' is not shown for a muted community channel
    



    Device sessions

    Passed tests (33)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495
    Device sessions

    2. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    3. test_group_chat_reactions, id: 703202
    Device sessions

    4. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    5. test_group_chat_offline_pn, id: 702808
    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_mentions_push_notification, id: 702786
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_leave, id: 702845
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    8. test_1_1_chat_edit_message, id: 702855
    Device sessions

    9. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    10. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @OmarBasem A few additional minor issues are found. Could you fix them into the next PR related to camera extra features?
    Current PR is ready to be merged. Thank you!

    @VolodLytvynenko
    Copy link
    Contributor

    ISSUE 3. Flash and camera switcher icon rotation not correct in landscape mode after flash being tapped

    Steps to reproduce:

    1. Open the camera app on an Android device.
    2. Rotate the device to landscape mode.
    3. Tap on the flash icon

    Actual Result:

    After tapping on the flash icon, the flash icon does not rotate correctly
    image

    Expected Result:

    When tapping on the flash icon in landscape mode

    @VolodLytvynenko
    Copy link
    Contributor

    Question / ISSUE:

    It appears that the flash for Android devices' front camera is not supported. For Pixel 7a the flash is not applied when a photo is taken. Considering that many Android devices do not support front camera flash, it might be better to hide the flash icon when the front camera is enabled for Android devices.

    Steps:

    1. Open the camera app on an Android device.
    2. Switch to the front camera mode.
    3. Attempt to take a photo with the flash enabled.

    Actual Result:

    The flash does not work when taking a photo with the front camera on Android devices.

    Expected Result:

    Potential solution:

    • The flash icon should should not be shown when front camera is enabled for Android devices

    @churik
    Copy link
    Member

    churik commented Jul 27, 2023

    @Francesca-G please, review this PR.
    @OmarBasem hold on to merge until design review

    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.

    🚀

    Copy link

    @Francesca-G Francesca-G left a comment

    Choose a reason for hiding this comment

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

    Here's the Figma Frame with the review :)

    @VolodLytvynenko
    Copy link
    Contributor

    Here's the Figma Frame with the review :)

    Hi @OmarBasem take a look on the design feedback and let us know when PR can be retested. Thank you!

    @VolodLytvynenko
    Copy link
    Contributor

    @Francesca-G can the details left in https://www.figma.com/file/Tf5nfkYvpbnNCo4rKLK7lS/Feedback-for-Mobile?type=design&node-id=3719%3A64506&mode=design&t=ODmz1dy1mNFmwJn3-1 be fixed in the separate follow up or better to fix it in the scope of this PR?

    @Francesca-G
    Copy link

    @Francesca-G can the details left in https://www.figma.com/file/Tf5nfkYvpbnNCo4rKLK7lS/Feedback-for-Mobile?type=design&node-id=3719%3A64506&mode=design&t=ODmz1dy1mNFmwJn3-1 be fixed in the separate follow up or better to fix it in the scope of this PR?

    Separate follow ups work :) thanks

    @VolodLytvynenko
    Copy link
    Contributor

    @OmarBasem PR is ready to be merged! Thank you

    # This is the 1st commit message:
    
    feat: camera
    
    updates
    
    updates
    
    updates
    
    feat: camera
    
    feat: camera
    
    updates
    
    icons
    
    icons
    
    icons
    
    icons
    
    revert
    
    # This is the commit message #2:
    
    lint
    
    # This is the commit message #3:
    
    review
    
    # This is the commit message #4:
    
    revert
    
    # This is the commit message #5:
    
    lint
    
    # This is the commit message #6:
    
    review
    
    # This is the commit message #7:
    
    camera features
    
    # This is the commit message #8:
    
    feat: camera extra features
    @OmarBasem
    Copy link
    Contributor Author

    Thanks @Francesca-G and @VolodLytvynenko !

    @OmarBasem OmarBasem merged commit 0ee0137 into develop Jul 31, 2023
    2 checks passed
    @OmarBasem OmarBasem deleted the camera-extra-features branch July 31, 2023 05:01
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Camera features (2)
    8 participants