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] Settings - Take photo option is missing for uploading a profile avatar image #47358

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 13, 2024 · 28 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 13, 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: 9.0.19-10
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4852296&group_by=cases:section_id&group_id=229064&group_order=asc
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Gmail account
  3. Tap on "Account settings"
  4. Tap on the avatar

Expected Result:

I should be able to take a photo for the avatar

Actual Result:

Take photo option is missing for uploading a profile avatar image. The gallery opens
Samsung Galaxy A52s 5G

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

Bug6571262_1723575751018.az_recorder_20240813_205131.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011cd8972e087510c8
  • Upwork Job ID: 1826240108874477245
  • Last Price Increase: 2024-08-28
Issue OwnerCurrent Issue Owner: @mollfpr
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

Triggered auto assignment to @JmillsExpensify (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.

@lanitochka17
Copy link
Author

@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

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

@daledah
Copy link
Contributor

daledah commented Aug 14, 2024

Proposal

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

Take photo option is missing for uploading a profile avatar image. The gallery opens

What is the root cause of that problem?

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

  • In general, we should use the input element without the accept attribute on Android Chrome to ensure that the "Take photo" option is available. However, this approach can lead to the "Choose a file" option displaying unexpected file types. To address this, we need to implement a mechanism that throws an error if the user selects a file type that is not expected. Detail below.
  1. Return undefined if it is android chrome:
    if (type !== CONST.ATTACHMENT_PICKER_TYPE.IMAGE) {
    if (type !== CONST.ATTACHMENT_PICKER_TYPE.IMAGE || Browser.isMobileChrome()) {
  1. Adding a validation logic to:
    const file = e.target.files[0];
                    // Check if the selected file is an image
                    if (type === CONST.ATTACHMENT_PICKER_TYPE.IMAGE && file && !file.type.startsWith('image/')) {
                        // Show an alert if the file is not an image
                        alert('Please select an image file.');
                        // Reset the file input value
                        if (fileInput.current) {
                            fileInput.current.value = '';
                        }
                        return;
                    }

What alternative solutions did you explore? (Optional)

  • In validation logic, when throw error, we can display a modal instead of alert.

@melvin-bot melvin-bot bot added the Overdue label Aug 16, 2024
Copy link

melvin-bot bot commented Aug 19, 2024

@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?

@JmillsExpensify
Copy link

Will open up the issue for proposals since this is possible on native mobile

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2024
@JmillsExpensify JmillsExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Aug 21, 2024
@melvin-bot melvin-bot bot changed the title Settings - Take photo option is missing for uploading a profile avatar image [$250] Settings - Take photo option is missing for uploading a profile avatar image Aug 21, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 21, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

@JmillsExpensify, @mollfpr Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Aug 26, 2024
Copy link

melvin-bot bot commented Aug 27, 2024

@JmillsExpensify @mollfpr 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!

@JmillsExpensify
Copy link

Still open for proposals. I'll keep it open though I don't think it's worth a higher price so keeping that the same.

Copy link

melvin-bot bot commented Aug 28, 2024

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

@mollfpr
Copy link
Contributor

mollfpr commented Aug 28, 2024

I can reproduce the issue with a physical device, not with the emulator.

The RCA from @daledah seems correct and it's a known bug that was reported https://issuetracker.google.com/issues/317289301.

@daledah Is the step 2 in your solution is a must? I think we already have the validation with the file type for avatar.

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2024
@daledah
Copy link
Contributor

daledah commented Aug 28, 2024

Is the step 2 in your solution is a must? I think we already have the validation with the file type for avatar

I believe we need to keep it. Without it, an error message appears below the avatar field whenever an incorrect file is selected.

@mollfpr
Copy link
Contributor

mollfpr commented Aug 29, 2024

I believe we need to keep it. Without it, an error message appears below the avatar field whenever an incorrect file is selected.

@daledah I think it's okay for now, as long the incorrect file didn't get uploaded.

Let's go with @daledah proposal without validation.

🎀 👀 🎀 C+ reviewed!

Copy link

melvin-bot bot commented Aug 29, 2024

Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Aug 29, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@daledah
Copy link
Contributor

daledah commented Aug 31, 2024

@mollfpr PR is ready.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 23, 2024
Copy link

melvin-bot bot commented Sep 23, 2024

This issue has not been updated in over 15 days. @JmillsExpensify, @puneetlath, @mollfpr, @daledah eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@puneetlath
Copy link
Contributor

@mollfpr @daledah what's the status of this? Is it done?

@mollfpr
Copy link
Contributor

mollfpr commented Sep 26, 2024

It seems the automation has failed to update the status. The PR is deployed to the production on 6th September, and there's no deploy blocker linked to the issue. So it's ready for the payment.

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

No offending PR

[@mollfpr] 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:

The regression step should be good!

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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. Login to the App
  2. Navigate to "Account settings"
  3. Tap on the avatar
  4. Verify that: Take photo option is shown
  5. 👍 or 👎

@puneetlath
Copy link
Contributor

Payment summary:

  • C - $250 - @daledah - to be paid via Upwork
  • C+ - 250 - @mollfpr - to be paid via NewDot

@daledah I don't see a contract for you for this issue. Can you link me your Upwork profile?

@garrettmknight
Copy link
Contributor

$250 approved for @mollfpr

@daledah
Copy link
Contributor

daledah commented Oct 1, 2024

Can you link me your Upwork profile?

@puneetlath Here's mine https://www.upwork.com/freelancers/~0138d999529f34d33f

@puneetlath
Copy link
Contributor

@daledah offer sent here: https://www.upwork.com/nx/wm/offer/104289314

Please ping me on this issue when you've accepted.

@puneetlath
Copy link
Contributor

@daledah bump!

@daledah
Copy link
Contributor

daledah commented Oct 10, 2024

@puneetlath Sorry for not letting you know here, I accepted it

@puneetlath
Copy link
Contributor

All paid. Thanks y'all!

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. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
No open projects
Development

No branches or pull requests

6 participants