Skip to content

[HOLD for Payment OCT 08] [$250] [Search v2.3] - Default name is not displayed correctly for multiline system message thread #49330

Closed

Description

@IuliiaHerets

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.36-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to DM.
  3. Submit an expense with a multiline description.
  4. Go to transaction thread.
  5. Click Description.
  6. Edit the description while maintaining the multiline format and save it.
  7. Right click on the system message > Reply in thread.
  8. Send a reply in thread.
  9. Go to Search > Chats.
  10. Click Filters > Select "In".
  11. Select the thread in Step 8 > Save.
  12. Click Save search.

Expected Result:

The title of the saved search should only have one line.

Actual Result:

The title of the saved search has multiple lines and it is not displayed correctly.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6606270_1726554285396.20240917_141656.mp4
Bug6606270_1726554285396!Screenshot_2024-09-17_at_14 22 04

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836683698134866207
  • Upwork Job ID: 1836683698134866207
  • Last Price Increase: 2024-09-19
  • Automatic offers:
    • paultsimura | Reviewer | 104047003
    • Krishna2323 | Contributor | 104047004
Issue OwnerCurrent Issue Owner: @paultsimura

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 17, 2024
  2. melvin-bot commented on Sep 17, 2024

    @melvin-bot

    Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. IuliiaHerets commented on Sep 17, 2024

    @IuliiaHerets
    Author

    We think that this bug might be related to #wave-control

  4. IuliiaHerets commented on Sep 17, 2024

    @IuliiaHerets
    Author

    @abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  5. andriivitiv commented on Sep 17, 2024

    @andriivitiv
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Saved search - Default name is not displayed correctly for multiline system message thread

    What is the root cause of that problem?

    The title text is not wrapped correctly.

    What changes do you think we should make in order to solve the problem?

    Add titleStyle: styles.textNoWrap, here

  6. drminh2807 commented on Sep 17, 2024

    @drminh2807
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Saved search - Default name is not displayed correctly for multiline system message thread

    What is the root cause of that problem?

    The title text is not wrapped correctly.

    What changes do you think we should make in order to solve the problem?

    add numberOfLinesTitle: 2, in

    const baseMenuItem: SavedSearchMenuItem = {
    key,
    title,
    hash: key,
    query: item.query,
    shouldShowRightComponent: true,
    focused: Number(key) === hash,
    onPress: () => {
    SearchActions.clearAllFilters();
    Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: item?.query ?? ''}));

    What alternative solutions did you explore? (Optional)

    add noWrap style
    titleStyle: styles.textNoWrap,

  7. Krishna2323 commented on Sep 17, 2024

    @Krishna2323
    Contributor

    Proposal


    Please re-state the problem that we are trying to solve in this issue.

    Saved search - Default name is not displayed correctly for multiline system message thread

    What is the root cause of that problem?

    The default value for numberOfLinesTitle is 1 but the text overflows because we are applying styles.pre instead of styles.noWrap.

    numberOfLinesTitle = 1,

    const combinedTitleTextStyle = StyleUtils.combineStyles(
    [
    styles.flexShrink1,
    styles.popoverMenuText,
    // eslint-disable-next-line no-nested-ternary
    shouldPutLeftPaddingWhenNoIcon || (icon && !Array.isArray(icon)) ? (avatarSize === CONST.AVATAR_SIZE.SMALL ? styles.ml2 : styles.ml3) : {},
    shouldShowBasicTitle ? {} : styles.textStrong,
    numberOfLinesTitle !== 1 ? styles.preWrap : styles.pre,
    interactive && disabled ? {...styles.userSelectNone} : {},
    styles.ltr,
    isDeleted ? styles.offlineFeedback.deleted : {},
    ],
    titleStyle ?? {},
    );

    What changes do you think we should make in order to solve the problem?


    We should update the condition below to numberOfLinesTitle !== 1 ? styles.preWrap : styles.noWrap,.

    numberOfLinesTitle !== 1 ? styles.preWrap : styles.pre,

    What alternative solutions did you explore? (Optional)

    • Add numberOfLinesTitle: 2 in createSavedSearchMenuItem..
    • Same should be applied in SearchTypeMenuNarrow.

    Result

  8. truph01 commented on Sep 18, 2024

    @truph01
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    • The title of the saved search has multiple lines and it is not displayed correctly.

    What is the root cause of that problem?

    • We return the raw report name in this:
      return ReportUtils.getReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${filter}`]);

    so the saved search name can contain multiple lines.

    What changes do you think we should make in order to solve the problem?

    • We can fix the issue by fixing the Text style, but with that approach, we need to apply the fix on all platforms. So I suggest that we can format this:

    return ReportUtils.getReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${filter}`]);

    so it can be:

            return ReportUtils.formatReportLastMessageText(ReportUtils.getReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${filter}`]));
    

    like we did in this:

    ? ReportUtils.formatReportLastMessageText(fullTitle)

    What alternative solutions did you explore? (Optional)

  9. changed the title [-]Saved search - Default name is not displayed correctly for multiline system message thread[/-] [+][Search v2.3] - Default name is not displayed correctly for multiline system message thread[/+] on Sep 19, 2024
  10. 27 remaining items

  11. shawnborton commented on Sep 20, 2024

    @shawnborton
    Contributor

    Ah nice, that's much better

  12. Krishna2323 commented on Sep 20, 2024

    @Krishna2323
    Contributor

    @Krishna2323 please consider this in your PR.

    Yeah, sure.

  13. Krishna2323 commented on Sep 20, 2024

    @Krishna2323
    Contributor

    @paultsimura, PR ready for review ^

  14. moved this from Polish to Done in #expensify-bugson Sep 26, 2024
  15. luacmartins commented on Sep 26, 2024

    @luacmartins
    Contributor

    PR merged

  16. paultsimura commented on Oct 1, 2024

    @paultsimura
    Contributor

    Deployed to production on Oct 1. Payment is due on 2024-10-08

  17. abekkala commented on Oct 2, 2024

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR OCT 08

  18. abekkala commented on Oct 2, 2024

    @abekkala
    Contributor

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@paultsimura] The PR that introduced the bug has been identified. Link to the PR:
    • [@paultsimura] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@paultsimura] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
    • [@paultsimura] Determine if we should create a regression test for this bug.
    • [@paultsimura] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  19. changed the title [-][$250] [Search v2.3] - Default name is not displayed correctly for multiline system message thread[/-] [+][HOLD for Payment OCT 08] [$250] [Search v2.3] - Default name is not displayed correctly for multiline system message thread[/+] on Oct 2, 2024
  20. paultsimura commented on Oct 8, 2024

    @paultsimura
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: note: It's not an offending PR as such, just a PR that tried to solve an existing problem, but didn't do it fully: Fix/37448: Incorrect title thread #38267
    • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/38267/files#r1791506146
    • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
    • Determine if we should create a regression test for this bug: Yes
    • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. Go to DM.
    2. Submit an expense with a multiline description.
    3. Go to the transaction thread.
    4. Click Description.
    5. Edit the description while maintaining the multiline format and save it.
    6. Right-click on the system message > Reply in thread.
    7. Send a reply in the thread.
    8. Go to Search > Chats.
    9. Click Filters > Select "In".
    10. Select the thread in Step 7 > Save.
    11. Click "Save search".
    12. Verify the title of the saved search is only shown in one line.

    Do we agree 👍 or 👎

  21. abekkala commented on Oct 8, 2024

    @abekkala
    Contributor

    @Krishna2323 @paultsimura payments sent and contracts ended - thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions