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

[Cases] Inconsistency in the Cases form regarding the "Save" button and validation #161461

Open
cnasikas opened this issue Jul 7, 2023 · 3 comments
Labels
enhancement New value added to drive a business result Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Jul 7, 2023

In Cases, we use forms a lot to create and update cases. There are Inconsistencies between different forms in Cases regarding control buttons (Save/Cancel) and validation. We should audit all cases forms and apply @mdefazio guidance:

  • Do not prematurely display errors: Keep submit button active initially, even if a required field is empty
  • Disable submit if the form has errors: Disable the submit button if a field is filled and has an error (or was clicked and fields were left empty)
  • Validation: Do validation on blur if a field has incorrect input (such as using characters that aren’t allowed).
  • Loading state: Disable save button during loading state

Most of the guidance is already applied by the EUI form lib. In some instances, we disable the submit button when we should not.

@cnasikas cnasikas added enhancement New value added to drive a business result Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature labels Jul 7, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@mdefazio
Copy link
Contributor

mdefazio commented Jul 7, 2023

Do not prematurely display errors: Keep submit button active initially, even if a required field is empty

As much as I like this one, and has sound reasoning, I believe this goes against the html5 default behavior for required fields. I'm open to discussing some options, but I imagine this one is more complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

3 participants