Skip to content

Conversation

flexsurfer
Copy link
Contributor

@flexsurfer flexsurfer commented Apr 7, 2025

fixes #22404
fixes #22405
fixes #22407
fixes #22408

Screen.Recording.2025-05-16.at.12.55.47.mov

status-go: status-im/status-go#6584

@flexsurfer flexsurfer self-assigned this Apr 7, 2025
@status-im-auto
Copy link
Member

status-im-auto commented Apr 7, 2025

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5f4729f #1 2025-04-07 12:26:15 ~4 min tests 📄log
✔️ 5f4729f #1 2025-04-07 12:29:31 ~8 min android-e2e 🤖apk 📲
✔️ 5f4729f #1 2025-04-07 12:30:08 ~8 min android 🤖apk 📲
✔️ 5f4729f #1 2025-04-07 12:33:56 ~12 min ios 📱ipa 📲
✔️ 8393351 #2 2025-05-16 10:59:52 ~5 min tests 📄log
✔️ 8393351 #2 2025-05-16 11:04:26 ~9 min android-e2e 🤖apk 📲
✔️ 8393351 #2 2025-05-16 11:05:01 ~10 min android 🤖apk 📲
✔️ 8393351 #2 2025-05-16 11:08:27 ~13 min ios 📱ipa 📲
✔️ 0d5727d #3 2025-05-19 10:50:34 ~7 min android-e2e 🤖apk 📲
✔️ 0d5727d #3 2025-05-19 10:50:53 ~7 min tests 📄log
✔️ 0d5727d #3 2025-05-19 10:54:18 ~11 min android 🤖apk 📲
✔️ 0d5727d #3 2025-05-19 11:02:41 ~19 min ios 📱ipa 📲
✔️ e335e9e #4 2025-05-19 11:18:17 ~4 min tests 📄log
✔️ e335e9e #4 2025-05-19 11:22:06 ~8 min android-e2e 🤖apk 📲
✔️ e335e9e #4 2025-05-19 11:22:43 ~8 min android 🤖apk 📲
✔️ e335e9e #4 2025-05-19 11:26:10 ~12 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 59323e5 #5 2025-05-19 14:29:41 ~4 min tests 📄log
✔️ 59323e5 #5 2025-05-19 14:33:41 ~8 min android-e2e 🤖apk 📲
✔️ 59323e5 #5 2025-05-19 14:34:13 ~8 min android 🤖apk 📲
✔️ 59323e5 #5 2025-05-19 14:36:51 ~11 min ios 📱ipa 📲
✔️ 09a4dfa #6 2025-05-20 07:43:26 ~5 min tests 📄log
✔️ 09a4dfa #6 2025-05-20 07:45:55 ~8 min android 🤖apk 📲
✔️ 09a4dfa #6 2025-05-20 07:46:09 ~8 min android-e2e 🤖apk 📲
✔️ 09a4dfa #6 2025-05-20 07:49:55 ~12 min ios 📱ipa 📲
✔️ 09a4dfa #7 2025-05-21 08:22:31 ~4 min tests 📄log
✔️ 09a4dfa #7 2025-05-21 08:26:11 ~8 min android-e2e 🤖apk 📲
✔️ 09a4dfa #7 2025-05-21 08:26:50 ~8 min android 🤖apk 📲
✔️ 09a4dfa #7 2025-05-21 08:30:27 ~12 min ios 📱ipa 📲

@flexsurfer flexsurfer moved this from REVIEW to CONTRIBUTOR in Pipeline for QA May 16, 2025
@flexsurfer flexsurfer force-pushed the feature/News-Feed]-Implement-News-AC-component-#22404 branch from 5f4729f to 8393351 Compare May 16, 2025 10:54
@flexsurfer flexsurfer changed the title [WIP] [#22404] [News Feed] Implement News AC component [#22404] [News Feed] Implement News AC component May 16, 2025
@flexsurfer flexsurfer moved this from CONTRIBUTOR to REVIEW in Pipeline for QA May 16, 2025
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.

Thank you @flexsurfer. While testing the PR, I realized we are showing these <br> tags, but this looks bad, especially for non-technical users.

I haven't checked how the text transformation is done in status-go, but I believe we should strip the news feed text from HTML tags and deliver it ready for consumption. Well, at least the obvious cases, like br tags should be considered. @jrainville do you know if this can be fixed for this release?

A simple approach that I've seen is to replace each br tag with a newline character. Another approach is to transform the text to simple markdown (no extensions), but this may not be rendered well in mobile.

@@ -38,6 +39,14 @@
(not preview-privacy?)]))
[preview-privacy?])

toggle-news-feed
(rn/use-callback (fn []
(rf/dispatch [:profile.settings/profile-update :news-feed-enabled?
Copy link
Contributor

Choose a reason for hiding this comment

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

Sharing for awareness: it's not the first time I see an opportunity to make settings_saveSetting support multiple settings at once so that we can do one atomic update.

[utils.i18n :as i18n]
[utils.re-frame :as rf]))

(defn auto-resized-image
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use custom hooks more often, even if they will be used only once, since a hook is just a function anyway. The following is untested code. This allows us to decouple state management & effects from hiccup.

Note: untested code.
Note 2: I'm passing the url as a dependency to use-effect

(defn- use-auto-image-height
  [url]
  (let [[height set-height] (rn/use-state nil)
        window-width        (- (:width (rn/get-window)) 40)]
    (rn/use-effect
     (fn []
       (-> (rn/image-get-size url)
           (promesa/then (fn [[w h]]
                           (let [scale      (/ window-width w)
                                 new-height (* h scale)]
                             (set-height new-height))))))
     [url])
    {:height height
     :width  window-width}))

(defn auto-resized-image
  [url]
  (let [{:keys [height width]} (use-auto-image-height url)]
    (if height
      [rn/image
       {:resize-mode :contain
        :style       {:width         width
                      :height        height
                      :align-self    :center
                      :border-radius 12}
        :source      url}]
      [rn/view {:style {:height 200 :align-items :center :justify-content :center}}
       [rn/activity-indicator]])))

@ilmotta
Copy link
Contributor

ilmotta commented May 19, 2025

@flexsurfer @xAlisher Some notification types have a default action when pressed. For thew News Feed notifications I think we should also have a default action and make the on-press of the notification open the bottom sheet, so that the user doesn't have to exactly press on "Read more"

@flexsurfer
Copy link
Contributor Author

Thank you @flexsurfer. While testing the PR, I realized we are showing these <br> tags, but this looks bad, especially for non-technical users.

I haven't checked how the text transformation is done in status-go, but I believe we should strip the news feed text from HTML tags and deliver it ready for consumption. Well, at least the obvious cases, like br tags should be considered. @jrainville do you know if this can be fixed for this release?

A simple approach that I've seen is to replace each br tag with a newline character. Another approach is to transform the text to simple markdown (no extensions), but this may not be rendered well in mobile.

thanks @ilmotta i think it's just a bad test example, i just copy pasted it from our blog, it won't be a case for the real news in production, nobody will use tags there, so we're fine

@ilmotta
Copy link
Contributor

ilmotta commented May 19, 2025

thanks @ilmotta i think it's just a bad test example, i just copy pasted it from our blog, it won't be a case for the real news in production, nobody will use tags there, so we're fine

Oh in that case sounds great @flexsurfer. The reason I asked this is also because the Discord bridge also has an issue where messages will appear with br tags, making reading messages in Status app quite annoying, so I thought something similar could be going on.

@flexsurfer flexsurfer moved this from REVIEW to E2E Tests in Pipeline for QA May 19, 2025
@flexsurfer flexsurfer requested a review from ilmotta May 19, 2025 10:44
@status-im-auto
Copy link
Member

79% of end-end tests have passed

Total executed tests: 24
Failed tests: 5
Expected to fail tests: 0
Passed tests: 19
IDs of failed tests: 741840,727230,741612,741841,742016 

Failed tests (5)

Click to expand
  • Rerun failed tests

  • Class TestWalletCollectibles:

    1. test_wallet_send_collectible, id: 741840

    Device 1: Tap on found: Button
    Device 1: Wait for element `CollectibleItemElement` for max 20s and click when it is available

    wallet/test_collectibles.py:108: in test_wallet_send_collectible
        self.wallet_view.get_collectible_element('BVL').wait_and_click(20)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:139: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: CollectibleItemElement by xpath:`//*[@content-desc='collectible-list-item']//*[contains(@text,'BVL')]/../..` is not found on the screen after wait_for_visibility_of_element
    



    Device sessions

    2. test_wallet_collectible_send_from_expanded_info_view, id: 741841

    Device 1: Find CollectibleItemElement by xpath: //*[@content-desc='collectible-list-item']//*[contains(@text,'Glitch Punks')]/../..
    Device 1: Find CollectibleItemElement by xpath: //*[@content-desc='collectible-list-item']//*[contains(@text,'Glitch Punks')]/../..

    wallet/test_collectibles.py:159: in test_wallet_collectible_send_from_expanded_info_view
        self.wallet_view.get_collectible_element('Glitch Punks').scroll_and_click()
    ../views/base_element.py:209: in scroll_and_click
        self.scroll_to_element(direction=direction)
    ../views/base_element.py:204: in scroll_to_element
        raise NoSuchElementException(
     Device 1: CollectibleItemElement by xpath: `//*[@content-desc='collectible-list-item']//*[contains(@text,'Glitch Punks')]/../..` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_bridge_flow_mainnet, id: 741612

    Device 1: Find SlideButton by xpath: //*[@resource-id='slide-button-track']
    Device 1: Click system back button

    wallet/test_wallet_mainnet_no_send.py:349: in test_wallet_bridge_flow_mainnet
        self.errors.verify_no_errors()
    base_test_case.py:207: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Device 1: Base to Optimism: Max fees is not shown before pressing Review Bridge button
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_erc20_from_drawer[Optimism Sepolia-USD Coin-USDC-2-0.01], id: 727230

    Device 1: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='USD Coin']/../android.widget.TextView[3]
    Device 1: Text is 47 USDC (EVM)

    wallet_txs/test_wallet_testnet.py:101: in test_wallet_send_erc20_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:207: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Device 1: Verification of last transaction failed.The failed check: amount (Expected: 0.01 USDC, Found: 0.01 USDC (EVM))
    



    Device sessions

    2. test_wallet_send_erc20_from_drawer[Sepolia-USD Coin-USDC-2-0.01], id: 742016

    Device 1: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='USD Coin']/../android.widget.TextView[3]
    Device 1: Text is 47.01 USDC (EVM)

    wallet_txs/test_wallet_testnet.py:101: in test_wallet_send_erc20_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:207: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Device 1: Verification of last transaction failed.The failed check: amount (Expected: 0.01 USDC, Found: 0.01 USDC (EVM))
    



    Device sessions

    Passed tests (19)

    Click to expand

    Class TestWalletCollectibles:

    1. test_wallet_collectibles_balance, id: 741839
    Device sessions

    Class TestWalletCustomParamOneDevice:

    1. test_send_snt_custom_tx_params, id: 742910
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_send_eth[Status Network Sepolia-0.0002], id: 727229
    Device sessions

    2. test_send_eth[Arbitrum Sepolia-0.0001], id: 742015
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    2. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    3. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_delete, id: 702839
    Device sessions

    2. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    3. test_community_one_image_send_reply_set_reaction, id: 702859
    Device sessions

    4. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDeviceTwo:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestProfileMultipleDevices:

    1. test_profile_change_profile_photo, id: 741969
    Device sessions

    2. test_profile_change_username, id: 741968
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_swap_flow_mainnet, id: 741555
    Device sessions

    2. test_wallet_balance_mainnet, id: 740490
    Device sessions

    3. test_wallet_send_flow_mainnet, id: 741554
    Device sessions

    @pavloburykh pavloburykh self-assigned this May 19, 2025
    @pavloburykh
    Copy link
    Contributor

    Hey @flexsurfer

    Do we have any documented requirements or guidelines on what types of content are supported in mobile News Feed posts?

    For example, when creating a post in Ghost.io, I tried testing various content types - images, image galleries, dividers, embedded YouTube videos, toggle headers, markdown formatting, etc. - but none of them rendered properly in the Status app (except text and buttons).

    I'm wondering if the content creators are aware of these limitations. Is this captured anywhere in documentation or specs?

    Attaching:

    • Video from Ghost.io editor

    • Video showing how the post appears in the Status app

    12312423432.mp4
    telegram-cloud-document-2-5285423377643764090.mp4

    link to the Post https://status-news-feed-mobile.ghost.io/test-different-types-of-data-in-post/

    cc @ilmotta

    @pavloburykh pavloburykh moved this from E2E Tests to IN TESTING in Pipeline for QA May 19, 2025
    @flexsurfer
    Copy link
    Contributor Author

    @pavloburykh in this PR only plain text is supported, not sure about future

    @flexsurfer flexsurfer force-pushed the feature/News-Feed]-Implement-News-AC-component-#22404 branch from e335e9e to 59323e5 Compare May 19, 2025 14:25
    @pavloburykh
    Copy link
    Contributor

    ISSUE 1 Missing unread dot near unread News notification

    Steps:

    1. Generate News notification
    2. Open Activity center
    3. See if there is unread dot near unread notification

    Actual result: not unread dot

    photo_2025-05-19 17 29 26

    telegram-cloud-document-2-5285423377643764494.mp4

    Expected result: unread dot is shown

    Figma

    Shell -- Mobile – Figma 2025-05-19 17-30-51

    @pavloburykh
    Copy link
    Contributor

    ISSUE 2 Text and feature image disappear on Android

    Reproduced on Android 12, Samsung Galaxy A52

    Steps:

    1. Generate a post with a long text

    Examples of posts:
    https://status-news-feed-mobile.ghost.io/ghost/#/editor/post/682c237c86b66b00012f25f1/
    https://status-news-feed-mobile.ghost.io/ghost/#/editor/post/682c21bf86b66b00012f25e1/

    1. Open the Post in Activity Center
    2. Observe the result

    Actual result:

    1. When user opens the Post for the first time - the text and feature image might be visible. Although text is not scrollable.
    2. When user opens the Post for the second time - the text and feature image disappear. Only Title is left
    telegram-cloud-document-2-5287498220509884504.mp4

    @flexsurfer
    Copy link
    Contributor Author

    thanks @pavloburykh ISSUE 1 is fixed

    @flexsurfer
    Copy link
    Contributor Author

    @flexsurfer @xAlisher Some notification types have a default action when pressed. For thew News Feed notifications I think we should also have a default action and make the on-press of the notification open the bottom sheet, so that the user doesn't have to exactly press on "Read more"

    fixed, also mark notification as read on press

    @flexsurfer
    Copy link
    Contributor Author

    @pavloburykh i would file ISSUE 2 separately with low prio wdyt?

    @pavloburykh
    Copy link
    Contributor

    @pavloburykh i would file ISSUE 2 separately with low prio wdyt?

    Hmm… honestly, I’m not sure we can treat this as a low-priority issue. From a user’s perspective, the news notification appears broken - the content disappears - which seems like a critical problem for this feature.

    That said, if you feel differently, we could check with @ilmotta and get a second opinion.

    @ilmotta
    Copy link
    Contributor

    ilmotta commented May 20, 2025

    @pavloburykh @flexsurfer, regarding ISSUE 2.

    Reproduced on Android 12, Samsung Galaxy A52

    Does the bug appear in other Android devices besides the Samsung Galaxy? Does it happen in a similar device with another Android version? I understand this can be tricky or time consuming to verify @pavloburykh, but it would help us make the best decision. If it does fail in other devices/OSes, then the problem is quite important to be fixed. If the bug is isolated to just this single Galaxy phone, then the bug could be fixed in a follow-up as @flexsurfer suggested.

    the content disappears - which seems like a critical problem for this feature.

    From the video, I also got this impression that the bug is actually quite critical because it undermines the basic experience.

    @pavloburykh
    Copy link
    Contributor

    pavloburykh commented May 20, 2025

    @pavloburykh @flexsurfer, regarding ISSUE 2.

    Reproduced on Android 12, Samsung Galaxy A52

    Does the bug appear in other Android devices besides the Samsung Galaxy? Does it happen in a similar device with another Android version? I understand this can be tricky or time consuming to verify @pavloburykh, but it would help us make the best decision. If it does fail in other devices/OSes, then the problem is quite important to be fixed. If the bug is isolated to just this single Galaxy phone, then the bug could be fixed in a follow-up as @flexsurfer suggested.

    the content disappears - which seems like a critical problem for this feature.

    From the video, I also got this impression that the bug is actually quite critical because it undermines the basic experience.

    Thanks @ilmotta!

    The bug is reproducible on Pixel 7a, Android 15 as well (thanks to @Horupa-Olena for verifying). So we need to fix it.

    • long notification is not scrollable (sorry, it is not visible on the video but we actually try to scroll the post after first opening, when text and picture are still visible)
    • text, picture disappear after second opening
    telegram-cloud-document-2-5287551924780956066.mp4

    cc @flexsurfer

    @jakubgs jakubgs closed this May 20, 2025
    @jakubgs jakubgs deleted the feature/News-Feed]-Implement-News-AC-component-#22404 branch May 20, 2025 20:42
    @github-project-automation github-project-automation bot moved this from IN TESTING to DONE in Pipeline for QA May 20, 2025
    @jakubgs jakubgs restored the feature/News-Feed]-Implement-News-AC-component-#22404 branch May 21, 2025 08:17
    @jakubgs jakubgs reopened this May 21, 2025
    @github-project-automation github-project-automation bot moved this from DONE to CONTRIBUTOR in Pipeline for QA May 21, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: CONTRIBUTOR
    6 participants