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-07-10] [$1000] Web - site preview is still visible after flag as intimidation #21195

Closed
1 of 6 tasks
kbecciv opened this issue Jun 21, 2023 · 35 comments
Closed
1 of 6 tasks
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 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jun 21, 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. Login as User A
  2. Go to any chat
  3. Send a site url to User B
  4. Login as User B
  5. Go to chat from User A
  6. And mark the site url message as intimidation
  7. Observe the preview

Expected Result:

Site preview should also hide after the message is flagged as intimidation

Actual Result:

Site preview is showing even after flagged as intimidation. Message was hidden but site preview is still visible.

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.27-6

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

Screen.Recording.2023-06-14.at.2.48.21.PM.mov

Expensify/Expensify Issue URL:

Issue reported by: @niravkakadiya25

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011945ec2304a37d15
  • Upwork Job ID: 1671846062900129792
  • Last Price Increase: 2023-06-22
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

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

@AmjedNazzal
Copy link
Contributor

Proposal

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

Web - message was hide but site preview is visible even after flag as intimidation

What is the root cause of that problem?

The problem is that the message is being hidden within the ReportActionItemMessage which doesn't include LinkPreviewer and so even when the message is hidden, LinkPreviewer is left visible because it has no rule to include it in the hidden section of the report item.

{!_.isEmpty(props.action.linkMetadata) && (
<View style={props.draftMessage ? styles.chatItemReactionsDraftRight : {}}>
<LinkPreviewer linkMetadata={_.filter(props.action.linkMetadata, (item) => !_.isEmpty(item))} />

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

We need to include a rule to hide the LinkPreviewer when the message is supposed to be hidden.

{!isHidden && !_.isEmpty(props.action.linkMetadata) && (
    ...rest of the code

Result

Screen.Recording.2023-06-20.at.5.56.14.PM.mov

@getusha
Copy link
Contributor

getusha commented Jun 21, 2023

Proposal

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

Website previewer is not hidden after a report is flagged

What is the root cause of that problem?

The rendering of the LinkPreviewer is independent of the ReportActionItemMessage, which will be rendered based on the condition of !props.isHidden. However, the LinkPreviewer does not have this check. Here:

<LinkPreviewer linkMetadata={_.filter(props.action.linkMetadata, (item) => !_.isEmpty(item))} />

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

There are two ways of solving this issue

  1. Render LinkPreviewer inside ReportActionItemMessage

This will insure the LinkPreviewer is rendered under the condition and also fixes the order of the link and reveal button.

This is what it will look like if we just add the check leaving it the place it is currently/
Screenshot 2023-06-21 at 5 05 23 PM

Moving below/inside ReportActionItemMessage

Screenshot 2023-06-21 at 5 10 19 PM
  1. Render LinkPreviewer right below ReportActionItemMessage with !props.isHidden condition.

Both solution will make sure, the LinkPreviewer will be hidden after the flag and while editing, keeping the right order.

What alternative solutions did you explore? (Optional)

@laurenreidexpensify laurenreidexpensify changed the title Web - message was hide but site preview is visible even after flag as intimidation Web - site preview is still visible after flag as intimidation Jun 22, 2023
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 22, 2023
@melvin-bot melvin-bot bot changed the title Web - site preview is still visible after flag as intimidation [$1000] Web - site preview is still visible after flag as intimidation Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~011945ec2304a37d15

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

melvin-bot bot commented Jun 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@laurenreidexpensify
Copy link
Contributor

@eVoloshchak do you think it's the same as this? #21191

@popcorn-del

This comment was marked as off-topic.

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

📣 @popcorn-del! 📣
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. 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.
  2. 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.
  3. 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>

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@laurenreidexpensify
Copy link
Contributor

@eVoloshchak what do you think about the proposals above?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@eVoloshchak
Copy link
Contributor

I think we should proceed with @AmjedNazzal's proposal here
The fix is pretty straightforward, this is just a missed case from #17288

🎀👀🎀 C+ reviewed!
cc: @laurenreidexpensify

@getusha
Copy link
Contributor

getusha commented Jun 27, 2023

@eVoloshchak any comment in my proposal? I have improved the UI it looks weird when the preview is below the hide/show button

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

melvin-bot bot commented Jun 27, 2023

📣 @AmjedNazzal You have been assigned to this job by @laurenreidexpensify!
Please apply to this job in Upwork 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 📖

@AmjedNazzal
Copy link
Contributor

Thank you! applied on upwork and PR will be ready within a couple of hours.

@AmjedNazzal
Copy link
Contributor

@eVoloshchak PR ready for review.

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@eVoloshchak
Copy link
Contributor

any comment in my proposal? I have improved the UI it looks weird when the preview is below the hide/show button

@getusha, while I agree the improved UI is nice, the main fix for this issue was proposed by @AmjedNazzal first. While improvements are always welcome of course, the difference between proposals should be important, meaningful or considerable (source)

@getusha
Copy link
Contributor

getusha commented Jun 29, 2023

@getusha, while I agree the improved UI is nice, the main fix for this issue was proposed by @AmjedNazzal first. While improvements are always welcome of course, the difference between proposals should be important, meaningful or considerable (source)

Thanks for your response, I believe the difference is considerable that's why i proposed it after @AmjedNazzal's proposal, i proposed to move it inside ReportActionItemMessage which doesn't require the condition, and if the improvement is needed isn't the change considerable?

pecanoro added a commit that referenced this issue Jun 29, 2023
Fix - Web - site preview is still visible after flag as intimidation #21195
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

🎯 ⚡️ Woah @eVoloshchak / @AmjedNazzal, 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 @AmjedNazzal got assigned: 2023-06-27 07:34:45 Z
  • when the PR got merged: 2023-06-29 21:24:59 UTC

On to the next one 🚀

@eVoloshchak
Copy link
Contributor

and if the improvement is needed isn't the change considerable?

@getusha, we didn't implement the UI changes, so this change wasn't needed. I'd consider that an improvement, while this issue is definitely a bug

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - site preview is still visible after flag as intimidation [HOLD for payment 2023-07-10] [$1000] Web - site preview is still visible after flag as intimidation Jul 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.35-5 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-07-10. 🎊

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 Jul 3, 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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@laurenreidexpensify] 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 Jul 9, 2023
@laurenreidexpensify
Copy link
Contributor

@AmjedNazzal and @niravkakadiya25 have been paid in Upwork 👍

@eVoloshchak pls accept the contract and let me know steps above re regression testing so we can issue payment and close this one out, thanks!

@AmjedNazzal
Copy link
Contributor

Thank you!

@eVoloshchak eVoloshchak mentioned this issue Jul 10, 2023
56 tasks
@eVoloshchak
Copy link
Contributor

eVoloshchak commented Jul 10, 2023

  • The PR that introduced the bug has been identified. Link to the PR: Link Previews #17288

  • 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: https://github.com/Expensify/App/pull/17288/files#r1258620931

  • 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: I don't think there's much we can change besides adding a regression test

  • Determine if we should create a regression test for this bug
    Is it easy to test for this bug? No
    Is the bug related to an important user flow? Yes
    Is it an impactful bug? Yes

@eVoloshchak
Copy link
Contributor

Regression Test Proposal

  1. Login as User A
  2. Go to any chat
  3. Send a site URL to User B
  4. Login as User B
  5. Go to chat from User A
  6. Mark the site URL message as intimidation
  7. Verify that the site preview is hidden

Do we agree 👍 or 👎

@eVoloshchak
Copy link
Contributor

@laurenreidexpensify, I've requested the payment for this via NewDot

@laurenreidexpensify
Copy link
Contributor

@anmurali am assigning you for @eVoloshchak's C+ payment

@popcorn-del
Copy link

popcorn-del commented Jul 11, 2023 via email

@anmurali anmurali removed their assignment Jul 11, 2023
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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants