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

[PAID] LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title #32555

Closed
1 of 6 tasks
izarutskaya opened this issue Dec 6, 2023 · 47 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Dec 6, 2023

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:
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on a chat
  3. Send a message with uneven spacing
  4. Long press the message sent and select Reply in thread
  5. Note the header in mweb
  6. Launch app
  7. Perform step 2-step4
  8. Note the header in Android

Expected Result:

In reply thread page, in both mweb and Android, the title must be shown in a consistent way.

Actual Result:

In reply thread page, in mweb, text title is shown with normal spacing but in Android, with uneven spacing as text entered, it is displayed.

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

Bug6302743_1701842027653.reep.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01208eb9280d67b191
  • Upwork Job ID: 1732348414892351488
  • Last Price Increase: 2023-12-27
  • Automatic offers:
    • alitoshmatov | Reviewer | 28088147
    • tienifr | Contributor | 28088148
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 6, 2023
@melvin-bot melvin-bot bot changed the title Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title Dec 6, 2023
Copy link

melvin-bot bot commented Dec 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01208eb9280d67b191

Copy link

melvin-bot bot commented Dec 6, 2023

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Dec 6, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 6, 2023
Copy link

melvin-bot bot commented Dec 6, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)

@tienifr
Copy link
Contributor

tienifr commented Dec 6, 2023

Proposal

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

In reply thread page, in mweb, text title is shown with normal spacing but in Android, with uneven spacing as text entered, it is displayed.

What is the root cause of that problem?

We have white-space: nowrap set for the thread header so it doesn't preserve the white space in web. Making it inconsistent with Android.

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

Remove white-space: nowrap for the thread header here so it preserves the white space in web. Or can add pre or pre-wrap as well.

To handle the text with new lines, we can format the text by removing line breaks similar to here

This approach is the same as in this PR where we fix this same problem in another place (LHN)

What alternative solutions did you explore? (Optional)

If we want to collapse white space, use whitespace: noWrap for the component of header for Android as well.

@bernhardoj
Copy link
Contributor

bernhardoj commented Dec 6, 2023

Proposal

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

The thread title in header have a different white space behavior between native and mWeb.

What is the root cause of that problem?

We previously fixed this by adding a white-space of pre, but the title has a style of white-space: no-wrap which overrides the white-space from textStyles

style={[textStyles, styles.pRelative, numberOfLines === 1 ? styles.noWrap : {}]}

no-wrap will collapse the whitespace and white-sapce is only available on web, that's why we have a different whitespace behavior

no-wrap is added to fix an issue of a money request header title contains a multiline description.
#21664 (comment)

If we remove the no-wrap, a money request header with multiline description will shows as multi line.

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

First, remove the white-space no-wrap style from DisplayNameWithTooltips.

Next, to fix the multiline issue, we can replace all new line from the money request description with an empty string, just like we did in #27822

comment: transactionDetails?.comment ?? '',

comment: (transactionDetails?.comment ?? '').replace(CONST.REGEX.LINE_BREAK, '')

@yh-0218
Copy link
Contributor

yh-0218 commented Dec 6, 2023

Proposal

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

The thread title in header have a different white space behavior between native and mWeb.

What is the root cause of that problem?

On mWeb, we use styles.noWrap and this make several space to one space.

style={[textStyles, styles.pRelative, numberOfLines === 1 ? styles.noWrap : {}]}

On native, we don't have that and that doesn't work on native.

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

We need add new function for native

const title = String(fullTitle).trim().replace(/\s\s+/g, ' ').trim();

And use title instead of fullTitle

{fullTitle || translate('common.hidden')}

What alternative solutions did you explore? (Optional)

Screenshot 2023-12-06 at 8 53 01 PM

@strepanier03
Copy link
Contributor

Raised for internal discussion, pausing.

@quinthar
Copy link
Contributor

quinthar commented Dec 7, 2023

Let's keep this, cross-platform consistency ftw. Adding to VIP.

@quinthar quinthar changed the title [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title Dec 8, 2023
@strepanier03
Copy link
Contributor

@quinthar - Is Daily still the right priority for this one or can we move it to at least weekly since it's low?

@melvin-bot melvin-bot bot added the Overdue label Dec 11, 2023
@strepanier03
Copy link
Contributor

Moving this to weekly since it's Low priority. Please feel free to update labels as needed when priority changes.

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
@strepanier03 strepanier03 added Weekly KSv2 and removed Daily KSv2 labels Dec 11, 2023
Copy link

melvin-bot bot commented Dec 13, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@alitoshmatov
Copy link
Contributor

Reviewing

@quinthar quinthar moved this from LOW to MEDIUM in [#whatsnext] #vip-vsb Dec 19, 2023
@quinthar quinthar moved this from MEDIUM to LOW in [#whatsnext] #vip-vsb Dec 19, 2023
@alitoshmatov
Copy link
Contributor

@strepanier03 Can you clarify what is the expected outcome here.

If text with multiple consequent spaces are enter(hello world), how we should show it?

a) Collapse spaces - hello world
b) Keep them and display them as it is

Copy link

melvin-bot bot commented Jan 8, 2024

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2024
@techievivek
Copy link
Contributor

Ooops sorry, I missed the ping.

@strepanier03
Copy link
Contributor

Thanks @techievivek - @tienifr will you submit the draft PR soon?

@strepanier03
Copy link
Contributor

All good Melvin.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Jan 10, 2024
@tienifr
Copy link
Contributor

tienifr commented Jan 11, 2024

@strepanier03 Opps. I thought that's because I marked the PR ready when GH was down several days ago so there's error and nothing happened. Anw it's ready for review now.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 17, 2024
@melvin-bot melvin-bot bot changed the title LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title [HOLD for payment 2024-01-24] LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title Jan 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 17, 2024
Copy link

melvin-bot bot commented Jan 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jan 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.25-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-01-24. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 17, 2024

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:

  • [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
  • [@alitoshmatov] 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:
  • [@alitoshmatov] 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:
  • [@alitoshmatov] Determine if we should create a regression test for this bug.
  • [@alitoshmatov] 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.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@alitoshmatov
Copy link
Contributor

@alitoshmatov
Copy link
Contributor

This is ready for payment

@strepanier03
Copy link
Contributor

Dang, another one where the automation didn't work to move this over to Daily. I'll work on this now.

@strepanier03 strepanier03 added Daily KSv2 and removed Weekly KSv2 labels Jan 26, 2024
@strepanier03
Copy link
Contributor

All paid up and contracts closed. Thanks everyone!

@github-project-automation github-project-automation bot moved this from LOW to CRITICAL in [#whatsnext] #vip-vsb Jan 26, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-01-24] LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title [PAID] LOW: [$500] Android-Thread-In Android, with uneven spacing as text entered, displayed in reply thread title Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: CRITICAL
Development

No branches or pull requests

8 participants