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

[HOLD for payment 2023-04-03] [HOLD for payment 2023-03-22] [$1000] [Form Refactor] Show multiple error messages simultaneously using Form.js #15156

Closed
neil-marcellini opened this issue Feb 14, 2023 · 71 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Waiting for copy User facing verbiage needs polishing Weekly KSv2

Comments

@neil-marcellini
Copy link
Contributor

neil-marcellini commented Feb 14, 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!


Problem

Currently when using the Form component we only pass one error message for each input that is failing a validation, but we should show the user multiple errors for a given input if multiple validations fail. See here for an example of the problem.

Why it's important

As per our form guidelines the Form component "supports an infinite number of possible error messages per field and they are displayed simultaneously if multiple validations fail". Right now that's not the case and we should fix it so that it's possible to follow our own guidelines.

Solution

Update the Form component and make any other required changes so that we can show multiple error messages for each input. As part of the initial refactor, update the display name page to show multiple errors when multiple validations fail for a given input. We should create a follow up issue to refactor the validations on other forms.

From the validate function it should be possible to set set an array of errors on each input. The FormHelpMessage component could then be adapted to show multiple error messages under an input in a similar manner to the DotIndicatorMessage used by OfflineWithFeedback.

Or it may be better to replace FormHelpMessage with a new component designed specifically for showing multiple error messages passed in by a Form.

Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1676403131894039

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0177d2970af2ac9f24
  • Upwork Job ID: 1630729816740864000
  • Last Price Increase: 2023-03-01
@neil-marcellini neil-marcellini added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 14, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 14, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@neil-marcellini neil-marcellini added Improvement Item broken or needs improvement. Engineering Weekly KSv2 and removed Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 14, 2023
@neil-marcellini
Copy link
Contributor Author

neil-marcellini commented Feb 14, 2023

This is an engineering issue and an improvement, not a Bug. I wasn't sure what the best process was to create this issue. How can I assign it to an engineer for triage? I think this can be worked on externally, but it's lower priority and also more involved. cc @puneetlath in case you're interested.

@puneetlath
Copy link
Contributor

@neil-marcellini I think there's some weird thing where if an engineer applies the Engineering label it doesn't do anything, but if a non-engineer does it works. So if @stephanieelliott applies it, it should assign another engineer.

@neil-marcellini
Copy link
Contributor Author

Hahah ok that's weird. As you suggested in a DM, I let the callstack folks know that they could work on this as part of their other form work.

@MelvinBot
Copy link

Triggered auto assignment to @mountiny (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@JmillsExpensify
Copy link

Happened upon this issue. There ya go!

@Expensify Expensify unlocked this conversation Feb 16, 2023
@josemak25
Copy link

Hi, I would like to take this and be assigned this task.

@stephanieelliott stephanieelliott removed their assignment Feb 16, 2023
@stephanieelliott stephanieelliott added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 16, 2023
@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 16, 2023
@MelvinBot

This comment was marked as duplicate.

@stephanieelliott stephanieelliott removed the Bug Something is broken. Auto assigns a BugZero manager. label Feb 16, 2023
@koko57
Copy link
Contributor

koko57 commented Mar 20, 2023

Hello! Taking over the issue from Tomek :)

@MelvinBot
Copy link

📣 @koko57! 📣

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. 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.
  2. 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.
  3. 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>

@koko57
Copy link
Contributor

koko57 commented Mar 20, 2023

@LLPeckham regarding this comment #15978 (comment) - I've proposed new text for romReservedNameError - here is my explanation #15978 (comment)

@LLPeckham
Copy link
Contributor

LLPeckham commented Mar 20, 2023

Suggestion for copy:

As I understand it, if someone tried to name a room #announce, the current message is: Room names #admins and #announce are reserved names for this workspace

I think we should tailor the message for each room because it feels weird to say those are both in use when they only tried the one name. So:

  • If someone tries to name a room #announce: #announce is already in use. Please try another room name.

  • If someone tries to name a room #admins: #admins is already in use. Please try another room name.

  • If we can’t tailor the message to the name entered — we could do something more generic like: This name is already in use for this workspace. Please try another room name.

@LLPeckham
Copy link
Contributor

Please disregard my comment above -- got some more context from @koko57 here.

New suggestion:
If someone tries to use #Admins or #Announce, we could say:

  • Using #announce as a room name is restricted. Please choose another name.
  • Using #admins as a room name is restricted. Please choose another name.

@MelvinBot
Copy link

📣 @koko57 You have been assigned to this job by @mountiny!
Please apply to this job in Upwork 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 melvin-bot bot added Daily KSv2 Weekly KSv2 and removed Daily KSv2 labels Mar 21, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-03-22] [$1000] [Form Refactor] Show multiple error messages simultaneously using Form.js [HOLD for payment 2023-04-03] [HOLD for payment 2023-03-22] [$1000] [Form Refactor] Show multiple error messages simultaneously using Form.js Mar 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 27, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

If no regressions arise, payment will be issued on 2023-04-03. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added the Overdue label Apr 5, 2023
@neil-marcellini
Copy link
Contributor Author

@muttmuure I think this is ready for payment

@melvin-bot melvin-bot bot removed the Overdue label Apr 5, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Apr 12, 2023

Bump @muttmuure

@muttmuure
Copy link
Contributor

Invited @mollfpr to https://www.upwork.com/ab/applicants/1646917160057724928/job-details

Thanks for waiting while I was OOO last week

@mollfpr
Copy link
Contributor

mollfpr commented Apr 14, 2023

@muttmuure No problem! I can't open the job 😅 Submitted!

@melvin-bot melvin-bot bot added the Overdue label Apr 24, 2023
@neil-marcellini
Copy link
Contributor Author

Can we get this closed out soon?

@melvin-bot melvin-bot bot removed the Overdue label Apr 24, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Apr 26, 2023

Gently bump @muttmuure

@JmillsExpensify
Copy link

I'd reach out via New Expensify DM to get Matt's attention.

@muttmuure
Copy link
Contributor

Thanks for the bump! @mollfpr please accept the contract and we'll get you paid

@mollfpr
Copy link
Contributor

mollfpr commented Apr 27, 2023

@muttmuure accepted, thank you!

@muttmuure
Copy link
Contributor

All paid up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Waiting for copy User facing verbiage needs polishing Weekly KSv2
Projects
None yet
Development

No branches or pull requests