App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2024-02-07] [$125] Teachers Unite - The character input is limited

Open kavimuru opened this issue 1 year ago • 19 comments

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


Issue found when executing #34502 Version Number: 1.4.31.1 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: applause internal team Slack conversation:

Action Performed:

  1. Log in as a new expensifail user
  2. Tap on FAB - Save the world - I am a teacher
  3. Type in "Ádám" in the name field

Expected Result:

I should be able to input characters that the profile display name accepts.

Actual Result:

The character input is limited, it only accepts Latin characters. I can input the same text as my profile display name without problems.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/43996225/bfd8b0cb-d332-4f9f-8d36-84fbc7d912d0

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0149b1c044231d033c
  • Upwork Job ID: 1750500293635174400
  • Last Price Increase: 2024-01-25
  • Automatic offers:
    • ishpaul777 | Reviewer | 28122476
    • paultsimura | Contributor | 28122477

kavimuru avatar Jan 25 '24 12:01 kavimuru

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

melvin-bot[bot] avatar Jan 25 '24 12:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 25 '24 12:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 25 '24 12:01 melvin-bot[bot]

Proposal

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

Teacher's name doesn't allow accented chard.

What is the root cause of that problem?

We use the isValidLegalName validation that doesn't allow accented symbols:

https://github.com/Expensify/App/blob/eb988f3b47f921fdf464bc137d897b46a92c3582/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx#L57-L66

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

We should use either isValidDisplayName, or build a new validation to check only for:

CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name)

What alternative solutions did you explore? (Optional)

paultsimura avatar Jan 25 '24 13:01 paultsimura

Proposal

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

Teachers Unite - The character input is limited Doesn't allow accented characters.

What is the root cause of that problem?

For validation we are using

https://github.com/Expensify/App/blob/6e2c58de92b81c754390a2dd9fc45e6a77557974/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx#L57-L59

That checks for latin characters https://github.com/Expensify/App/blob/6e2c58de92b81c754390a2dd9fc45e6a77557974/src/libs/ValidationUtils.ts#L326-L329

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

If we don't want this validation, we can create a new same method and remove ACCENT_LATIN_CHARS regex test. This will ensure that we don't cause regressions elsewhere.

What alternative solutions did you explore? (Optional)

BhuvaneshPatil avatar Jan 25 '24 13:01 BhuvaneshPatil

Upwork job price has been updated to $125

melvin-bot[bot] avatar Jan 25 '24 13:01 melvin-bot[bot]

Adjusting price as it's low priority.

youssef-lr avatar Jan 25 '24 13:01 youssef-lr

I am interested

ghost avatar Jan 25 '24 16:01 ghost

Thanks for proposals @paultsimura @BhuvaneshPatil ,

we can move forward with @paultsimura as this straightforward fix and they proposed it first https://github.com/Expensify/App/issues/35144#issuecomment-1910175665, to allow accented latin chars in 'I know a teacher" Form , either reusing isValidDisplayName/isValidPersonName or making a new utility, i'll let the assigned engineer make the choice on the expected behaviour.

:one: use the same validation as Profile Display Name page, which is isValidDisplayName, OP suggests this as expected behavior :two: build a new validation function to allow accented latin characters also, suggested by @paultsimura first :three: use existing isValidPersonName function, which disallows all special characters, not proposed by anyone but a possible option

🎀 👀 🎀 C+ reviewed

ishpaul777 avatar Jan 25 '24 19:01 ishpaul777

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

melvin-bot[bot] avatar Jan 25 '24 19:01 melvin-bot[bot]

📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] avatar Jan 25 '24 22:01 melvin-bot[bot]

📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

melvin-bot[bot] avatar Jan 25 '24 22:01 melvin-bot[bot]

Thanks. The PR is ready for review: https://github.com/Expensify/App/pull/35229

I've added a grammatical correction to the copies in this PR. Requested confirmation in Slack.

paultsimura avatar Jan 26 '24 09:01 paultsimura

Merged, awaiting deploy to staging -> prod

greg-schroeder avatar Jan 26 '24 19:01 greg-schroeder

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Jan 31 '24 02:01 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.33-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/35229

If no regressions arise, payment will be issued on 2024-02-07. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] avatar Jan 31 '24 02:01 melvin-bot[bot]

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [ ] [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [ ] [@ishpaul777] 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:
  • [ ] [@ishpaul777] 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:
  • [ ] [@ishpaul777] Determine if we should create a regression test for this bug.
  • [ ] [@ishpaul777] 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.
  • [ ] [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

melvin-bot[bot] avatar Jan 31 '24 02:01 melvin-bot[bot]

The earlier validation was introduced in https://github.com/Expensify/App/pull/26412 quite intentionlly not by mistake so i dont we need point this on the PR.

Also this was not impactful issue so the Regression test is not required.

ishpaul777 avatar Feb 04 '24 22:02 ishpaul777

All right, looks like we're ready to go for payment tomorrow, 2/7. Offers are accepted.

greg-schroeder avatar Feb 06 '24 22:02 greg-schroeder