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-08-14] [$1000] Chat - Clicking Outside Link in Link Preview Should Not Open the Link #22979

Closed
6 tasks done
kbecciv opened this issue Jul 16, 2023 · 38 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 Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 16, 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:

Action Performed:

  1. Login to the application and navigate to any chat.
  2. Send a link (e.g., www.google.com) in the chat.
  3. In the link preview, click outside the link (next to it) instead of directly on the link itself.

Expected Result:

Clicking outside the link in the link preview should not open the corresponding link.

Actual Result:

When clicking next to the link in the link preview, it opens the corresponding link in a new tab or the default browser,

Workaround:

Unknown

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.41-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

claick-outside-link.mov
Recording.3680.mp4

Expensify/Expensify Issue URL:
Issue reported by: @ahmdshrif
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689435841926949

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019285d8fb1003132d
  • Upwork Job ID: 1681656254083117056
  • Last Price Increase: 2023-07-26
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 16, 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

@kbecciv
Copy link
Author

kbecciv commented Jul 16, 2023

Proposal

by : @ahmdshrif

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

Clicking next to the link preview click on the link

What is the root cause of that problem?

By default, we will set align-self or align-items on the parent to stretch to the View, which stretches the
textLink to take the parent width.

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

we need to add self-alignment to start or Baseline the text-link style here

<TextLink
fontSize={variables.fontSizeNormal}
style={[styles.pv2, StyleUtils.getTextColorStyle(colors.blueLinkPreview)]}
href={url}
>
{title}
</TextLink>

style={[styles.pv2, StyleUtils.getTextColorStyle(colors.blueLinkPreview), styles.alignSelfStart]}

What alternative solutions did you explore? (Optional)

add a container with styles.alignItemsBaseline (or styles.alignItemsStart) to the text link
or for the preview container.

Result :

fix-click-outside-link.mov

@melvin-bot melvin-bot bot added the Overdue label Jul 18, 2023
@JmillsExpensify
Copy link

This is not a bug in my opinion, as we're still building out the feature and it's debatable how this new feature should work. That said, I think I agree that within the link preview, only the hyperlink within the preview should be clickable. I'll triage.

@melvin-bot melvin-bot bot removed the Overdue label Jul 19, 2023
@JmillsExpensify JmillsExpensify added the External Added to denote the issue can be worked on by a contributor label Jul 19, 2023
@melvin-bot melvin-bot bot changed the title Chat - Clicking Outside Link in Link Preview Should Not Open the Link [$1000] Chat - Clicking Outside Link in Link Preview Should Not Open the Link Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019285d8fb1003132d

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

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@kaushiktd
Copy link
Contributor

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

Chat - Clicking Outside Link in Link Preview Should Not Open the Link

What is the root cause of that problem?

TextLink is stretched according to It's parent View component, So It is clickable to full width of screen ( out side of title)

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

You need to wrap TextLink inside the View component with styles.flexRow. You need to change Here like below mention code.

<View style={styles.flexRow}>
     <TextLink
        fontSize={variables.fontSizeNormal}
        style={[styles.pv2, StyleUtils.getTextColorStyle(colors.blueLinkPreview)]}
        href={url}
    >
        {title}
    </TextLink>
</View>

Video:

https://drive.google.com/file/d/1mhtv72Ks1rYKFut0ig7JpxEdV-gJO-aT/view?usp=sharing

@namhihi237
Copy link
Contributor

Proposal

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

Chat - Clicking Outside Link in Link Preview Should Not Open the Link

What is the root cause of that problem?

There are 2 problems here:

  1. Click on the empty space to the right of the link preview because here the TextLink element will take up the entire width of the parent element.

  2. The space above and below the preview link can be clicked because of the padding passed to the TextLink

    <TextLink
    fontSize={variables.fontSizeNormal}
    style={[styles.pv2, StyleUtils.getTextColorStyle(colors.blueLinkPreview)]}
    href={url}
    >
    {title}
    </TextLink>

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

We'll wrap the TextLink with a View tag and add styles.alignItemsStart like we're using elsewhere, and we'll move pv2 out of the TextLink.

 <View style={[styles.alignItemsStart, style.pv2]}>
    <TextLink
      style={[StyleUtils.getTextColorStyle(colors.blueLinkPreview)]}
    >
    </TextLink>
</View>

Result:

Screen.Recording.2023-07-21.at.10.00.34.mov

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

@JmillsExpensify, @mananjadhav Huh... This is 4 days overdue. Who can take care of this?

@JmillsExpensify
Copy link

@mananjadhav Mind reviewing these proposals in the coming days? Thank you!

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2023
@mananjadhav
Copy link
Collaborator

I'll review this today/tomorrow.

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@mananjadhav
Copy link
Collaborator

Adding alignSelfStart should be good to fix this. Hence @ahmdshrif's proposal here is good to go.

🎀 👀 🎀 C+ Reviewed.

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@namhihi237
Copy link
Contributor

Hi @mananjadhav You can consider my proposal, currently I investigated and found we can click above and below the link. My Proposal solved that. Thanks

@melvin-bot melvin-bot bot added the Overdue label Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($1000)

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

📣 @ahmdshrif You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

📣 @ahmdshrif We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@Gonals
Copy link
Contributor

Gonals commented Jul 31, 2023

There we go! Apparently you have to comment on the issue before I can add you 😁

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

🎯 ⚡️ Woah @mananjadhav / @ahmdshrif, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @ahmdshrif got assigned: 2023-07-31 08:46:14 Z
  • when the PR got merged: 2023-08-02 09:43:12 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 7, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Chat - Clicking Outside Link in Link Preview Should Not Open the Link [HOLD for payment 2023-08-14] [$1000] Chat - Clicking Outside Link in Link Preview Should Not Open the Link Aug 7, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.50-3 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-08-14. 🎊

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

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

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 Aug 7, 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:

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

@JmillsExpensify
Copy link

@mananjadhav When you get a chance over the next week, let's get this BZ checklist kicked off. Thanks!

@mananjadhav
Copy link
Collaborator

Yes I'll be doing this by coming weekend.

@mananjadhav
Copy link
Collaborator

We added the click behavior to the preview links in this PR, but we didn't check the clickable area for the extra padding.

I posted a commented on the PR here.

I don't think we need a regression test here.

@mananjadhav
Copy link
Collaborator

@JmillsExpensify Raising my request on NewDot, can you please comment here with the payment summary?

@JmillsExpensify
Copy link

Summarizing the payments per the urgency confirmation above.

@JmillsExpensify
Copy link

Upwork job is here: https://www.upwork.com/jobs/~019285d8fb1003132d. @ahmdshrif Mind applying when you have a second and I'll get this paid out?

@JmillsExpensify
Copy link

Separately, I confirm that the payment summary above for @mananjadhav is accurate and ready for payment in NewDot.

@ahmdshrif
Copy link
Contributor

ahmdshrif commented Aug 15, 2023

@JmillsExpensify applied

@JmillsExpensify
Copy link

Great thanks! Offer sent

@ahmdshrif
Copy link
Contributor

@JmillsExpensify Thanks! ... Accepted

@JmillsExpensify
Copy link

All paid out and contract closed! Thanks everyone.

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 Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants