Skip to content

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

Closed

Description

@izarutskaya

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

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 6, 2023
  2. 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[/+] on Nov 6, 2023
  3. melvin-bot commented on Nov 6, 2023

    @melvin-bot
  4. melvin-bot commented on Nov 6, 2023

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 6, 2023
  6. melvin-bot commented on Nov 6, 2023

    @melvin-bot

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

    @melvin-bot

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

  8. ZhenjaHorbach commented on Nov 6, 2023

    @ZhenjaHorbach
    Contributor

    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

  9. mpiniarski commented on Nov 6, 2023

    @mpiniarski

    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

  10. melvin-bot commented on Nov 6, 2023

    @melvin-bot

    📣 @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>
    
  11. jayeshmangwani commented on Nov 6, 2023

    @jayeshmangwani
    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

  12. parasharrajat commented on Nov 6, 2023

    @parasharrajat
    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?

  13. mpiniarski commented on Nov 6, 2023

    @mpiniarski

    @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.

  14. PiyushChandra17 commented on Nov 6, 2023

    @PiyushChandra17
    Contributor

    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

  15. parasharrajat commented on Nov 6, 2023

    @parasharrajat
    Member
  16. parasharrajat commented on Nov 6, 2023

    @parasharrajat
    Member

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

  17. jayeshmangwani commented on Nov 6, 2023

    @jayeshmangwani
    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

  18. joekaufmanexpensify commented on Nov 6, 2023

    @joekaufmanexpensify
    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.

  19. NisargDeveloper commented on Nov 7, 2023

    @NisargDeveloper

    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

  20. jayeshmangwani commented on Nov 7, 2023

    @jayeshmangwani
    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

  21. parasharrajat commented on Nov 7, 2023

    @parasharrajat
    Member

    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

  22. removed their assignment
    on Nov 7, 2023
  23. joekaufmanexpensify commented on Nov 7, 2023

    @joekaufmanexpensify
    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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions