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

Tweak UI for contact request notifications #19337

Merged
merged 11 commits into from
Mar 25, 2024

Conversation

seanstrom
Copy link
Member

@seanstrom seanstrom commented Mar 20, 2024

fixes #19261

Summary

  • This PR attempts to tweak the notifications UI for contact requests based on the design feedback in Messages - Contact request toast issues #19261
    • The notifications that are affected:
      • Contact request notifications that appear when a user is notified that someone sent them a contact request.
      • Contact requests notifications that appear when a user is notified that their contact request was accepted.
    • Note that this PR refactors the Quo notification component, and uses the notification component for these specific contact request notifications.
  • This PR may be able to skip-manual-qa because it mainly focuses on addressing design feedback. Though it does change the Quo notification component, but that component does not seem to be used anywhere else atm.

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • Contact request notifications

Steps to test

  • Open Status mobile on two devices
  • Login on each device with separate accounts
  • Open the contact profiles between the two users
  • Send a contact request from one user to the other
  • Accept the contact request

Before and after screenshots comparison

Before

There are some screenshots present in #19261

After

Screenshot 2024-03-20 at 09 12 14

status: ready

@seanstrom seanstrom self-assigned this Mar 20, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Mar 20, 2024

Jenkins Builds

Click to see older builds (32)
Commit #️⃣ Finished (UTC) Duration Platform Result
1c88951 #1 2024-03-20 09:25:37 ~1 min tests 📄log
✔️ 1c88951 #1 2024-03-20 09:31:25 ~7 min android-e2e 🤖apk 📲
✔️ 1c88951 #1 2024-03-20 09:31:35 ~7 min android 🤖apk 📲
✔️ 1c88951 #1 2024-03-20 09:32:35 ~8 min ios 📱ipa 📲
b2c8b73 #2 2024-03-20 09:43:48 ~4 min tests 📄log
✔️ b2c8b73 #2 2024-03-20 09:46:56 ~7 min android-e2e 🤖apk 📲
✔️ b2c8b73 #2 2024-03-20 09:47:04 ~7 min android 🤖apk 📲
✔️ b2c8b73 #2 2024-03-20 09:48:07 ~8 min ios 📱ipa 📲
8af660f #4 2024-03-21 10:28:45 ~6 min tests 📄log
✔️ 8af660f #3 2024-03-21 10:30:34 ~8 min android 🤖apk 📲
✔️ 8af660f #3 2024-03-21 10:30:35 ~8 min android-e2e 🤖apk 📲
✔️ 8af660f #3 2024-03-21 10:31:20 ~9 min ios 📱ipa 📲
e293f01 #5 2024-03-21 13:00:38 ~6 min tests 📄log
✔️ e293f01 #4 2024-03-21 13:01:41 ~7 min android 🤖apk 📲
✔️ e293f01 #4 2024-03-21 13:01:56 ~7 min android-e2e 🤖apk 📲
✔️ e293f01 #4 2024-03-21 13:06:40 ~12 min ios 📱ipa 📲
✔️ 3838a5e #6 2024-03-21 14:16:53 ~5 min tests 📄log
✔️ 3838a5e #5 2024-03-21 14:19:30 ~8 min ios 📱ipa 📲
✔️ 3838a5e #5 2024-03-21 14:19:39 ~8 min android-e2e 🤖apk 📲
✔️ 3838a5e #5 2024-03-21 14:19:45 ~8 min android 🤖apk 📲
ac86e19 #7 2024-03-21 15:07:00 ~1 min tests 📄log
✔️ ac86e19 #6 2024-03-21 15:12:07 ~6 min android-e2e 🤖apk 📲
✔️ ac86e19 #6 2024-03-21 15:12:13 ~6 min android 🤖apk 📲
✔️ ac86e19 #6 2024-03-21 15:22:17 ~17 min ios 📱ipa 📲
6df71f4 #8 2024-03-22 09:18:15 ~1 min tests 📄log
✔️ 6df71f4 #7 2024-03-22 09:23:40 ~7 min android 🤖apk 📲
✔️ 6df71f4 #7 2024-03-22 09:23:40 ~7 min android-e2e 🤖apk 📲
✔️ 6df71f4 #7 2024-03-22 09:27:09 ~10 min ios 📱ipa 📲
✔️ 9040018 #9 2024-03-22 11:07:38 ~5 min tests 📄log
✔️ 9040018 #8 2024-03-22 11:09:04 ~7 min android-e2e 🤖apk 📲
✔️ 9040018 #8 2024-03-22 11:09:10 ~7 min android 🤖apk 📲
✔️ 9040018 #8 2024-03-22 11:14:28 ~12 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 27e7da8 #9 2024-03-25 08:54:58 ~7 min android-e2e 🤖apk 📲
✔️ 27e7da8 #9 2024-03-25 08:55:05 ~7 min android 🤖apk 📲
✔️ 27e7da8 #9 2024-03-25 08:56:56 ~9 min ios 📱ipa 📲
✔️ bb3971e #10 2024-03-25 10:02:36 ~7 min android-e2e 🤖apk 📲
✔️ bb3971e #10 2024-03-25 10:02:44 ~7 min android 🤖apk 📲
✔️ bb3971e #11 2024-03-25 10:04:22 ~9 min tests 📄log
✔️ bb3971e #10 2024-03-25 10:13:17 ~18 min ios 📱ipa 📲

@seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from 1c88951 to b2c8b73 Compare March 20, 2024 09:39
Copy link
Contributor

@mohsen-ghafouri mohsen-ghafouri left a comment

Choose a reason for hiding this comment

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

Looks Great :)

@status-im-auto
Copy link
Member

85% of end-end tests have passed

Total executed tests: 48
Failed tests: 6
Expected to fail tests: 1
Passed tests: 41
IDs of failed tests: 702732,703495,702894,702850,702808,703629 
IDs of expected to fail tests: 703503 

Failed tests (6)

Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Device 2: Looking for a message by text: Message 1
    Device 2: Find `ChatElementByText` by `xpath`: `//*[starts-with(@text,'Message 1')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']`

    critical/chats/test_group_chat.py:342: in test_group_chat_pin_messages
        self.chats[1].chat_element_by_text(self.message_1).long_press_element()
    ../views/base_element.py:320: in long_press_element
        element = self.find_element()
    ../views/chat_view.py:116: in find_element
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'Message 1')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_group_chat_mute_chat, id: 703495

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

    critical/chats/test_group_chat.py:459: in test_group_chat_mute_chat
        chat.long_press_element()
    ../views/base_element.py:323: in long_press_element
        action.long_press(element).release().perform()
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/common/touch_action.py:174: in perform
        self._driver.execute(Command.TOUCH_ACTION, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     The element 'By.xpath: //*[@content-desc='author-primary-name'][starts-with(@text,'msqpyqm')]/..' is not linked to the same object in DOM anymore; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
    E   Stacktrace:
    E   io.appium.uiautomator2.common.exceptions.StaleElementReferenceException: The element 'By.xpath: //*[@content-desc='author-primary-name'][starts-with(@text,'msqpyqm')]/..' is not linked to the same object in DOM anymore
    E   	at io.appium.uiautomator2.model.ElementsCache.restore(ElementsCache.java:122)
    E   	at io.appium.uiautomator2.model.ElementsCache.get(ElementsCache.java:153)
    E   	at io.appium.uiautomator2.handler.Location.safeHandle(Location.java:23)
    E   	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
    E   	at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:277)
    E   	at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:271)
    E   	at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
    E   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
    E   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
    E   	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
    E   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
    E   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
    E   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
    E   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
    E   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
    E   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
    E   	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
    E   	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
    E   	at java.lang.Thread.run(Thread.java:1012)
    



    Device sessions

    3. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:324: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Messages PN was not fetched from offline
    E    message from old member if not shown for device 0
    E    message from new member if not shown for device 0
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 2: Text is Delivered
    Device 1: Looking for a message by text: Hurray! unblocked

    critical/chats/test_public_chat_browsing.py:740: in test_community_contact_block_unblock_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     1-1 chat from blocked user is not removed and messages home is not empty!
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_join_when_node_owner_offline, id: 703629

    Device 2: Looking for community: 'open community'
    Device 2: Click until Text by accessibility id: community-description-text will be presented

    critical/chats/test_public_chat_browsing.py:1180: in test_community_join_when_node_owner_offline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Text "You joined “closed community”" in shown toast element doesn't match expected "You joined “open community”"
    



    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

    Device 2: Find Button by accessibility id: close-activity-center
    Device 2: Tap on found: Button

    activity_center/test_activity_center.py:94: in test_activity_center_contact_request_decline
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Pending contact request is not shown on unread notification element on Activity center!
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

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

    Passed tests (41)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    2. test_group_chat_reactions, id: 703202
    Device sessions

    3. test_group_chat_join_send_text_messages_push, id: 702807
    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_edit_delete_message_when_offline, id: 704615
    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_unread_messages_badge, id: 702841
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    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_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_edit_message, id: 702855
    Device sessions

    6. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    @seanstrom
    Copy link
    Member Author

    @status-im/mobile-qa Can you review these E2E results please? 🙏

    @qoqobolo
    Copy link
    Contributor

    Hey @seanstrom, the failures are not related to the PR 👌

    @seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from b2c8b73 to 8af660f Compare March 21, 2024 10:21
    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.

    Issues addressed in the previous review seem to be fixed now 👍

    But now the text inside the toast seems to be smaller than design:

    Screenshot 2024-03-21 alle 13 30 30

    I placed the screen in a new Figma frame if you want to have a better look at it

    @seanstrom
    Copy link
    Member Author

    Nice catch! I've updated the code to use the correct font-size (I think). Lmk what you think 🙏
    Screenshot 2024-03-21 at 12 52 15

    @seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from e293f01 to 3838a5e Compare March 21, 2024 14:10
    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.

    @seanstrom looks good now, thank you 🙏

    @seanstrom
    Copy link
    Member Author

    @Francesca-G I made one other update since I think the notification had the wrong font-weight. Here's one more screenshot of the current styles. I've been using Semi-Bold for the titles, but I think I need Medium in this case, can you help me confirm 🙏

    Screenshot 2024-03-21 at 15 04 00

    @seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from ac86e19 to 6df71f4 Compare March 22, 2024 09:16
    @Francesca-G
    Copy link

    @Francesca-G I made one other update since I think the notification had the wrong font-weight. Here's one more screenshot of the current styles. I've been using Semi-Bold for the titles, but I think I need Medium in this case, can you help me confirm 🙏

    Medium is the correct weight In this case 👍
    Thanks for fixing it!

    @seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from 9040018 to 27e7da8 Compare March 25, 2024 08:47
    @seanstrom seanstrom force-pushed the seanstrom/fix-contact-request-notification-ui branch from 27e7da8 to bb3971e Compare March 25, 2024 09:54
    @seanstrom seanstrom merged commit 418053b into develop Mar 25, 2024
    6 checks passed
    @seanstrom seanstrom deleted the seanstrom/fix-contact-request-notification-ui branch March 25, 2024 10:17
    mmilad75 pushed a commit that referenced this pull request Apr 2, 2024
    * fix: ensure contact-request notifications are displayed as notifications
    
    * fix: provide context-theme for notification sub-components
    
    * fix: adjust font weight for notification text
    
    * fix: adjust alignment of user-avatar inside a notification with a header and body
    
    * tidy: rename override-theme to theme inside notifications
    
    * fix: update notifications component to use `user` prop instead of `avatar`
    
    * tweak: adapt notification to avatar to vertically center when only displaying header or title
    
    * fix: use title font-size for contact-request-accepted notification
    
    * fix: allow for custom avatar component prop in quo notification component
    
    * fix: ensure we use the correct font-weight for contact-request-accepted notification
    
    * tidy: fix formatting
    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.

    Messages - Contact request toast issues
    5 participants