Skip to content

[HOLD for payment 2023-06-19] [$1000] Long-pressing the empty right section of a message with just a link doesn't show correct options. #19934

Closed

Description

@kavimuru

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


Action Performed:

  1. Log into an account on mobile and open a chat.
  2. Type a message into the composer that contains only a link e.g. 'google.com', '# google.com', or '> google.com'.
  3. Long-press the empty section on the right side of the link to bring up the message's options.

Expected Result:

The options shown in the modal should include, for example, editing the message, deleting the message, replying in a thread, etc.

Actual Result:

The only option shown is to copy the link to the clipboard.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.21-2
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

expensify-link-message-bug.mov
az_recorder_20230531_233139.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Victor-Nyagudi
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685357040272429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0178d9eb714da9b983
  • Upwork Job ID: 1664225537139695616
  • Last Price Increase: 2023-06-01

Activity

  1. added
    Daily
    Bug
    on Jun 1, 2023
  2. melvin-bot commented on Jun 1, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 1, 2023

    @melvin-bot

    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
  4. esh-g commented on Jun 1, 2023

    @esh-g
    Contributor

    Proposal

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

    The copy to clipboard options shows when clicking on a reportAction with a link even outside the link text instead of the normal context menu.

    What is the root cause of that problem?

    The root cause is a disparity between web and native platforms as how they render AnchorRender component width.
    By default on native, the parent view stretches to cover all the space available for the content but that is not true on web. That's why we see it working correctly on web.

    Screenshot 2023-06-01 at 1 37 22 PM

    return (
    <AnchorForCommentsOnly
    href={attrHref}
    // Unless otherwise specified open all links in
    // a new window. On Desktop this means that we will
    // skip the default Save As... download prompt

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

    The simple solution is to wrap the content returned in AnchorRender with a View having the style alignItems: "flex-start" because this will prevent the View from stretching to the max width and only occupy the size of its content (as mentioned here)
    Like this:

    <View style={{ alignItems: "flex-start" }}>
      <AnchorForCommentsOnly
         ...
       />
    </View>
    

    After applying

    Screen.Recording.2023-06-01.at.1.34.58.PM.mov
  5. assigned and unassigned on Jun 1, 2023
  6. Gonals commented on Jun 1, 2023

    @Gonals
    Contributor

    Taking a look!

  7. added
    External
    on Jun 1, 2023
  8. changed the title [-]Long-pressing the empty right section of a message with just a link doesn't show correct options.[/-] [+][$1000] Long-pressing the empty right section of a message with just a link doesn't show correct options.[/+] on Jun 1, 2023
  9. melvin-bot commented on Jun 1, 2023

    @melvin-bot
  10. melvin-bot commented on Jun 1, 2023

    @melvin-bot

    Current assignee @greg-schroeder is eligible for the External assigner, not assigning anyone new.

  11. 5 remaining items

  12. greg-schroeder commented on Jun 1, 2023

    @greg-schroeder
    Contributor

    Oh, that makes sense that it would be the same RC - I am managing both issues. If you agree that @bernhardoj's proposal fixes both @Gonals, we should just merge them to be honest. This is basically the same issue couched differently, no?

  13. thesahindia commented on Jun 1, 2023

    @thesahindia
    Member

    Yeah, it makes sense! Let's fix this in the same PR.

  14. Victor-Nyagudi commented on Jun 1, 2023

    @Victor-Nyagudi
    Contributor

    Is this issue considered a dupe now based on the above findings?

  15. Gonals commented on Jun 2, 2023

    @Gonals
    Contributor

    Oh, that makes sense that it would be the same RC - I am managing both issues. If you agree that @bernhardoj's proposal fixes both @Gonals, we should just merge them to be honest. This is basically the same issue couched differently, no?

    Makes sense to me!

  16. greg-schroeder commented on Jun 2, 2023

    @greg-schroeder
    Contributor

    Closing as a dupe. It's essentially the same report couched differently, and will be fixed incidentally.

  17. added
    Reviewing
    on Jun 3, 2023
  18. added
    Weekly
    Awaiting Payment
    and removed
    Daily
    on Jun 12, 2023
  19. changed the title [-][$1000] Long-pressing the empty right section of a message with just a link doesn't show correct options.[/-] [+][HOLD for payment 2023-06-19] [$1000] Long-pressing the empty right section of a message with just a link doesn't show correct options.[/+] on Jun 12, 2023
  20. removed
    Reviewing
    on Jun 12, 2023
  21. melvin-bot commented on Jun 12, 2023

    @melvin-bot

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

  22. melvin-bot commented on Jun 12, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.26-4 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 2023-06-19. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  23. melvin-bot commented on Jun 12, 2023

    @melvin-bot

    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:

    • [@narefyev91] The PR that introduced the bug has been identified. Link to the PR:
    • [@narefyev91] 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:
    • [@narefyev91] 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:
    • [@narefyev91] Determine if we should create a regression test for this bug.
    • [@narefyev91] 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.
    • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalHelp WantedWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions