Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.35k stars 2.77k forks source link

[$250] Long State/Province text can not be saved on Address modal - Update the FE to match the 32 limit for the state field here for foreign addresses #49264

Open IuliiaHerets opened 1 week ago

IuliiaHerets commented 1 week ago

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.35-0 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/4963582&group_by=cases:section_id&group_order=asc&group_id=229064 Email or phone of affected tester (no customers): gocemate+a2148@gmail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to Settings -> Profile -> Personal details
  2. Click on Address> Fulfil requested fields with non-USA details> Save
  3. Click on Address> Add extra text in State/Province field> Save

Expected Result:

Edited State/Province info should update since user is allowed to add 50 characters

Actual Result:

Long State/Province can not be saved on Address modal

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/1ba8ed5a-388a-41cf-9273-25f949f90a9a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836427775692517927
  • Upwork Job ID: 1836427775692517927
  • Last Price Increase: 2024-09-18
Issue OwnerCurrent Issue Owner: @rayane-djouah
melvin-bot[bot] commented 1 week ago

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

IuliiaHerets commented 1 week ago

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

nyomanjyotisa commented 1 week ago

Proposal

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

Long State/Province text can not be saved on Address modal

What is the root cause of that problem?

State/Province char limit for international address in BE is 32

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

Create new const to store STATE_CHARACTER_LIMIT

STATE_CHARACTER_LIMIT: 32,

Update the max length for state/province https://github.com/Expensify/App/blob/8c5141ad3bfeaeb3dab47321e46d430028abdc3b/src/components/AddressForm.tsx#L209 https://github.com/Expensify/App/blob/8c5141ad3bfeaeb3dab47321e46d430028abdc3b/src/pages/MissingPersonalDetails/substeps/Address.tsx#L136

maxLength={CONST.STATE_CHARACTER_LIMIT}

Additionally we can adjust the STATE_CHARACTER_LIMIT value if needed

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 5 days ago

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

melvin-bot[bot] commented 5 days ago

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

trjExpensify commented 5 days ago

Internal references:

So let's update the FE to match the BE's 32 character limit for states with foreign addresses. 👍

rayane-djouah commented 1 day ago
Screenshot 2024-09-23 at 2 19 28 AM
rayane-djouah commented 1 day ago

@nyomanjyotisa's proposal looks good to me,

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 1 day ago

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