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

Communities - Show modal title and community context tag #18077

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

ilmotta
Copy link
Contributor

@ilmotta ilmotta commented Dec 5, 2023

Fixes #18025

Summary

This is a quick PR to make the account selection screen more in line with Figma, but more importantly to show the community context tag and a screen title.

The feature is behind a feature toggle , disabled in develop.

Before

Demo

There's a known bug where the background of the context tag extends up to the available width of the parent container. This PR is not fixing that.

Screen_recording_20231205_124555.webm

Areas that may be impacted

None because the feature toggle is disabled in develop. e2e tests will be run as usual.

Steps to test

  1. Enable toggle status-im2.config/community-accounts-selection-enabled?
  2. Send a community invite to someone and press "Request to join" in the community overview screen.

status: ready

@ilmotta ilmotta added this to the 1.27.0 - Alpha milestone Dec 5, 2023
@ilmotta ilmotta self-assigned this Dec 5, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Dec 5, 2023

Jenkins Builds

Click to see older builds (11)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2b1d5f2 #1 2023-12-05 16:05:37 ~7 min android 🤖apk 📲
✔️ 2b1d5f2 #1 2023-12-05 16:06:07 ~7 min android-e2e 🤖apk 📲
✔️ 2b1d5f2 #1 2023-12-05 16:11:51 ~13 min ios 📱ipa 📲
✔️ 2d3b523 #2 2023-12-06 10:51:03 ~6 min ios 📱ipa 📲
✔️ 2d3b523 #2 2023-12-06 10:51:29 ~6 min android-e2e 🤖apk 📲
✔️ 2d3b523 #2 2023-12-06 10:51:51 ~7 min android 🤖apk 📲
✔️ 2d3b523 #2 2023-12-06 10:55:50 ~11 min tests 📄log
✔️ be6870d #3 2023-12-06 12:42:03 ~6 min ios 📱ipa 📲
✔️ be6870d #3 2023-12-06 12:45:25 ~9 min android-e2e 🤖apk 📲
✔️ be6870d #3 2023-12-06 12:45:27 ~9 min android 🤖apk 📲
✔️ be6870d #3 2023-12-06 12:46:35 ~11 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3038a44 #4 2023-12-06 20:54:08 ~10 min android-e2e 🤖apk 📲
✔️ 3038a44 #4 2023-12-06 20:54:50 ~11 min android 🤖apk 📲
✔️ c4ddf07 #5 2023-12-06 21:02:07 ~6 min android-e2e 🤖apk 📲
✔️ c4ddf07 #5 2023-12-06 21:02:44 ~7 min ios 📱ipa 📲
✔️ c4ddf07 #5 2023-12-06 21:06:45 ~11 min android 🤖apk 📲
✔️ c4ddf07 #5 2023-12-06 21:07:03 ~11 min tests 📄log

Copy link
Contributor

@yqrashawn yqrashawn left a comment

Choose a reason for hiding this comment

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

LGTM

@ilmotta ilmotta force-pushed the feat/show-community-name branch from 2b1d5f2 to 2d3b523 Compare December 6, 2023 10:44
Copy link
Contributor

@ajayesivan ajayesivan left a comment

Choose a reason for hiding this comment

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

Screenshot 2023-12-06 at 16 21 11

Is the full width of community context tag expected?

