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-03-08] [$500] Chat - Download option in three-dot menu is still available in offline mode #36901

Closed
6 tasks done
lanitochka17 opened this issue Feb 20, 2024 · 22 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 20, 2024

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.43-2
Reproducible in staging?: Y
Reproducible in production?: N
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. Navigate to staging.new.expensify.com
  2. Go to any chat
  3. Upload a video
  4. Go offline
  5. Tap on the video
  6. Note that the download option on the top right disappears
  7. Tap 3-dot menu

Expected Result:

The download option will not be available

Actual Result:

The download option is still available

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6385626_1708430145283.Screen_Recording_20240220_142056_One_UI_Home__1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0107940247327e4c0c
  • Upwork Job ID: 1759957422565965824
  • Last Price Increase: 2024-02-20
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 0
    • Krishna2323 | Contributor | 0
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0107940247327e4c0c

@melvin-bot melvin-bot bot changed the title Chat - Download option in three-dot menu is still available in offline mode [$500] Chat - Download option in three-dot menu is still available in offline mode Feb 20, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 20, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 20, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 20, 2024

Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp
CC @quinthar

@Krishna2323
Copy link
Contributor

Krishna2323 commented Feb 20, 2024

Proposal

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

Chat - Download option in three-dot menu is still available in offline mode

What is the root cause of that problem?

We don't check network before passing the download option.

const menuItems = useMemo(
() => [
{
icon: Expensicons.Download,
text: translate('common.download'),
onSelected: () => {
downloadAttachment();
},

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

Check !isOffline before passing download option to menuitem.

Result

@bernhardoj
Copy link
Contributor

Proposal

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

The video download option is still available while offline.

What is the root cause of that problem?

We always include the download option.

const menuItems = useMemo(
() => [
{
icon: Expensicons.Download,
text: translate('common.download'),
onSelected: () => {
downloadAttachment();
},
},

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

Use useNetwork hook to check network state and don't include the download option if isOffline is true.

@bondydaa
Copy link
Contributor

pretty sure this PR is the cause of the regression #30829, though I guess "regression" might not be the correct terminology here since that PR was introducing a new feature.

I think we can just create a new PR, assigning @Krishna2323

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

📣 @abdulrahuman5196 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 20, 2024

📣 @Krishna2323 🎉 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 📖

@bondydaa
Copy link
Contributor

I'm also going to remove the deploy blocker here, I don't think it's worth blocking the deploy over this since it's a minor thing IMO. if someone disagrees feel free to re-add that label

@bondydaa bondydaa added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@bondydaa
Copy link
Contributor

@twisterdotcom you can ignore for now, added you just to help manage payment once the PR is done.

@abdulrahuman5196
Copy link
Contributor

Got it. Do let me know once PR is available. I will take a look into it.

@Krishna2323
Copy link
Contributor

@abdulrahuman5196 PR ready for review :)

@Krishna2323
Copy link
Contributor

@twisterdotcom friendly bump for payments here :), PR was deployed to production on 29th Feb.

@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Not a regression. Seems to be the case for sometime.

Determine if we should create a regression test for this bug.

Yes.

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.

  1. Navigate to staging.new.expensify.com
  2. Go to any chat
  3. Upload a video
  4. Go offline
  5. Tap on the video
  6. Note that the download option on the top right disappears
  7. Tap 3-dot menu
  8. Verify download option is not shown

@twisterdotcom Added BZ checklist. Seems melvin didn't auto update here. This issue is already due for payment.

@twisterdotcom
Copy link
Contributor

Man the automation failing is really killing this process, sorry @abdulrahuman5196. Asking about it internally: https://expensify.slack.com/archives/C01SKUP7QR0/p1709909853731159?thread_ts=1709085400.383159&cid=C01SKUP7QR0

@twisterdotcom
Copy link
Contributor

twisterdotcom commented Mar 8, 2024

Payment Summary:

@twisterdotcom twisterdotcom changed the title [$500] Chat - Download option in three-dot menu is still available in offline mode [HOLD for payment 2024-03-08] [$500] Chat - Download option in three-dot menu is still available in offline mode Mar 8, 2024
@twisterdotcom twisterdotcom added the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 8, 2024
@abdulrahuman5196
Copy link
Contributor

@twisterdotcom . Accepted the offer

@Krishna2323
Copy link
Contributor

@twisterdotcom offer accepted, thanks

@twisterdotcom
Copy link
Contributor

Payments released.

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. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants