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 2024-01-17] [$1000] Workspace - Expensify download link in the welcome message is not hyperlinked #27290

Closed
6 tasks done
lanitochka17 opened this issue Sep 12, 2023 · 95 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 Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 12, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Invite a member to the workspace
  3. Navigate to the workspace chat with the invited member

Expected Result:

https://use.expensify.com/download
link in the welcome message is hyperlinked

Actual Result:

https://use.expensify.com/download
link in the welcome message is not hyperlinked, unless the message is edited and saved

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.68-15

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6198051_20230913_021651.mp4

Expensify/Expensify Issue URL:

Issue reported by: @alitoshmatov

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694444208170039

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0130840f78177f0f3f
  • Upwork Job ID: 1702073199412563968
  • Last Price Increase: 2023-10-06
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Sep 13, 2023

Proposal

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

Workspace - Expensify download link in the welcome message is not hyperlinked.

What is the root cause of that problem?

We are not parsing the text before passing it to addMembersToWorkspace.

sendInvitation() {
Keyboard.dismiss();
Policy.addMembersToWorkspace(this.props.invitedEmailsToAccountIDsDraft, this.state.welcomeNote, this.props.route.params.policyID);
Policy.setWorkspaceInviteMembersDraft(this.props.route.params.policyID, {});
// Pop the invite message page before navigating to the members page.
Navigation.goBack();
Navigation.navigate(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID));
}

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

We need to use replace method from ExpensiMark parser and parse the welcomeNote before sending invitations.

    sendInvitation() {
        Keyboard.dismiss();

        const parser = new ExpensiMark();
        const parsedWelcomeNote = parser.replace(this.state.welcomeNote);

        Policy.addMembersToWorkspace(this.props.invitedEmailsToAccountIDsDraft, parsedWelcomeNote, this.props.route.params.policyID);
        Policy.setWorkspaceInviteMembersDraft(this.props.route.params.policyID, {});
        // Pop the invite message page before navigating to the members page.
        Navigation.goBack();
        Navigation.navigate(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID));
    }

Result:

fixed.mp4

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2023
@melvin-bot melvin-bot bot changed the title Workspace - Expensify download link in the welcome message is not hyperlinked [$500] Workspace - Expensify download link in the welcome message is not hyperlinked Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0130840f78177f0f3f

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

melvin-bot bot commented Sep 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

@alitoshmatov
Copy link
Contributor

I have reported this issue before https://expensify.slack.com/archives/C049HHMV9SM/p1694444208170039 . Can someone check and confirm if I indeed reported it earlier?

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 14, 2023

I agree, it does look like the same report - I will add you as the reporter to this job @alitoshmatov!

@Christinadobrzyn
Copy link
Contributor

@situchan can you check this proposal #27290 (comment)

It looks like we're still collecting proposals!

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@Christinadobrzyn
Copy link
Contributor

@situchan can you check this proposal #27290 (comment)

Let me know if you'd like to see more proposals

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@situchan
Copy link
Contributor

@situchan can you check this proposal #27290 (comment)

Let me know if you'd like to see more proposals

@Christinadobrzyn I'd like to see more proposals. @Krishna2323's solution doesn't seem ideal to me.

@Krishna2323
Copy link
Contributor

solution doesn't seem ideal to me.

@situchan, can you pls tell, why it doesn't seems ideal?
The reason why the link is hyperlinked when you edit it is, when we edit any message, the message is parsed before saving it to the BE, same for the any new report message.

We use this when we add a new comment:

App/src/libs/ReportUtils.js

Lines 1815 to 1825 in d0b4912

/**
* For comments shorter than 10k chars, convert the comment from MD into HTML because that's how it is stored in the database
* For longer comments, skip parsing, but still escape the text, and display plaintext for performance reasons. It takes over 40s to parse a 100k long string!!
*
* @param {String} text
* @returns {String}
*/
function getParsedComment(text) {
const parser = new ExpensiMark();
return text.length < CONST.MAX_MARKUP_LENGTH ? parser.replace(text) : _.escape(text);
}

@situchan
Copy link
Contributor

I don't think we should alter data to send to backend.

@Krishna2323
Copy link
Contributor

@situchan, in the end it is displayed as a normal text message just like any comment, so I think we should. Pls read the comment on line 1816.

@situchan
Copy link
Contributor

Won't this break showing all existing invite messages so far? Also, note that email/sms is sent for that invite message in backend. I am afraid that will cause regression of unexpected escaping/unescaping html.

@situchan
Copy link
Contributor

@Krishna2323 make sure that your proposal is thoroughly tested in all possible cases before claiming.

@Krishna2323
Copy link
Contributor

@situchan, sorry for that, I missed the email part.

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

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

@Christinadobrzyn
Copy link
Contributor

@situchan let me know if you want to see more proposals!

@situchan
Copy link
Contributor

@situchan let me know if you want to see more proposals!

yes, no satisfactory proposals yet

@Christinadobrzyn Christinadobrzyn changed the title [$500] Workspace - Expensify download link in the welcome message is not hyperlinked [$1000] Workspace - Expensify download link in the welcome message is not hyperlinked Sep 22, 2023
@cristipaval
Copy link
Contributor

Web-E PR in review. Once it gets merged and deployed to production, the App PR will be ready for review,

@melvin-bot melvin-bot bot removed the Overdue label Dec 21, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
@cristipaval
Copy link
Contributor

Web-E PR is deployed. I'll make the App PR ready soon.

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

cristipaval commented Jan 5, 2024

App PR is ready for review, @situchan

@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 10, 2024
@melvin-bot melvin-bot bot changed the title [$1000] Workspace - Expensify download link in the welcome message is not hyperlinked [HOLD for payment 2024-01-17] [$1000] Workspace - Expensify download link in the welcome message is not hyperlinked Jan 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 10, 2024
Copy link

melvin-bot bot commented Jan 10, 2024

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

Copy link

melvin-bot bot commented Jan 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-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 2024-01-17. 🎊

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

  • @situchan requires payment (Needs manual offer from BZ)
  • @alitoshmatov requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jan 10, 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 16, 2024
Copy link

melvin-bot bot commented Jan 17, 2024

Payment Summary

Upwork Job

BugZero Checklist (@Christinadobrzyn)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1702073199412563968/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Jan 18, 2024
@cristipaval
Copy link
Contributor

@Christinadobrzyn is OOO until Monday.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 19, 2024
@Christinadobrzyn
Copy link
Contributor

I'm back! sorry for the delay - the old Upwork job expired so I created a new one. @alitoshmatov and @situchan can you review the payment summary here and let me know if I'm missing anything?

if that is good please accept my offer in Upwork so I can pay you.

@melvin-bot melvin-bot bot removed the Overdue label Jan 23, 2024
@alitoshmatov
Copy link
Contributor

Accepted the offer.

@situchan
Copy link
Contributor

yes summary looks correct.
Accepted offer. Thanks

@Christinadobrzyn
Copy link
Contributor

Awesome! Paid out based on this payment summary #27290 (comment)

Closing this as complete! 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. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests