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

🧈 Transparent modal support 🧈 #15268

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

flexsurfer
Copy link
Member

@flexsurfer flexsurfer commented Mar 6, 2023

image on ios, on Android not relly :)

Screen.Recording.2023-03-06.at.11.19.27.mov

:blur-type :dark}}]}]})
[{:keys [db] :as cofx} {:keys [filter-type filter-status]}]
(rf/merge cofx
{:db (cond-> (dissoc db :popover/popover)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the dissoc call here

Copy link
Member Author

Choose a reason for hiding this comment

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

thx, fxd

@status-im-auto
Copy link
Member

status-im-auto commented Mar 6, 2023

Jenkins Builds

Click to see older builds (34)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 824a320 #1 2023-03-06 10:27:00 ~4 min tests 📄log
✔️ 983914d #2 2023-03-06 10:31:36 ~4 min tests 📄log
✔️ 983914d #2 2023-03-06 10:35:17 ~8 min android 🤖apk 📲
✔️ 983914d #2 2023-03-06 10:35:27 ~8 min android-e2e 🤖apk 📲
✔️ 983914d #2 2023-03-06 10:36:11 ~8 min ios 📱ipa 📲
5041944 #3 2023-03-06 12:06:50 ~3 min tests 📄log
✔️ 5041944 #3 2023-03-06 12:11:23 ~7 min android 🤖apk 📲
✔️ 5041944 #3 2023-03-06 12:11:27 ~7 min android-e2e 🤖apk 📲
✔️ 5041944 #3 2023-03-06 12:11:47 ~8 min ios 📱ipa 📲
37c7294 #4 2023-03-06 13:27:25 ~3 min tests 📄log
✔️ 37c7294 #4 2023-03-06 13:30:57 ~7 min ios 📱ipa 📲
✔️ 37c7294 #4 2023-03-06 13:31:25 ~7 min android-e2e 🤖apk 📲
✔️ 37c7294 #4 2023-03-06 13:31:55 ~8 min android 🤖apk 📲
64de178 #5 2023-03-06 14:07:36 ~12 sec android 📄log
64de178 #5 2023-03-06 14:07:37 ~13 sec ios 📄log
64de178 #5 2023-03-06 14:07:47 ~23 sec android-e2e 📄log
64de178 #5 2023-03-06 14:07:54 ~30 sec tests 📄log
✔️ f6602fa #6 2023-03-06 14:17:34 ~4 min tests 📄log
✔️ f6602fa #6 2023-03-06 14:21:37 ~8 min android 🤖apk 📲
✔️ f6602fa #6 2023-03-06 14:21:39 ~8 min android-e2e 🤖apk 📲
✔️ f6602fa #6 2023-03-06 14:21:46 ~8 min ios 📱ipa 📲
23ae48f #8 2023-03-06 14:55:30 ~3 min ios 📄log
✔️ 23ae48f #8 2023-03-06 15:05:07 ~13 min tests 📄log
✔️ 23ae48f #8 2023-03-06 15:07:54 ~15 min android-e2e 🤖apk 📲
✔️ 23ae48f #8 2023-03-06 15:08:10 ~16 min android 🤖apk 📲
✔️ 4a2881a #9 2023-03-06 16:05:47 ~4 min tests 📄log
✔️ 4a2881a #9 2023-03-06 16:09:18 ~7 min android 🤖apk 📲
✔️ 4a2881a #9 2023-03-06 16:09:23 ~7 min ios 📱ipa 📲
✔️ 4a2881a #9 2023-03-06 16:09:32 ~8 min android-e2e 🤖apk 📲
3c0e4ff #10 2023-03-07 09:14:57 ~2 min tests 📄log
✔️ 3c0e4ff #10 2023-03-07 09:20:18 ~7 min ios 📱ipa 📲
✔️ 3c0e4ff #10 2023-03-07 09:20:33 ~8 min android-e2e 🤖apk 📲
✔️ 3c0e4ff #10 2023-03-07 09:20:46 ~8 min android 🤖apk 📲
✔️ 3c0e4ff #11 2023-03-07 09:22:27 ~4 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c066f79 #12 2023-03-08 15:43:52 ~4 min tests 📄log
✔️ c066f79 #11 2023-03-08 15:47:33 ~8 min android-e2e 🤖apk 📲
✔️ c066f79 #11 2023-03-08 15:47:47 ~8 min android 🤖apk 📲
✔️ c066f79 #11 2023-03-08 15:48:01 ~8 min ios 📱ipa 📲
✔️ 980f3bf #13 2023-03-08 16:15:14 ~4 min tests 📄log
✔️ 980f3bf #12 2023-03-08 16:19:16 ~8 min ios 📱ipa 📲
✔️ 980f3bf #12 2023-03-08 16:19:36 ~8 min android-e2e 🤖apk 📲
✔️ 980f3bf #12 2023-03-08 16:19:54 ~9 min android 🤖apk 📲

@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

Yeah, there's so much better in this PR that I'm using in my bread already 🧈 🧈

@flexsurfer, inset paddings are incorrect on Android.

@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

After switching from white to dark mode and going back to the app, I see this blue screen of death.

@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

Also after switching the theme, light to dark or vice-versa, the top bar text becomes unreadable.

top-bar-colors.webm

@flexsurfer
Copy link
Member Author

thanks @ilmotta how do you switch theme? in the app or in the system?

@flexsurfer
Copy link
Member Author

@ilmotta real device or emulator?

@flexsurfer flexsurfer changed the title 🧈🧈🧈 Transparent modal support 🧈🧈🧈 🧈 Transparent modal support 🧈 Mar 6, 2023
@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

thanks @ilmotta how do you switch theme? in the app or in the system?

Always via the OS.

@ilmotta real device or emulator?

Emulator, but I can double-check a released apk. Will let you know soon

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.

Looks nice on iOS 👍
On Android, I am getting a black flicker on the background:

Screen_Recording_20230306-144155_Status.PR.mp4

Also, on Android, no notifications are rendered, as well as the empty view.
The top bar needs some padding. And please update the status bar style to light.

Lastly, I see some screen's background color is broken now, so maybe put back the wrapped-screens-style and customize it for the AC screen only. Would be good to run it through QA.

Comment on lines 29 to 31
:modalPresentationStyle :overCurrentContext
:layout {:componentBackgroundColor :transparent
:backgroundColor :transparent}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I am wondering why it wasn't working..

@@ -39,8 +39,7 @@
(defn wrapped-screen-style
[screen-insets safe-insets]
(merge
{:flex 1
:background-color (colors/theme-colors colors/white colors/neutral-100)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh that's why

@flexsurfer
Copy link
Member Author

yeah Android is a pita, hope will fix all issues, thanks for testing

@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

yeah Android is a pita, hope will fix all issues, thanks for testing

You mean React Native is a pita ;) It should behave more similarly between platforms, but it doesn't.

@flexsurfer, tested with released apk, all issues are present as in the emulator.

@flexsurfer
Copy link
Member Author

all issues are present as in the emulator.

That's bad news :( even a blue dead screen?

@ilmotta
Copy link
Contributor

ilmotta commented Mar 6, 2023

all issues are present as in the emulator.

That's bad news :( even a blue dead screen?

Unfortunately yes @flexsurfer, and it happens on the newest version of Android as well as on the emulator.

@flexsurfer
Copy link
Member Author

image

ok @ilmotta hope it is fixed now, at least i can't replicate on the emulator anymore

ps i guess theme switch is not related to this PR, because i didn't make any related changes

@flexsurfer
Copy link
Member Author

@OmarBasem pls take a look Android again when you have time, thanks

@flexsurfer
Copy link
Member Author

@OmarBasem @ilmotta but please wait the latest build

@flexsurfer
Copy link
Member Author

works perfect on my device and emulator, hope it will work for you as well @OmarBasem @ilmotta ready for testing

@Parveshdhull
Copy link
Member

5041944 build, android (no theme changes)
image

@flexsurfer
Copy link
Member Author

flexsurfer commented Mar 6, 2023

5041944 build, android (no theme changes) image

oh thanks @Parveshdhull , yeah i removed color from the screen, i hate this theme changes, we should reload the app

@flexsurfer
Copy link
Member Author

on android its very critical, we should set background color only once in the navigation settings, and never use background-color in nested views, i'll take a look how this can be fixed

@Parveshdhull
Copy link
Member

Parveshdhull commented Mar 6, 2023

ps i guess theme switch is not related to this PR, because i didn't make any related changes

Yes, looks like this status-bar issue with activity center open-close also exists in develop (only able to reproduce in dark theme)

@ilmotta
Copy link
Contributor

ilmotta commented Mar 7, 2023

@ilmotta yeah there is room for improving the screen content performance. But as far as the screen opening animation, it is much better now. Also, adding some custom layout animations would be nice of the AC screen.

About the animations, I did a try to use reanimated FlatList to do the layout animations. It should be trivial, but I faced a known bug in our current version of Reanimated and decided to park the implementation. I explained in the detail in this closed issue #14683 (comment). You might be able to find a solution though.

Please, feel free to reopen the issue if you want to try your luck on it @OmarBasem, but do take a look at my comment there and the branch I pushed.

@flexsurfer
Copy link
Member Author

But the buttons (decline, accept, filter, also empty container) have a weird shadow.

known issue on Android Kureev/react-native-blur#511

@ilmotta
Copy link
Contributor

ilmotta commented Mar 8, 2023

But the buttons (decline, accept, filter, also empty container) have a weird shadow.

known issue on Android Kureev/react-native-blur#511

Yeah, I've faced this problem from day 1 when using react-native-blur. There are countless people reporting this kind of problem in their issues 😞

@OmarBasem
Copy link
Contributor

But the buttons (decline, accept, filter, also empty container) have a weird shadow.

known issue on Android Kureev/react-native-blur#511

Hmm, why is it happening in the Modal Screen, but not the Modal component

@ilmotta
Copy link
Contributor

ilmotta commented Mar 8, 2023

But the buttons (decline, accept, filter, also empty container) have a weird shadow.

known issue on Android Kureev/react-native-blur#511

Hmm, why is it happening in the Modal Screen, but not the Modal component

There are many subtle conditions that make the "bleeding" happen @OmarBasem. For instance, I've experimented (or seen in status-mobile, can't remember now) views that are not affected by bleeding because of animations (probably due to the delay to appear on screen), but this is just one example.

@flexsurfer
Copy link
Member Author

i had a different bug , and when i set overlayColor to transparent this effect was more visible, so probably it depends somehow on different parameters

@flexsurfer
Copy link
Member Author

yes, so @OmarBasem i looked at your PR, and you have :background-color colors/neutral-80-opa-80 and color is darker and effect is not visible

image

@flexsurfer
Copy link
Member Author

flexsurfer commented Mar 8, 2023

figma backgorund overlay
image image image

@flexsurfer
Copy link
Member Author

so it only depends on color, brighter the blur color more visible bug effect

@flexsurfer
Copy link
Member Author

:style       {:position :absolute :top 0 :left 0 :right 0 :bottom 0}
   :overlayColor colors/neutral-80-opa-80
   :blur-amount 20}

this combination look more like a figma, and bug is not so visible

@OmarBasem
Copy link
Contributor

:style       {:position :absolute :top 0 :left 0 :right 0 :bottom 0}
   :overlayColor colors/neutral-80-opa-80
   :blur-amount 20}

this combination look more like a figma, and bug is not so visible

Cool! Make sure the blur effect is still visible tho

@flexsurfer
Copy link
Member Author

:style       {:position :absolute :top 0 :left 0 :right 0 :bottom 0}
   :overlayColor colors/neutral-80-opa-80
   :blur-amount 20}

this combination look more like a figma, and bug is not so visible

Cool! Make sure the blur effect is still visible tho

it looks pretty similar to figma, slightly visible

@flexsurfer flexsurfer force-pushed the feature/transparent-modal-support branch from 3c0e4ff to c066f79 Compare March 8, 2023 15:37
@flexsurfer
Copy link
Member Author

thanks @VladimrLitvinenko could you pls try latest build when its ready

@status-im-auto
Copy link
Member

89% of end-end tests have passed

Total executed tests: 28
Failed tests: 3
Passed tests: 25
IDs of failed tests: 702855,702894,702838 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 1: Find `ChatElementByText` by `xpath`: `//*[starts-with(@text,'I should not be in chat')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']`
    Device 1: Find `MemberPhoto` by `xpath`: `//*[starts-with(@text,'I should not be in chat')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='user-avatar']`

    critical/test_public_chat_browsing.py:561: in test_community_contact_block_unblock_offline
        chat_element.member_photo.click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 1: MemberPhoto by xpath: `//*[starts-with(@text,'I should not be in chat')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='user-avatar']` is not found on the screen
    



    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:410: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:889: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:134: 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_edit_message, id: 702855

    Device 1: Find Text by xpath: //*[starts-with(@text,'AFTER')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']
    Device 1: Tap on found: Text

    critical/chats/test_1_1_public_chats.py:1214: in test_1_1_chat_edit_message
        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))]))
     Edited message is shown for receiver with status  but it should be "Edited" 
    

    [[blocked by 15166]]

    Device sessions

    Passed tests (25)

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

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    5. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    6. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    7. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    8. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityCenterMultipleDevicePR:

    1. test_activity_center_decline_contact_request, id: 702850
    Device sessions

    2. test_activity_center_mentions_in_community_jump_to, id: 702851
    Device sessions

    3. test_activity_center_cancel_outgoing_contact_request_no_pn, id: 702871
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    3. test_community_leave, id: 702845
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_delete, id: 702839
    Device sessions

    6. test_community_message_edit, id: 702843
    Device sessions

    Class TestDeeplinkOneDeviceNewUI:

    1. test_public_chat_open_using_deep_link, id: 702776
    Device sessions

    2. test_deep_link_with_invalid_user_public_key_own_profile_key, id: 702774
    Device sessions

    3. test_deep_link_open_user_profile, id: 702775
    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

    @VolodLytvynenko
    Copy link
    Contributor

    hi @flexsurfer. Thank you for the fixes. PR is tested and ready to be merged.

    @flexsurfer flexsurfer merged commit 8121257 into develop Mar 9, 2023
    @flexsurfer flexsurfer deleted the feature/transparent-modal-support branch March 9, 2023 09:37
    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.

    7 participants