Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.35k stars 2.78k forks source link

[$250] Android - Chat- The link in message is displayed as text. #32403

Open kbecciv opened 9 months ago

kbecciv commented 9 months ago

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: 1.4.7-0 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on a report
  3. Paste a text with link in it
  4. Send the message
  5. Note the link in message is displayed as clickable link
  6. Launch app
  7. Tap on a report
  8. Paste the same text with link in it
  9. Send the message
  10. Note the link in message is displayed as text

Expected Result:

The link in message must be displayed as clickable link and not as text.

Actual Result:

In mweb, the link in message is displayed as clickable link but in android the link in message is displayed as text.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/38bb7c6d-893b-43a1-9abe-76045fabec80

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fc6f40574bba0e81
  • Upwork Job ID: 1730971989461237760
  • Last Price Increase: 2024-09-24
  • Automatic offers:
    • situchan | Contributor | 28002430
Issue OwnerCurrent Issue Owner: @
melvin-bot[bot] commented 9 months ago

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

melvin-bot[bot] commented 9 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01fc6f40574bba0e81

melvin-bot[bot] commented 9 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 9 months ago

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

HafeezRai commented 9 months ago

Summary: I propose to address the issue described in GitHub Issue #32403, where the link in the message is displayed as text rather than a clickable link within the Expensify Android Chat application. My solution involves implementing changes in the codebase to correctly parse and render links, providing users with a seamless experience when interacting with shared URLs.

Technical Explanation:

Link Parsing and Formatting:
    Enhance the existing message parsing logic to identify links within the text.
    Implement a URL parser to correctly recognize and extract URLs from the message content.

TextView Customization:
    Modify the TextView component responsible for rendering chat messages to recognize and handle hyperlinks appropriately.
    Use Android's Linkify class or a custom link detection mechanism to convert identified URLs into clickable links.

Clickable Link Handling:
    Implement an OnClickListener for clickable links, directing users to the associated web page when clicked.
    Ensure that the link handling mechanism is consistent across various Android versions and devices.

Testing:
    Rigorously test the implementation on different Android platforms, including various screen sizes and resolutions, to ensure a consistent user experience.
    Conduct unit tests to verify the correctness of the link parsing and rendering logic.
melvin-bot[bot] commented 9 months ago

πŸ“£ @HafeezRai! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
HafeezRai commented 9 months ago

Contributor details Your Expensify account email: rai.hafeez006@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/hafeezrahmaan

melvin-bot[bot] commented 9 months ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

HafeezRai commented 9 months ago

Summary: I propose to address the issue described in GitHub Issue https://github.com/Expensify/App/issues/32403, where the link in the message is displayed as text rather than a clickable link within the Expensify Android Chat application. My solution involves implementing changes in the codebase to correctly parse and render links, providing users with a seamless experience when interacting with shared URLs.

Technical Explanation:

Link Parsing and Formatting: Enhance the existing message parsing logic to identify links within the text. Implement a URL parser to correctly recognize and extract URLs from the message content.

TextView Customization: Modify the TextView component responsible for rendering chat messages to recognize and handle hyperlinks appropriately. Use Android's Linkify class or a custom link detection mechanism to convert identified URLs into clickable links.

Clickable Link Handling: Implement an OnClickListener for clickable links, directing users to the associated web page when clicked. Ensure that the link handling mechanism is consistent across various Android versions and devices.

Testing: Rigorously test the implementation on different Android platforms, including various screen sizes and resolutions, to ensure a consistent user experience. Conduct unit tests to verify the correctness of the link parsing and rendering logic.

tienifr commented 9 months ago

Composer on Android currently does not support parsing pasted text to markdown or html.

melvin-bot[bot] commented 9 months ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

Santhosh-Sellavel commented 9 months ago

@greg-schroeder Unassigning due to low bandwidth please assign a new C+ here, thanks!

situchan commented 9 months ago

I am interested in reviewing this

greg-schroeder commented 9 months ago

Assigned @situchan as new C+!

melvin-bot[bot] commented 9 months ago

πŸ“£ @situchan πŸŽ‰ 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 πŸ“–

greg-schroeder commented 9 months ago

Thoughts on proposals here @situchan?

greg-schroeder commented 9 months ago

bump

melvin-bot[bot] commented 9 months ago

@greg-schroeder @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

greg-schroeder commented 9 months ago

bump @situchan

situchan commented 9 months ago

@HafeezRai please review our contributing guideline and follow proposal template. Thanks

situchan commented 9 months ago

No satisfactory proposals yet

greg-schroeder commented 9 months ago

Sounds good. Waiting for new proposals, then

melvin-bot[bot] commented 9 months ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

Victor-Nyagudi commented 9 months ago

I'm having trouble reproducing this.

Does it matter where the message with a link is copied from? Does it need to be formatted using link markdown syntax?

The text I copied that had both regular links and markdown syntax (not at the same time) was formatted correctly after pasting it in the composer and then sending on Android native.

Side note: Copying the message by long pressing it, choosing "copy to clipboard", and then pasting in the composer on Android web resulted in the link being pasted as plain text.

greg-schroeder commented 9 months ago

@kbecciv can you answer Victor's question above about where the link is copied from?

kbecciv commented 9 months ago

@greg-schroeder Tester used information from Wikipedia site - https://www.wikipedia.org/ image

melvin-bot[bot] commented 9 months ago

@greg-schroeder @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] commented 9 months ago

@greg-schroeder, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 9 months ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] commented 9 months ago

@greg-schroeder, @situchan Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] commented 9 months ago

@greg-schroeder, @situchan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

melvin-bot[bot] commented 8 months ago

@greg-schroeder @situchan this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 8 months ago

Current assignee @situchan is eligible for the Internal assigner, not assigning anyone new.

greg-schroeder commented 8 months ago

This was formatted correctly for me when testing

melvin-bot[bot] commented 8 months ago

@greg-schroeder, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

greg-schroeder commented 8 months ago

I think I will close for now given inconsistent reproduction

situchan commented 7 months ago

@greg-schroeder the bug is still reproducible.

The OP was not clear. This is inconsistency issue between mWeb and native. On mWeb, the link in message is pasted correctly but on native, the plain text.

lanitochka17 commented 3 weeks ago

Issue is still reproducible on the latest build 9.0.28-0

https://github.com/user-attachments/assets/7a9b7022-e129-4f11-a15b-71b41da1f780

situchan commented 2 weeks ago

Awaiting proposals

greg-schroeder commented 2 weeks ago

Awaiting proposals, not overdue

greg-schroeder commented 2 weeks ago

Same as above

greg-schroeder commented 1 week ago

Same as above

greg-schroeder commented 1 week ago

Same as above

melvin-bot[bot] commented 1 week ago

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

greg-schroeder commented 5 days ago

Awaiting proposals

melvin-bot[bot] commented 1 hour ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