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

Element template ~ Field length error message #4207

Open
vikkee57 opened this issue Mar 25, 2024 · 4 comments
Open

Element template ~ Field length error message #4207

vikkee57 opened this issue Mar 25, 2024 · 4 comments
Assignees
Labels
backlog Queued in backlog bug Something isn't working good first issue Good for newcomers properties panel spring cleaning Could be cleaned up one day ux

Comments

@vikkee57
Copy link

vikkee57 commented Mar 25, 2024

Describe the bug

It's not quite a bug but feature that has room for improvement. When using element templates, the error messages associated with the field length properties are inaccurate. Can we rephrase them to be more precise?

Current error for max length:

image

Suggested: Field cannot exceed 10 characters


Current error for min length:

image

Suggested: Field must be atleast 2 characters


Steps to reproduce

  1. Create an element template for a String field
  2. Set the max length and min length using the syntax below
    The element template has the following config for this example:
    "constraints": { "notEmpty": true, "minLength": 2, "maxLength": 10, . .
  3. Observe the error message, and actual behavior.

Expected behavior

Error messages reflect appropriate system behavior.

eg: Field cannot exceed 10 characters instead of Must have max length 10

Environment

  • OS: [Windows 11]
  • Camunda Modeler Version: [5.21.0]
  • Execution Platform: [e.g. Camunda 7]
  • Installed plug-ins: []

Additional context

No response

@vikkee57 vikkee57 added the bug Something isn't working label Mar 25, 2024
@nikku
Copy link
Member

nikku commented Mar 25, 2024

@vikkee57 Thanks for this bug report. As I understand you, you want to feature characters as a word to make the error more precise? Or what else do you think is missing / to be improved?

@nikku nikku added the needs more information Requires additional information to be actionable. label Mar 25, 2024
@vikkee57
Copy link
Author

Thanks for taking a look @nikku. Yes, it's just grammatical.

The current message "Must have max length 10" indicates that it should be exactly 10 characters. This is misleading because it the expectation is that it will accept 0-10 characters. A more accurate message then would be something like, "Cannot exceed 10 characters".

@nikku nikku removed the needs more information Requires additional information to be actionable. label Apr 10, 2024
@barmac
Copy link
Contributor

barmac commented Apr 10, 2024

I checked how different browsers handle min/max length.

Chrome and Firefox are super verbose:
image
image

Safari is concise but helpful:
image

If we are to change the error message, I think Safari is a great inspiration.

@nikku nikku added good first issue Good for newcomers backlog Queued in backlog spring cleaning Could be cleaned up one day labels Apr 11, 2024
@nikku
Copy link
Member

nikku commented Apr 11, 2024

Thanks both of you. Added to backlog for now but also moved into our spring cleaning item bucket. Should be a straight forward thing to improve given the suggestions you provided. ❤️

@marstamm marstamm self-assigned this Apr 29, 2024
@holygeek00 holygeek00 self-assigned this May 7, 2024
@marstamm marstamm added the ready Ready to be worked on label May 7, 2024 — with bpmn-io-tasks
@marstamm marstamm removed the backlog Queued in backlog label May 7, 2024
holygeek00 added a commit to bpmn-io/bpmn-js-element-templates that referenced this issue May 8, 2024
holygeek00 added a commit to bpmn-io/bpmn-js-element-templates that referenced this issue May 8, 2024
@holygeek00 holygeek00 added the fixed upstream Requires integration of upstream change label May 13, 2024 — with bpmn-io-tasks
@holygeek00 holygeek00 removed the ready Ready to be worked on label May 13, 2024
@nikku nikku added the in progress Currently worked on label May 13, 2024 — with bpmn-io-tasks
@nikku nikku removed the fixed upstream Requires integration of upstream change label May 13, 2024
@marstamm marstamm removed their assignment May 21, 2024
holygeek00 added a commit to bpmn-io/bpmn-js-element-templates that referenced this issue May 21, 2024
@nikku nikku added the backlog Queued in backlog label May 27, 2024 — with bpmn-io-tasks
@nikku nikku removed the in progress Currently worked on label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog bug Something isn't working good first issue Good for newcomers properties panel spring cleaning Could be cleaned up one day ux
Projects
None yet
Development

No branches or pull requests

5 participants