@@ -185,7 +185,7 @@
[quo/button
{:on-press
(if config/community-accounts-selection-enabled?
#(rf/dispatch [:open-modal :community-account-selection community])
#(rf/dispatch [:open-modal :community-account-selection {:community-id id}])
#(rf/dispatch [:open-modal :community-requests-to-join community]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we pass the argument as line above?
instead of comunity we use {:community-id id}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The community map is huge, even containing encoded images. We should avoid passing it around if possible because the data (screen params) is going to be stored in the app db and used by a subscription and the view too. This puts more stress on re-frame and Reagent to compute if something needs to rendered. So here I changed the code to pass the community ID to the screen params so that the view layer can get the community from a subscription.

Copy link
Contributor

@FFFra FFFra left a comment

Choose a reason for hiding this comment

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

LGTM! Just left a comment.

Great job1

@ilmotta
Copy link
Contributor Author

ilmotta commented Dec 6, 2023

There's a known bug where the background of the context tag extends up to the available width of the parent container. This PR is not fixing that.

I mentioned this in the PR description @ajayesivan:

There's a known bug where the background of the context tag extends up to the available width of the parent container. This PR is not fixing that.

I've seen this problem somewhere, it's not right.

@ajayesivan
Copy link
Contributor

Thank you @ilmotta. I missed that part 🙃

@ilmotta ilmotta force-pushed the feat/show-community-name branch from 2d3b523 to be6870d Compare December 6, 2023 12:35
@status-im-auto
Copy link
Member

71% of end-end tests have passed

Total executed tests: 48
Failed tests: 8
Expected to fail tests: 6
Passed tests: 34
IDs of failed tests: 704613,702948,703133,702809,703629,702786,702869,702845 
IDs of expected to fail tests: 702846,702732,702894,703503,702731,702808 

Failed tests (8)

Click to expand
  • Rerun failed tests

  • Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613

    Device 1: Find `Button` by `xpath`: `//*[@text="open community"]`
    Device 1: Tap on found: Button

    critical/test_deep_and_universal_links.py:56: in test_links_open_universal_links_from_chat
        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))]))
     Profile was not opened by the profile url https://status.app/u/G10A4B0JdgwyRww90WXtnP1oNH1ZLQNM0yX0Ja9YyAMjrqSZIYINOHCbFhrnKRAcPGStPxCMJDSZlGCKzmZrJcimHY8BbcXlORrElv_BbQEegnMDPx1g9C5VVNl0fE4y#zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_hashtag_links_to_community_channels, id: 702948

    Test setup failed: base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:778: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:322: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].error += str(e)
    E   TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
    



    2. test_community_markdown_support, id: 702809

    Test setup failed: base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:778: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:322: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].error += str(e)
    E   TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
    



    3. test_community_join_when_node_owner_offline, id: 703629

    Test setup failed: base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:778: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:322: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].error += str(e)
    E   TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
    



    4. test_community_mentions_push_notification, id: 702786

    Test setup failed: base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:778: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:322: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].error += str(e)
    E   TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
    



    5. test_community_leave, id: 702845

    Test setup failed: base_test_case.py:316: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_public_chat_browsing.py:778: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:322: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].error += str(e)
    E   TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
    



    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/chats/test_public_chat_browsing.py:274: in test_restore_multiaccount_with_waku_backup_remove_switch
        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))]))
     Incorrect contacts number restored: 3 instead of 2
    



    Device sessions

    2. test_community_undo_delete_message, id: 702869

    Device 1: Tap on found: Button
    Device 1: Find Button by xpath: //*[@text="Undo"]

    critical/chats/test_public_chat_browsing.py:111: in test_community_undo_delete_message
        self.channel.element_by_text("Undo").click()
    ../views/base_element.py:90: in click
        self.find_element().click()
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:94: in click
        self._execute(Command.CLICK_ELEMENT)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:395: in _execute
        return self._parent.execute(command, params)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    /usr/local/lib/python3.10/dist-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     The element 'By.xpath: //*[@text="Undo"]' does not exist 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: //*[@text="Undo"]' does not exist in DOM anymore
    E   	at io.appium.uiautomator2.model.ElementsCache.restore(ElementsCache.java:117)
    E   	at io.appium.uiautomator2.model.ElementsCache.get(ElementsCache.java:153)
    E   	at io.appium.uiautomator2.handler.Click.safeHandle(Click.java:36)
    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:919)
    



    Device sessions

    Expected to fail tests (6)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 1: Find ProfileSendMessageButton by accessibility id: Chat-item-button
    Device 1: Sending message 'piy'

    critical/chats/test_public_chat_browsing.py:741: 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))]))
     Chat with unblocked user was not enabled after 1 minute 
    

    [[Message can be missed after unblock: https://github.com//issues/16873]]

    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]]

    2. 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:323: 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 
    

    [[Data delivery issue]]

    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_community_navigate_to_channel_when_relaunch, id: 702846

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Issue #18075]]

    2. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

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

    Passed tests (34)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_unread_messages_badge, id: 702841
    Device sessions

    2. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    3. test_community_one_image_send_reply, id: 702859
    Device sessions

    4. test_community_several_images_send_reply, id: 703194
    Device sessions

    5. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    6. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    7. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    8. test_community_message_delete, id: 702839
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_mute_community_and_channel, id: 703382
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_other_apps, id: 704614
    Device sessions

    2. test_links_deep_links, id: 702775
    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

    3. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    2. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    6. test_1_1_chat_edit_message, id: 702855
    Device sessions

    7. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_reactions, id: 703202
    Device sessions

    2. test_group_chat_mute_chat, id: 703495
    Device sessions

    3. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    4. test_group_chat_send_image_save_and_share, id: 703297
    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 TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    2. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    3. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    @ilmotta ilmotta force-pushed the feat/show-community-name branch from be6870d to 3038a44 Compare December 6, 2023 20:43
    @ilmotta ilmotta force-pushed the feat/show-community-name branch from 3038a44 to c4ddf07 Compare December 6, 2023 20:54
    @ilmotta ilmotta merged commit 03444ae into develop Dec 6, 2023
    6 checks passed
    @ilmotta ilmotta deleted the feat/show-community-name branch December 6, 2023 21:10
    @ilmotta
    Copy link
    Contributor Author

    ilmotta commented Dec 6, 2023

    @status-im/mobile-qa, I merged this PR because all its code runs behind a disabled feature toggle (we enable only during development). For the next couple weeks we will probably continue to rely mostly on e2e tests and our manual checks to make sure we respect the feature toggle and not cause any regression. The flows for joining communities shouldn't be affected at all.

    In the cases where we do touch code outside the toggle's umbrella we will definitely ask for your reviews :)

    @Samyoul Samyoul added the community-account-selection https://www.notion.so/Ledger-Drops-b0df9c843f904bb380133375bae3faa7 label Feb 2, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    community community-account-selection https://www.notion.so/Ledger-Drops-b0df9c843f904bb380133375bae3faa7
    Projects
    Archived in project
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Communities: show name of community when joining a community
    6 participants