-
Notifications
You must be signed in to change notification settings - Fork 333
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
Review content of thrown errors #4072
Comments
@romaricpascal I would like to contribute towards this issue. |
Just a few per-developer things that have come up across error PRs so far
Most important is to explain why something is wrong, where possible |
Worth a quick look at how many of our components validate IDs set in |
Another note to say we've begun scoping using CSS selectors
throw new ElementError($module, {
componentName: 'Checkboxes',
identifier: `[data-module="${Checkboxes.moduleName}"]`
}) But others still use throw new ElementError($module, {
componentName: 'Exit this page',
identifier: '$module'
}) Either way, do we need to worry when |
Following on from this doc and some further discussions, we're aiming to format all our error messages with a mixture of plain English and selectors/variable names in backticks. In general, this might look like:
Where: COMPONENT: PLAIN_ENGLISH_ELEMENT: ELEMENT_IDENTIFIER: PLAIN_ENGLISH_ELEMENT_PROPERTY (optional): PROPERTY_IDENTIFIER (optional): However, in the case where something that doesn't fit this format makes more sense, we should just use that. Examples
|
What
Review the wording of our error message and their names to make sure they're as useful as possible to our users
Why
The clearer these messages, the easier it will be for users for fix the errors that we raise.
Who needs to work on this
Developers, Tech writers
Who needs to review this
Developers, Tech writers
Done when
The text was updated successfully, but these errors were encountered: