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

[$500] Profile- No error message when the image is bigger that the required pixel limit #30904

Closed
5 of 6 tasks
izarutskaya opened this issue Nov 6, 2023 · 19 comments
Closed
5 of 6 tasks
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

@izarutskaya
Copy link

izarutskaya commented Nov 6, 2023

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: v1.3.91-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
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation: @

Action Performed:

  1. Open test website https://staging.new.expensify.com/
  2. Open Settings
  3. Click on Profile
  4. Click on the avatar
  5. Click on the avatar upload icon and upload an image bigger than the required pixel limit of 2048px

Expected Result:

An error message indicating that the image is bigger than the required pixel limit.

Actual Result:

The photo is uploaded.

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

Bug6253328_1698413707559!kUDQAHNkV0

Bug6253328_1698796742966!4000

Bug6253328_1698413707568.bug2.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0120d1355064b5ee16
  • Upwork Job ID: 1721476110933917696
  • Last Price Increase: 2023-11-06
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 6, 2023
@melvin-bot melvin-bot bot changed the title Profile- No error message when the image is bigger that the required pixel limit [$500] Profile- No error message when the image is bigger that the required pixel limit Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

Copy link

melvin-bot bot commented Nov 6, 2023

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

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

melvin-bot bot commented Nov 6, 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

Copy link

melvin-bot bot commented Nov 6, 2023

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

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 6, 2023

Judging by the code maxHeight and maxWidth are 4096

So it doesn't look like a bug

And for error message we use the same constansts

Screenshot 2023-11-06 at 11 42 16

But if we want to update maxHeight and maxWidth

Proposal

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

No error message when the image is bigger that the required pixel limit

What is the root cause of that problem?

In constants we use 4096 as the maximum values

App/src/CONST.ts

Lines 71 to 72 in f9cf18e

AVATAR_MAX_WIDTH_PX: 4096,
AVATAR_MAX_HEIGHT_PX: 4096,

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

We can update this constants like :

    AVATAR_MAX_WIDTH_PX: 2048,
    AVATAR_MAX_HEIGHT_PX: 2048,

App/src/CONST.ts

Lines 71 to 72 in f9cf18e

AVATAR_MAX_WIDTH_PX: 4096,
AVATAR_MAX_HEIGHT_PX: 4096,

What alternative solutions did you explore? (Optional)

NA

@mpiniarski
Copy link

mpiniarski commented Nov 6, 2023

Proposal

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

When the uploaded image is bigger then 2048px, there is no error message.

What is the root cause of that problem?

The limit contraint set in codebase is 4096, not 2048px
image

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

We can set the constant values to 2048px.
image

Copy link

melvin-bot bot commented Nov 6, 2023

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

@jayeshmangwani
Copy link
Contributor

Proposal

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

No error message when the image is bigger that the required pixel

What is the root cause of that problem?

we are using the 4096 pixel value from CONST file for width and height and on error message we are showing Please upload an image larger than 80x80 pixels and smaller than 2048x2048 pixels.

    AVATAR_MAX_WIDTH_PX: 4096,
    AVATAR_MAX_HEIGHT_PX: 4096,
Screenshot 2023-11-06 at 4 11 08 PM

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

either we should change the AVATAR_MAX_WIDTH_PX and AVATAR_MAX_HEIGHT_PX value to 2048 or we should update the error message to Please upload an image larger than 80x80 pixels and smaller than 4096x4096 pixels.

What alternative solutions did you explore? (Optional)

N/A

@parasharrajat
Copy link
Member

Click on the avatar upload icon and upload an image bigger than the required pixel limit of 2048px

@joekaufmanexpensify Can you please confirm if we want to change the max pixel size to 2048x 2048 from current 4096x4096?

@mpiniarski
Copy link

@parasharrajat if the change will be required, please note, that my proposal was the first to not only state the issue but also propose the solution. The proposal above mine was edited after that.

@PiyushChandra17
Copy link

Proposal

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

Profile- No error message when the image is bigger that the required pixel limit

What is the root cause of that problem?

No root cause, as we are already setting the required pixel limit to 4096px.
Here,

App/src/CONST.ts

Lines 71 to 72 in 1ab25d0

AVATAR_MAX_WIDTH_PX: 4096,
AVATAR_MAX_HEIGHT_PX: 4096,

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

If we want the reduce the pixel limit to 2048px, we can simpy update

AVATAR_MAX_WIDTH_PX: 2048,
AVATAR_MAX_HEIGHT_PX: 2048

here,

App/src/CONST.ts

Lines 71 to 72 in 1ab25d0

AVATAR_MAX_WIDTH_PX: 4096,
AVATAR_MAX_HEIGHT_PX: 4096,

What alternative solutions did you explore? (Optional)

NA

@parasharrajat
Copy link
Member

Waiting on @joekaufmanexpensify to confirm #30904 (comment)

@parasharrajat
Copy link
Member

Hey everyone, it is strictly against contribution guidelines to post duplicate proposals.

@jayeshmangwani
Copy link
Contributor

Hey everyone, it is strictly against contribution guidelines to post duplicate proposals.

@parasharrajat I can see you have a thumbs down on my proposal; if the reason is duplication, then I want to say I am the first who proposed a complete solution at the time of commenting, and the other two above my comment were edited after my comment. Let me attach an image to you then you will get the idea.
Screenshot 2023-11-06 at 4 22 23 PM

@joekaufmanexpensify
Copy link
Contributor

Catching up on this now. @parasharrajat looking at your comment here, you mean whether we want to allow images larger than 2048px?

If so, I don't personally see a reason why we wouldn't. IMO, we can probably close this one. Doesn't feel like a bug to me.

@NisargDeveloper
Copy link

Hey are you still searching for person to resolve the issue?. I can help you. Let me know if I need to post the proposal

@jayeshmangwani
Copy link
Contributor

@parasharrajat @joekaufmanexpensify We can close this because 4096 pixel for max width/height was added intentionality, more context here #13899 (comment)

This issue is created because we have added the wrong resolution for this TestRail Profile - Modify User Avatar in this issue, On first step we added Save an image that is between 80px and 2048px, so instead we should use this lineSave an image that is between 80px and 4096px,we can update this line to TestRail and close this issue

@parasharrajat
Copy link
Member

parasharrajat commented Nov 7, 2023

Amazing @jayeshmangwani. Thank you for bringing this up.

@Expensify/applause Please update the Test rail regression steps for the linked issue accordingly #30904 (comment)

We are good to close this issue when that is done. cc: @joekaufmanexpensify

@parasharrajat parasharrajat removed their assignment Nov 7, 2023
@joekaufmanexpensify
Copy link
Contributor

I created an issue for applause to update this regression test. Closing as this is all set!

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
None yet
Development

No branches or pull requests

8 participants