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

[$250] Suppress video capture option when SmartScanning #54644

Closed
1 of 8 tasks
m-natarajan opened this issue Dec 29, 2024 · 32 comments
Closed
1 of 8 tasks

[$250] Suppress video capture option when SmartScanning #54644

m-natarajan opened this issue Dec 29, 2024 · 32 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@m-natarajan
Copy link

m-natarajan commented Dec 29, 2024

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


Version Number: 9.0.79-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @quinthar
Slack conversation (hyperlinked to channel name): expensify_bugs

Action Performed:

  1. Tap FAB.
  2. Tap "Create expense".
  3. Select the Scan option.
  4. Tap the "Upload from gallery" or "Select image" icon to the left of the shutter icon

Expected Result:

No Video capture option when Smart scanning receipt

Actual Result:

Video capture option displayed for receipt upload

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
az_recorder_20241229_141432.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021873793132527544206
  • Upwork Job ID: 1873793132527544206
  • Last Price Increase: 2025-01-27
Issue OwnerCurrent Issue Owner: @alitoshmatov
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 29, 2024
Copy link

melvin-bot bot commented Dec 29, 2024

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Dec 30, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

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

@melvin-bot melvin-bot bot changed the title Suppress video capture option when SmartScanning [$250] Suppress video capture option when SmartScanning Dec 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 30, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

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

@linhvovan29546
Copy link
Contributor

#46336 (comment) It seems that this is a limitation on Android.

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 31, 2024
Copy link

melvin-bot bot commented Jan 3, 2025

@slafortune, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jan 3, 2025
@LorenzoBloedow
Copy link

Just as some context, I've looked into this for a bit and also came to the conclusion that you can't remove some options from the file picker on Android+Chrome, maybe when this API is no longer experimental we'll be able to solve this.

Copy link

melvin-bot bot commented Jan 3, 2025

📣 @LorenzoBloedow! 📣
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>

@LorenzoBloedow
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~014619bcc686b0ce79

Copy link

melvin-bot bot commented Jan 3, 2025

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Copy link

melvin-bot bot commented Jan 6, 2025

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

@alitoshmatov
Copy link
Contributor

Reproduced. Yes it seems weird. But I also think it is something we cannot control

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@QichenZhu
Copy link
Contributor

QichenZhu commented Jan 7, 2025

Just as some context, I've looked into this for a bit and also came to the conclusion that you can't remove some options from the file picker on Android+Chrome, maybe when this API is no longer experimental we'll be able to solve this.

@LorenzoBloedow showOpenFilePicker() seems to work in Chrome Beta 132. Are you interested in making a proposal?

@LorenzoBloedow
Copy link

LorenzoBloedow commented Jan 7, 2025

Does anyone know whether Expensify or some dependency overrides the window object? I've spent a couple hours on this but keep getting this error even though if I run the same code in any other website it works.
(Chrome 132.0.6834.57)

Screenshot from 2025-01-07 13-09-13

Edit: Figured it out, I was using HTTP, not HTTPS

@LorenzoBloedow
Copy link

Proposal

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

We're trying to remove the video capture options when clicking on the media picker icon.

What is the root cause of that problem?

Using the input HTML element and not the new showOpenFilePicker API.

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

  1. Define TypeScript types for window.showOpenFilePicker.
  2. Check if window.showOpenFilePicker is available (will be available for most people once Chrome 132 is out)
  3. Prevent the default event for input from firing and override with window.showOpenFilePicker

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

Check if defaultPrevented is true on the input element and if the user still managed to upload a file. Maybe do this for all input elements if that's the desired behavior.

What alternative solutions did you explore? (Optional)

I tried changing the MIME types from the input element, it did not work.

I've attached a video where I click on the media picker (there's a delay because I'm on a development server and my computer is not that great) and it shows the new behavior if this proposal is implemented.

Screencast.from.2025-01-07.16-04-34.webm

Copy link

melvin-bot bot commented Jan 10, 2025

@slafortune, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jan 10, 2025
Copy link

melvin-bot bot commented Jan 12, 2025

@slafortune @alitoshmatov 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!

@alitoshmatov
Copy link
Contributor

@LorenzoBloedow Thank you for proposal. I think showOpenFilePicker is not a viable option due to its limited support.

@melvin-bot melvin-bot bot removed the Overdue label Jan 13, 2025
@LorenzoBloedow
Copy link

I think showOpenFilePicker is not a viable option due to its limited support.

@alitoshmatov Hi there! You might've missed it in the discussion but showOpenFilePicker is going to land on Chrome 132 (next release), and since this issue is marked as only affecting "Android: mWeb Chrome", I think this might be a good solution. What do you think?

Copy link

melvin-bot bot commented Jan 13, 2025

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

Copy link

melvin-bot bot commented Jan 16, 2025

@slafortune, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jan 16, 2025
@QichenZhu
Copy link
Contributor

showOpenFilePicker is going to land on Chrome 132

Chrome 132 is the current stable version.

@LorenzoBloedow
Copy link

@alitoshmatov Please see the new support for Android+Chrome that has already landed in the stable version.

@alitoshmatov
Copy link
Contributor

Still you cannot expect every device to have latest chrome version, how about different browsers. I think this is very small issue to completely change our upload logic. Moreover this solution also eliminates an option to use native camera. I know we already show the camera view in page itself, but I think some might prefer to use native camera which provides more control.

@melvin-bot melvin-bot bot removed the Overdue label Jan 16, 2025
@LorenzoBloedow
Copy link

@alitoshmatov Addressing some of your points:

Still you cannot expect every device to have latest chrome version, how about different browsers.

This is why the implementation should check for support by simply checking if the showOpenFilePicker function exists before calling it.

I think this is very small issue to completely change our upload logic.

I'm not sure it changes the entire upload logic, it still uses the same logic, it just adds an if statement:
Image

Moreover this solution also eliminates an option to use native camera. I know we already show the camera view in page itself, but I think some might prefer to use native camera which provides more control.

We could add a button on the right with a camera icon to open the native camera.

These are just some suggestions, but if you decide this issue won't move forward can we please close it so I can work on others? I'm still looking for my first contribution so I can only work on one at a time :)

@alitoshmatov
Copy link
Contributor

This is why the implementation should check for support by simply checking if the showOpenFilePicker function exists before calling it.

This means we solve this issue for selected users

I'm not sure it changes the entire upload logic, it still uses the same logic, it just adds an if statement:

I meant it we switch from input based upload to different api which might introduce some other changes and side effects

These are just some suggestions, but if you decide this issue won't move forward can we please close it so I can work on others? I'm still looking for my first contribution so I can only work on one at a time :)

Feel free to submit proposal on other issues, you are not assigned to this issue yet, the rule is when you get assigned to an issue.

Copy link

melvin-bot bot commented Jan 20, 2025

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

Copy link

melvin-bot bot commented Jan 23, 2025

@slafortune, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jan 23, 2025
Copy link

melvin-bot bot commented Jan 26, 2025

@slafortune @alitoshmatov this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

Copy link

melvin-bot bot commented Jan 27, 2025

@slafortune, @alitoshmatov 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Jan 27, 2025

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

@alitoshmatov
Copy link
Contributor

No satisfactory proposal yet. TLDR: this issue is normal and is present on other apps, android offers video recording option always when you open file picker. So I think we might close this issue

@melvin-bot melvin-bot bot removed the Overdue label Jan 27, 2025
@slafortune
Copy link
Contributor

Thanks @alitoshmatov - I hadn't realized that is standard for other apps 👍

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Done
Development

No branches or pull requests

6 participants