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

Updates error message to be more helpful #125

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

DanielCouzens
Copy link
Contributor

@DanielCouzens DanielCouzens commented Aug 14, 2024

The improvement in the spread sheet wording is as follows:

Error message given to user as "not valid value for (geographical area type)" more context could be given to user to suggest type of error and help with correcting. Step 3/7 requires a space which is documented in clear instructions, but the error message could indicate that no space has been included or reiterate format instructions above with an example.

I have simply added the following text to the error message:

Have you left a space between the digits?

Screenshot from 2024-08-14 16-16-34

@DanielCouzens DanielCouzens mentioned this pull request Aug 14, 2024
1 task
@DanielCouzens DanielCouzens self-assigned this Aug 14, 2024
@DanielCouzens DanielCouzens marked this pull request as ready for review August 14, 2024 15:18
Copy link
Contributor

@jonrandahl jonrandahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment on postcode step.

@@ -23,7 +23,8 @@ def validate_with(workflow, value)
workflow_update_hook(workflow)
workflow.traverse_to(successor_step)
else
set_flash("Sorry, '#{value}' does not appear to be a valid value for a #{subtype_label}.")
set_flash("Sorry, '#{value}' does not appear to be a valid value for a #{subtype_label}.
Copy link
Contributor

@jonrandahl jonrandahl Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a little more tweaking as your example does not show the additional space in the supplied postcode example; however, when testing in the dev instance, the space is provided but unclear:

CleanShot 2024-08-14 at 17 24 40

You also might be able to "highlight" or indicate in another manner 1 that there is a space in the supplied value; as well as display the additional validation message only if the space exists... if this is your intention?

Footnotes

  1. https://stackoverflow.com/questions/74012576/how-can-i-make-leading-or-trailing-spaces-visible-in-a-rails-html-view

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how, but this is an older screenshot and no longer valid. Can you look at this screenshot instead?

Screenshot from 2024-08-14 16-16-34

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this approach is you're trying to explain the actual mistake with another mistake? There is no extra space, the string is too many characters. If we only want to guide the user to rethink their entry, without writing code handing the myriad of possible mistakes, rephrase the "umbrella" message such as "Perhaps there's a typo or too many characters or maybe an extra space somewhere?" with the key being an tone which expresses uncertainty or possibility without being specific but offering the common mistakes reported.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise you need to discuss and investigate the common issues experienced and create an error handler that responds to each of the discovered possibilities with a specific message for each.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS. I can see that this specific ticket focuses on the missing space however there are no other examples of other error messages here to go by. 😁

Copy link
Contributor

@jonrandahl jonrandahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@DanielCouzens DanielCouzens merged commit 5400aa3 into dev Aug 15, 2024
2 checks passed
@DanielCouzens DanielCouzens deleted the issue/120-improve-error-suggestion branch August 15, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants