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

[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
2 of 6 tasks
kavimuru opened this issue Jun 1, 2023 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Jun 1, 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!


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
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 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

@esh-g
Copy link
Contributor

esh-g commented Jun 1, 2023

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

@Gonals Gonals assigned Gonals and unassigned Gonals Jun 1, 2023
@Gonals
Copy link
Contributor

Gonals commented Jun 1, 2023

Taking a look!

@Gonals Gonals added the External Added to denote the issue can be worked on by a contributor label Jun 1, 2023
@melvin-bot melvin-bot bot 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. Jun 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0178d9eb714da9b983

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

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

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

melvin-bot bot commented Jun 1, 2023

Current assignee @Gonals is eligible for the External assigner, not assigning anyone new.

@Gonals
Copy link
Contributor

Gonals commented Jun 1, 2023

Setting as external, as we seem to have a valid proposal already!

@bernhardoj
Copy link
Contributor

Proposal

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

Long press on the empty space of link always show a context menu for copy link only.

What is the root cause of that problem?

The root cause is the same as this issue which I explained it here.

Summary:

  1. A regression of fix: inline display for comment links #17496
  2. There is no such thing as inline element in native, so the text (link) taking all the width.

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

I have the same solution as @esh-g in this issue. However, for this case, wrapping the link with a View will reintroduce this issue.

So, here's what I would like to propose:
The changes from this PR #17496 is basically having a View with a display block style in web. However, this affects all other renderer (link, download, image). Instead of applying the display block to the root view, we can just apply it to our link renderer (AnchorForCommentsOnly).

  1. Revert fix: inline display for comment links #17496
  2. Add View (at the root) to BaseAnchorForCommentsOnly which will accept a props.style.
  3. Pass the style of styles.dBlock from the AnchorForCommentsOnly/index.js file, we only want this to apply for web.

cc: @thesahindia maybe we can handle both issue here

@greg-schroeder
Copy link
Contributor

greg-schroeder commented Jun 1, 2023

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?

@thesahindia
Copy link
Member

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

@Victor-Nyagudi
Copy link
Contributor

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

@Gonals
Copy link
Contributor

Gonals commented Jun 2, 2023

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!

@greg-schroeder
Copy link
Contributor

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

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Jun 12, 2023
@melvin-bot melvin-bot bot 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. Jun 12, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants